Project commands

CommandDescription
spec init --stack <stack>Initialize .specdrive/ (flutter, nextjs, react-native)
spec doctorValidate project setup and LLM configuration
spec listList all specs in the project

Spec workflow

Prefer MCP tools in Cursor/Claude. CLI commands are optional equivalents.

MCP toolCLI commandDescription
create_specspec create <title> [--ticket ID]Create dated feature folder + requirements.md
create_spec + quick gatesspec create <title> --quickGenerate all docs without gates (CLI only)
create_spec type bugfixspec create --type bugfixCreate bugfix spec
update_specspec approve <gate> --spec <slug>Approve: brief, requirements, gap-analysis, design-hld, design-lld, tasks, all
generate_gap_analysisspec gap-analysis --spec <slug>Gap-analysis (cite real files)
generate_design_hld / _lldspec design-hld / design-lld / designGenerate HLD and/or LLD
generate_tasksspec tasks --spec <slug>Generate checkbox tasks.md from approved LLD
get_spec_statusspec status --spec <slug>Show phase, gates, ready_for_implementation

Implementation & review

MCP toolCLI commandDescription
get_next_taskspec implement --spec <slug> --nextNext task context; UI tasks prompt Figma token/skip
complete_taskspec implement --task <id> --completeMark task done
review_codespec review --spec <slug>Review implementation against design.md
review_code (CI)spec review --spec <slug> --ciExit non-zero if review fails

Common options

OptionDescription
--spec <slug>Target spec slug (required for most commands)
--regenerateOverwrite existing design/tasks/gap-analysis
--api-key <key>One-off Gemini key for this command
-d, --descriptionFeature description for create

Environment variables

VariablePurpose
GEMINI_API_KEYFree tier Gemini for CLI generation (priority 1)
GROQ_API_KEYGroq free tier (priority 2)
SPECDRIVE_USE_OLLAMA=1Use local Ollama instead of cloud keys
SPECDRIVE_LLM_OFFLINE=1Template-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