Quick Start
The sudocode CLI is a powerful command-line tool that agents and users can utilize for managing specs, issues, relationships, and feedback in your git-native context management system. It provides a complete interface for spec-driven development with AI agents.
Users are not expected to use most of the CLI commands directly, except for project initialization and configuration. However, advanced users and integrators may find the CLI useful for scripting and automation.
Initialize a project
cd your-project
sudocode init
Create your first spec
sudocode spec create "Authentication System" --priority 1
Create an implementation issue
sudocode issue create "Implement login endpoint" --priority 1
sudocode link ISSUE-001 SPEC-001 --type implements
Command Categories
The CLI is organized into logical command groups:
Project Setup Initialize and configure sudocode projects
init - Initialize .sudocode directory
Spec Management Create and manage specifications
Issue Management Create and manage work items
Relationships Model dependencies and connections
link - Create typed relationships
add-ref - Add inline references
Feedback System Provide anchored feedback on specs
Query & Planning Find ready work and track progress
ready - Show unblocked issues
blocked - Show blocked issues
status - Project status overview
stats - Project statistics
Sync & Export Manage data synchronization
sync - Sync markdown ↔ JSONL ↔ SQLite
export - Export to various formats
import - Import external data
Common Command Patterns
Creating Entities
All create commands follow a similar pattern:
# Basic creation
sudocode [entity] create "<title>" [options]
# With common options
sudocode spec create "My Spec" --priority 1 --tags "auth,security"
sudocode issue create "My Issue" --priority 0 --assignee "alice"
Listing and Filtering
List commands support powerful filtering:
# List all entities
sudocode [entity] list
# Filter by various criteria
sudocode spec list --priority 1 --grep "auth"
sudocode issue list --status open --assignee "alice" --limit 100
Viewing Details
Show commands display complete entity information:
sudocode spec show SPEC-001
sudocode issue show ISSUE-042
Output includes:
Entity metadata (title, priority, status, timestamps)
Content/description
Relationships (incoming and outgoing)
Tags
Feedback (for specs)
Updating Entities
Update commands support partial updates:
# Update specific fields
sudocode spec update SPEC-001 --priority 0 --title "New Title"
sudocode issue update ISSUE-001 --status in_progress --assignee "bob"
Global Options
These options work with all commands:
Output results as JSON for scripting sudocode --json issue list --status open
Useful for programmatic processing with tools like jq.
Display help for any command sudocode --help
sudocode spec create --help
Command Reference
Project Setup
Initialize a new sudocode project in the current directory. Creates .sudocode/ directory with database, JSONL files, and configuration. View full documentation →
Spec Commands
Create a new specification document. sudocode spec create "<title>" [-p < priorit y > ] [-d < descriptio n > ] [--parent < i d > ] [--tags < tag s > ]
View full documentation →
List all specs with optional filtering. sudocode spec list [-p < priorit y > ] [-g < searc h > ] [--archived < boo l > ] [--limit < nu m > ]
View full documentation →
Update an existing spec. sudocode spec update < spec-i d > [--title < titl e > ] [-p < priorit y > ] [-d < descriptio n > ]
View full documentation →
Issue Commands
Create a new issue. sudocode issue create "<title>" [-p < priorit y > ] [-d < descriptio n > ] [-a < assigne e > ] [--parent < i d > ]
View full documentation →
List all issues with filtering. sudocode issue list [-s < statu s > ] [-a < assigne e > ] [-p < priorit y > ] [-g < searc h > ]
View full documentation →
Update an existing issue. sudocode issue update < issue-i d > [-s < statu s > ] [-p < priorit y > ] [-a < assigne e > ]
View full documentation →
Relationship Commands
Create a typed relationship between entities. sudocode link < from-i d > < to-i d > --type < relationship-typ e >
Relationship types: blocks, implements, depends-on, references, related, discovered-from View full documentation →
Add an inline reference to a spec or issue. sudocode add-ref < entity-i d > < reference-i d > [--line < nu m > ] [--text < searc h > ]
View full documentation →
Feedback Commands
Add anchored feedback from an issue to a spec. sudocode feedback add < issue-i d > < spec-i d > --content "<feedback>" [--type < typ e > ] [--line < nu m > ]
Feedback types: comment, suggestion, request View full documentation →
List feedback with filtering. sudocode feedback list [--spec < i d > ] [--issue < i d > ] [--status < statu s > ]
View full documentation →
sudocode feedback dismiss
Query & Planning Commands
Show issues ready to work on (unblocked, open). Returns issues with no blocking dependencies, sorted by priority. View full documentation →
Sync & Export Commands
Synchronize between markdown files, JSONL, and SQLite. sudocode sync [--watch] [--direction < direction > ]
View full documentation →
Typical Workflows
Starting a New Feature
Create a spec
sudocode spec create "User Dashboard" --priority 1 --tags "frontend,ux"
Break into implementation issues
sudocode issue create "Build dashboard layout" --priority 1
sudocode issue create "Add data visualizations" --priority 1
sudocode issue create "Implement filters" --priority 2
Link issues to spec
sudocode link ISSUE-001 SPEC-001 --type implements
sudocode link ISSUE-002 SPEC-001 --type implements
sudocode link ISSUE-003 SPEC-001 --type implements
Model dependencies
sudocode link ISSUE-001 ISSUE-002 --type blocks
Agent Workflow
Claim an issue
sudocode issue update ISSUE-001 --status in_progress --assignee "agent-backend"
Implement the feature
Write code, run tests, commit changes
Provide feedback if needed
sudocode feedback add ISSUE-001 SPEC-001 \
--content "Token expiration policy not specified" \
--type request \
--line 42
Close the issue
sudocode issue close ISSUE-001
Daily Standup
What's in progress?
sudocode issue list --status in_progress
Tips & Best Practices
Use JSON output for scripting
The --json flag makes it easy to integrate sudocode into scripts: # Get all open issue IDs
sudocode --json issue list --status open | jq -r '.[] | .id'
# Count critical specs
sudocode --json spec list --priority 0 | jq 'length'
If your shell supports completion, enable it for faster command entry: # Example for bash
complete -C sudocode sudocode
Use aliases for common commands
Create shell aliases for frequently-used commands: alias sc = 'sudocode'
alias scr = 'sudocode ready'
alias scb = 'sudocode blocked'
alias scil = 'sudocode issue list'
Combine with git workflows
sudocode is git-native. Commit JSONL files regularly: # After creating/updating entities
git add .sudocode/ * .jsonl .sudocode/config.json
git commit -m "Update specs and issues"
Use grep for quick searches
The --grep flag supports fuzzy searching: # Find all auth-related work
sudocode issue list --grep "auth"
sudocode spec list --grep "authentication"
Error Handling
Common errors and solutions:
Error: sudocode not initialized
Solution: Run sudocode init in your project directory
Solution: Verify the ID with spec list or issue list
Solution: Close other sudocode processes or wait for sync to complete
Error: Invalid priority/status value
Solution: Use valid values (priority: 0-4, status: open/in_progress/blocked/needs_review/closed)
Next Steps
Additional Resources