Trellis uses your name to create a personal workspace directory. If you don’t specify -u, it will automatically detect from git config user.name.To specify manually: trellis init -u john (replace john with your actual name).
trellis init -t electron-fullstack # Use a spec templatetrellis init --overwrite # Overwrite existing specs when using templatetrellis init --append # Only add missing files from template
This creates a .trellis/ directory with the default structure:
.trellis/├── workflow.md # How the workflow works├── spec/ # Your coding conventions│ ├── frontend/│ ├── backend/│ └── guides/├── workspace/ # Session journals└── tasks/ # Task tracking
For Claude Code, it also sets up .claude/ with hooks and commands. For other platforms, it creates the corresponding config directory (.cursor/, .iflow/, .agents/, etc.).
Open .trellis/spec/backend/index.md (or frontend/ if that’s your focus) and fill in the template.Here’s what a real spec looks like:
# Backend Guidelines## Error HandlingAll API endpoints return errors in this format:{ "error": { "code": "VALIDATION_ERROR", "message": "Email is required" } }Use AppError class from src/lib/errors.ts. Don't throw raw Error objects.## Database- Table names: snake_case, plural (user_sessions, not UserSession)- Always include created_at and updated_at timestamps- Foreign keys: {table}\_id format
Be specific. Include file paths. Show actual code from your project. Vague guidelines don’t help.
Start a new Claude Code session and ask it to write some code. Check if it follows your specs.If it doesn’t, your specs probably aren’t specific enough. Add more examples.