AgentFlow
CLI

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:

FlagDescription
--dry-runSimulate 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

GroupCommandsTypical use
Bootstrapinit, doctor, versionFirst-time setup and health checks
Pipelinespec, plan, enrich, dev, verify, review, prSpec-driven steps on .kiro/specs/<feature>/
Intentwork, continue, next, inboxNatural-language workflows and resume
Sourcessync, indexExternal sources (e.g. Notion) and indexing
Cost / contextestimate, investigate, context, cost, cost-report, cost-modelsEstimation, investigation, context packs
Inspectinspect (diff, symbol, tests)Targeted local investigation
Opsstatus, resume, report, cleanRun lifecycle and artifacts
MCPmcp, mcp-serveMCP integration when enabled
Metadocs, helpDoc 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/generated

Commit 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-only

From there, follow Quickstart for a safe dry-run path, then First workflow when agents and validation commands are configured.