CLI reference
spec <command> [options] — Kiro-style frontend spec workflow.
Project commands
| Command | Description |
|---|---|
spec init --stack <stack> | Initialize .specdrive/ (flutter, nextjs, react-native) |
spec doctor | Validate project setup and LLM configuration |
spec list | List all specs in the project |
Spec workflow
Prefer MCP tools in Cursor/Claude. CLI commands are optional equivalents.
| MCP tool | CLI command | Description |
|---|---|---|
create_spec | spec create <title> [--ticket ID] | Create dated feature folder + requirements.md |
create_spec + quick gates | spec create <title> --quick | Generate all docs without gates (CLI only) |
create_spec type bugfix | spec create --type bugfix | Create bugfix spec |
update_spec | spec approve <gate> --spec <slug> | Approve: brief, requirements, gap-analysis, design-hld, design-lld, tasks, all |
generate_gap_analysis | spec gap-analysis --spec <slug> | Gap-analysis (cite real files) |
generate_design_hld / _lld | spec design-hld / design-lld / design | Generate HLD and/or LLD |
generate_tasks | spec tasks --spec <slug> | Generate checkbox tasks.md from approved LLD |
get_spec_status | spec status --spec <slug> | Show phase, gates, ready_for_implementation |
Implementation & review
| MCP tool | CLI command | Description |
|---|---|---|
get_next_task | spec implement --spec <slug> --next | Next task context; UI tasks prompt Figma token/skip |
complete_task | spec implement --task <id> --complete | Mark task done |
review_code | spec review --spec <slug> | Review implementation against design.md |
review_code (CI) | spec review --spec <slug> --ci | Exit non-zero if review fails |
Common options
| Option | Description |
|---|---|
--spec <slug> | Target spec slug (required for most commands) |
--regenerate | Overwrite existing design/tasks/gap-analysis |
--api-key <key> | One-off Gemini key for this command |
-d, --description | Feature description for create |
Environment variables
| Variable | Purpose |
|---|---|
GEMINI_API_KEY | Free tier Gemini for CLI generation (priority 1) |
GROQ_API_KEY | Groq free tier (priority 2) |
SPECDRIVE_USE_OLLAMA=1 | Use local Ollama instead of cloud keys |
SPECDRIVE_LLM_OFFLINE=1 | Template-only mode (no AI, for CI) |
Example session
spec init --stack flutter
spec create "Dark Mode Toggle"
spec approve requirements --spec dark-mode-toggle
spec gap-analysis --spec dark-mode-toggle
spec approve gap-analysis --spec dark-mode-toggle
spec design --spec dark-mode-toggle
spec approve design --spec dark-mode-toggle
spec tasks --spec dark-mode-toggle
spec approve tasks --spec dark-mode-toggle
spec implement --spec dark-mode-toggle --next