Repository Setup
trellis init [--path <dir>] # Initialize a new repo
trellis seed [--ide cursor|windsurf] # Refresh agent context files
trellis repair # Repair corrupted .trellis/ops.json
trellis import --from <git-repo> # Import Git history as milestones
trellis export --to <dir> # Export milestones to Git commits
Most repo commands accept -p, --path <dir>. When omitted, Trellis walks up from the current directory to the nearest .trellis root (monorepo subfolders work without passing the root path).
Working
trellis status # Current branch, op count, pending changes
trellis log [--limit N] # Op stream history
trellis files # All tracked files
trellis watch # Start continuous file watching
Branches
trellis branch # List branches
trellis branch <name> # Create + switch to branch
trellis branch -d <name> # Delete a branch
Milestones & Checkpoints
trellis milestone create -m "message" # Create milestone
trellis milestone create -m "msg" --from <hash> --to <hash> # Over a specific range
trellis milestone list # List milestones
trellis checkpoint create # Manual checkpoint
trellis checkpoint list # List checkpoints
Diff & Merge
trellis diff [from] [to] # File-level diff
trellis merge <branch> [--dry-run] # Three-way merge
trellis parse <file> # Semantic parse (declarations, imports)
trellis sdiff <fileA> <fileB> # Semantic diff between two versions
Identity
trellis identity # Show current identity
trellis identity init --name "Ada" # Create local identity
Idea Garden
trellis garden # List abandoned clusters
trellis garden list [--status <s>] [--file <f>] # Filter clusters
trellis garden show <cluster-id> # Inspect a cluster
trellis garden search --keyword <term> # Search by keyword
trellis garden revive <cluster-id> # Revive cluster as branch
trellis garden stats # Garden statistics
Issue Tracking
trellis issue create -t "Title" -P high -l label # Create issue
trellis issue create -t "Title" --description "…" # --description alias for --desc
trellis issue list [--status <s>] # List/filter issues
trellis issue show TRL-1 # Issue details
trellis issue active # Currently active issues
trellis issue triage TRL-1 # Move backlog → queue
trellis issue start TRL-1 # Start (auto-branch)
trellis issue pause TRL-1 -n "Waiting on review" # Pause
trellis issue resume TRL-1 # Resume
trellis issue update TRL-1 [options] # Update metadata
trellis issue describe TRL-1 "description" # Set description
trellis issue assign TRL-1 --agent <name> # Assign to agent
trellis issue ac TRL-1 "criterion" [--command "…"] # Add acceptance criterion
trellis issue ac-pass TRL-1 <criterion-id> # Mark criterion passed
trellis issue ac-fail TRL-1 <criterion-id> # Mark criterion failed
trellis issue check TRL-1 # Run acceptance criteria
trellis issue readiness TRL-1 # Completion readiness summary
trellis issue block TRL-1 --blocked-by TRL-2 # Mark blocked
trellis issue unblock TRL-1 --blocked-by TRL-2 # Remove block
trellis issue close TRL-1 --confirm # Close issue
trellis issue reopen TRL-1 # Reopen closed issue
Entity Graph
trellis entity create -i <id> -t <type> -a key=value # Create entity
trellis entity get <id> [--json] # Get entity details
trellis entity update <id> -a key=value # Update attributes
trellis entity delete <id> # Delete entity
trellis entity list [-t <type>] # List entities
trellis fact add <id> <attribute> <value> # Add fact
trellis fact remove <id> <attribute> <value> # Remove fact
trellis fact query [-e <id>] [-a <attribute>] # Query facts
trellis link add <source> <attribute> <target> # Add link
trellis link remove <source> <attribute> <target> # Remove link
trellis link query [-e <id>] [-a <attribute>] # Query links
References
trellis refs <file> # Outgoing wiki-link refs in a file
trellis refs --backlinks TRL-5 # Files referencing an entity
trellis refs --broken # Broken and stale references
trellis refs --stats # Reference index statistics
Decision Traces
trellis decision list [--tool <pattern>] # List decisions
trellis decision show DEC-1 # Show full trace
trellis decision chain issue:TRL-5 # Decision chain for entity
Sync
trellis sync status # Local sync state
trellis sync reconcile --remote <path> # Reconcile with another repo
Peer push/pull transport commands are not exposed yet; they are tracked on the roadmap.
Query & Search
trellis query <eql> # EQL-S query
trellis db query <eql> # Trellis DB query
trellis ask "authentication code" # Semantic search
trellis ask "show me auth code" --rag # RAG context output
trellis search <pattern> # Full-text search across tracked files
trellis reindex # Rebuild search index
Trellis Studio
Launch the local IDE from a Trellis repo (delegates to the turtlecode CLI when installed):
trellis studio [--path <dir>] [--port <n>] [--new] [--no-open]
Alias: trellis web. Initializes the repo first unless --no-init is passed.
Trellis DB
Use Trellis as a local application database:
trellis db init [--path .trellis-db] [--port 3000] # Initialize config + storage
trellis db serve # Start HTTP + WebSocket server
trellis db query <eql> # Query entities
trellis db create <type> [json] # Create entity
trellis db read <id> # Read entity
trellis db list # List entities
trellis db deploy --name <sprite> # Deploy to Sprites
See the Trellis DB API for the full server surface.
Ontology
trellis ontology list # List ontologies
trellis ontology inspect <id> # Show details
trellis ontology validate # Validate store