CLI Usage

The Prodara CLI provides commands for building, validating, and inspecting your specifications. All commands support --format json for machine-readable output.

Installation

npm install -g @prodara/cli

Commands

prodara build

Run the full compilation pipeline. This is the default command - running `prodara` with no subcommand is equivalent to `prodara build`. Includes validate, graph, plan, workflow, review, and verify phases.

prodara build --format json ./my-project

prodara init

Scaffold a new Prodara project from a template. Choose from: minimal, saas, marketplace, internal-tool, api.

prodara init my-project --template saas

prodara upgrade

Update an existing Prodara project to the latest version. Adds missing config keys, creates new directories, updates the compiler, and regenerates the AI prompt file.

prodara upgrade --ai copilot

prodara validate

Parse and type-check .prd files without producing a Product Graph. Useful for quick error checking during development.

prodara validate --format json ./project

prodara graph

Compile and emit the Product Graph as JSON. The graph contains all nodes, 40+ edge types, and build metadata.

prodara graph --output build/product-graph.json ./project

prodara plan

Diff the current spec against the last build and produce an incremental plan with change classification and impact analysis.

prodara plan --format json ./project

prodara diff

Show enriched semantic differences between the current spec and the last build. Categorizes changes as structural, behavioral, or policy changes.

prodara diff --format json ./project

prodara test

Run specification-level tests defined in your .prd files. Tests validate transitions, authorization, and rules against the Product Graph.

prodara test --format json ./project

prodara review

Run the reviewer pipeline with all enabled reviewers (up to 9 built-in). Includes the fix loop with configurable iterations.

prodara review --format json ./project

prodara doctor

Check installation health: compiler version, Node.js version, file count, and configuration status.

prodara doctor

prodara drift

Detect whether specs have changed since the last build. Returns exit code 1 if the spec has drifted from the stored graph.

prodara drift ./project

prodara dashboard

Display a project overview with module count, entity count, workflow count, surface count, and other aggregate statistics.

prodara dashboard --format json ./project

prodara analyze

Run consistency and coverage analysis on your spec. Checks cross-module coupling, missing tests, and structural issues.

prodara analyze --format json ./project

prodara checklist

Generate a quality validation checklist organized by category. Useful for pre-release reviews.

prodara checklist --format json ./project

prodara onboard

Generate a guided project walkthrough for new team members. Auto-generated from the Product Graph structure.

prodara onboard --format json ./project

prodara history

Browse past builds with phase status tracking. Useful for auditing changes over time.

prodara history --format json ./project

prodara init --ai <agent>

Generate an AI prompt file for your agent. Supports 26+ agents including copilot, claude, cursor, windsurf, and more.

prodara init --ai copilot

prodara propose "<description>"

Create a new change proposal in .prodara/changes/. The proposal gets its own delta.prd for isolated spec changes.

prodara propose "Add payment processing"

prodara apply <change>

Test-compile and apply a change proposal. Merges the delta.prd into the main spec after validation.

prodara apply add-payment-processing

prodara archive

Archive a completed or rejected change proposal.

prodara archive add-payment-processing

prodara extensions install <name>

Install an extension from npm. Extensions add reviewers, generators, validators, and more.

prodara extensions install @my-org/prodara-ext-react

prodara extensions list

List all installed extensions and their capabilities.

prodara extensions list

prodara extensions remove <name>

Remove an installed extension.

prodara extensions remove @my-org/prodara-ext-react

prodara extensions search <query>

Search the npm registry for Prodara extensions.

prodara extensions search react

prodara build --workflow <name>

Run a named custom workflow instead of the default full pipeline. Define workflows in prodara.config.json.

prodara build --workflow quick-check ./project

Global Flags

FlagDescription
--format human|jsonOutput format (default: human)
--output <path>Write output to a file instead of stdout
--config <path>Path to prodara.config.json
--no-colorDisable colored output
--verboseEnable detailed logging
--helpShow usage for any command

Output Formats

All commands support two output formats:

  • --format human - Pretty-printed output for terminal use (default)
  • --format json - Structured JSON for AI agents and CI pipelines

Exit Codes

  • 0 - Success (no errors)
  • 1 - Compilation errors or drift detected
  • 2 - Invalid usage or missing arguments

Next Steps

See how the AI prompt file drives agent workflows, or configure custom workflows for your build pipeline.