Skip to content

CLI Reference

The planu CLI lets you manage Planu from your terminal — install it into AI tools, start the MCP server, validate specs, and more.

Quick start

bash
npm install -g @planu/cli
planu <command>

# Or without a global install
npx @planu/cli@latest <command>

Commands

planu install

Detects installed AI tools (Claude Code, Cursor, Windsurf, OpenCode, Zed, Cline, Continue) and writes the Planu MCP entry to each config file. Use --codex to inject instructions into AGENTS.md for tools without MCP support.

bash
planu install [--global] [--codex] [--cursor] [--project PATH]
FlagDescription
--globalConfigure ALL detected AI tools in one command.
--codexInject Planu CLI instructions into AGENTS.md (for Codex / OpenAI).
--cursorConfigure Cursor specifically.
--project PATHProject path for AGENTS.md injection. Defaults to current directory.
bash
# Auto-configure every detected AI tool
planu install --global

# Inject into AGENTS.md only (for Codex)
planu install --codex

planu doctor

Checks every known AI tool config path and reports whether the Planu MCP entry is present, missing, or broken.

bash
planu doctor

Example output:

Planu Doctor

  [+] Claude Code (user)    OK  ~/.claude.json
  [-] Cursor                not installed
  [?] Zed                   tool not found

Planu is installed in 1 location(s). Run `planu install` to add more.

planu uninstall

Finds every config file that contains a Planu MCP entry and removes it after confirmation.

bash
planu uninstall [--yes]
FlagDescription
--yes / -ySkip the confirmation prompt (useful in scripts).

planu status

Updates the status of a spec (e.g. from draft to approved).

bash
planu status <specId> --set <status> [--project-id ID] [--notes "..."]
FlagDescription
--set / -sNew status: draft, review, approved, implementing, done, blocked.
--notes / -nOptional review notes attached to the transition.
--project-idProject ID. Auto-detected from the current directory if omitted.
bash
planu status SPEC-042 --set approved
planu status SPEC-042 --set done --notes "All criteria verified"

planu validate

Validates a spec against its codebase — checks which acceptance criteria are covered and reports overall coverage.

bash
planu validate <specId> [--project-id ID]
bash
planu validate SPEC-042
planu validate SPEC-042 --project-id 1ef29aa7362bb087

planu audit

Runs a code quality audit on the project and scores it 0–100 for SOLID principles, clean code, and architecture compliance.

bash
planu audit [--path .] [--project-id ID] [--spec SPEC-001]
FlagDescription
--path / -pDirectory to audit. Defaults to the current directory.
--spec / -sLimit audit to a specific spec.
--project-idProject ID. Auto-detected if omitted.

planu estimate

Estimates implementation effort for a spec — hours, complexity, and cost breakdown.

bash
planu estimate <specId> [--project-id ID]
bash
planu estimate SPEC-042

planu create

Creates a new spec with a title and optional metadata.

bash
planu create <title> [--type feature] [--description "..."] [--path .]
FlagDescription
--type / -tSpec type: feature, fix, chore, spike.
--description / -dShort description. Defaults to the title if omitted.
--path / -pProject directory. Defaults to the current directory.
--scopeSpec scope.
--targetTarget layer or module.
--featureParent feature group.
bash
planu create "Add OAuth login" --type feature
planu create "Fix null pointer on checkout" --type fix --description "Null pointer when cart is empty"

planu list

Lists all specs in the current project, optionally filtered by status or type.

bash
planu list [--status draft] [--type feature] [--project-id ID]
FlagDescription
--status / -sFilter by status: draft, review, approved, implementing, done, blocked.
--type / -tFilter by type: feature, fix, chore, spike.
--project-idProject ID. Auto-detected if omitted.
bash
planu list
planu list --status approved
planu list --type fix --status done

planu init

Initializes a directory as a Planu project — scans the stack, sets locale, and creates the project metadata.

bash
planu init [path] [--locale en] [--rate 100] [--level junior|mid|senior] [--profile developer]
FlagDescription
--locale / -lLanguage for spec content: en, es, pt, fr, de, zh.
--rate / -rHourly rate in USD for cost estimates.
--levelExperience level: junior, mid, senior.
--profileUser profile: developer, product-owner, designer, non-technical.
bash
planu init
planu init /path/to/project --locale es --rate 80

planu serve

Starts the Planu MCP server. By default uses stdio (for MCP clients like Claude Code, Cursor). Use --http to start an HTTP server compatible with OpenAI function calling.

bash
planu serve [--http] [--port 7823]
FlagDescription
--httpStart HTTP server instead of MCP stdio.
--portHTTP port. Default: 7823.
bash
# MCP stdio mode (default — used by Claude Code, Cursor, Windsurf)
planu serve

# HTTP mode (for GPT-4, Gemini, Kimi, Claude API)
planu serve --http --port 7823
# Tools at: POST http://localhost:7823/v1/tools/call
# List at:  GET  http://localhost:7823/v1/tools

planu dashboard

Opens the Planu web dashboard — a local browser interface for browsing specs, metrics, and reports.

bash
planu dashboard [--port 5050]
bash
planu dashboard
planu dashboard --port 9000

planu watch

Watches a project directory for file changes and fires configured hook handlers (on-save, on-create, on-delete).

bash
planu watch [path] [--hooks on-save,on-create] [--verbose] [--dry-run]
FlagDescription
--hooks / -HComma-separated hook types to watch. Default: on-save,on-create,on-delete.
--verbose / -VShow detailed hook execution logs.
--dry-runPreview which hooks would fire without executing them.
bash
planu watch
planu watch /path/to/project --hooks on-save --verbose
planu watch --dry-run

planu handoff

Generates a structured handoff prompt for an AI agent to implement a spec autonomously.

bash
planu handoff <specId> [--name Agent-1] [--role implementer] [--files src/a.ts,src/b.ts]
FlagDescription
--name / -nAgent name label. Default: Agent-1.
--role / -rAgent role: implementer, reviewer, tester. Default: implementer.
--files / -fComma-separated list of files assigned to this agent.
--project-idProject ID. Auto-detected if omitted.
bash
planu handoff SPEC-042
planu handoff SPEC-042 --name "Backend-Agent" --role implementer --files src/api/auth.ts,src/middleware/jwt.ts

Common workflows

Install in every detected host

bash
planu install --global

CI/CD headless mode

Use the same unrestricted local commands in CI; no Planu entitlement credential is required.

bash
planu validate SPEC-042
planu audit --path /path/to/project

Full SDD cycle from the terminal

bash
planu init                                  # initialize project
planu create "Add payment flow" --type feature
planu list --status draft                   # review pending specs
planu status SPEC-001 --set approved
planu validate SPEC-001                     # check coverage after implementation
planu audit                                 # score code quality

Global flags

These flags apply to every command.

FlagShortDescription
--help-hShow help for the current command.
--versionShow the installed Planu version.
--jsonOutput raw JSON (useful for scripting and piping).
--quiet-qSuppress non-essential output.
--verboseInclude full stack traces on errors.
Join the communityAsk questions, share feedback, and connect with other developers using Planu.
Join Discord