CLI overview
AgentFlow command groups and generated per-command reference.
CLI overview
The **agentflow binary (application/cmd/agentflow) is the sole entry surface for initializing projects, slicing the spec-driven pipeline into discrete verbs, inspecting cost artefacts, and running operational housekeeping. Day-to-day traffic usually flows either through work, where natural-language intents map onto entire pipelines, or through named steps such as plan, dev, verify, etc., when .kiro/specs/<feature>/ already anchors your plan. Groupings below summarize intent, but authoritative flags arrive from Cobra via the generated CLI reference—regenerate that tree whenever CLI wiring changes.
Global behavior
Simulation flags apply consistently across nested commands:
| Flag | Description |
|---|---|
--dry-run | Simulate without external agents or validation shells |
| (persistent) | Inherited by all subcommands |
Environment variables such as AGENTFLOW_DRY_RUN=1 and AGENTFLOW_YES=1 mirror common flags; see Environment variables for the full list.
Command groups at a glance
| Group | Commands | Typical use |
|---|---|---|
| Bootstrap | init, doctor, version | First-time setup and health checks |
| Pipeline | spec, plan, enrich, dev, verify, review, pr | Spec-driven steps on .kiro/specs/<feature>/ |
| Intent | work, continue, next, inbox | Natural-language workflows and resume |
| Sources | sync, index | External sources (e.g. Notion) and indexing |
| Cost / context | estimate, investigate, context, cost, cost-report, cost-models | Estimation, investigation, context packs |
| Inspect | inspect (diff, symbol, tests) | Targeted local investigation |
| Ops | status, resume, report, clean | Run lifecycle and artifacts |
| MCP | mcp, mcp-serve | MCP integration when enabled |
| Meta | docs, help | Doc generation and built-in help |
Treat the grouping as navigation aid—not a mandate about how many commands belong in scripts versus interactive shells.
Generated per-command reference
Per-command pages with flags live under CLI generated. After changing Cobra commands, regenerate:
go run ./application/cmd/agentflow docs generate-cli \
--output docs-site/content/docs/en/cli/generatedCommit the generated MDX with the CLI change so the public docs stay in sync.
First commands to try
Kick the tyres safely before layering agents:
agentflow init
agentflow doctor
agentflow work "my feature" --dry-run --plan-onlyFrom there, follow Quickstart for a safe dry-run path, then First workflow when agents and validation commands are configured.