CLI Reference

Every command in the dippin toolchain — authoring, export, and analysis.

Global Usage

dippin [--format text|json] <command> [args]

Global Flags

FlagValuesDefaultDescription
--formattext, jsontextOutput format for diagnostics. text produces human-readable output. json produces machine-readable arrays for CI/tooling integration.

Exit Codes

CodeMeaning
0Success — no issues found, operation completed
1Error — validation failures, parse errors, check-mode drift, parity mismatches
2Usage error — bad flags, missing arguments, unknown command

Authoring Commands

Authoring

parse

dippin parse <file>

Parse a workflow file and output the intermediate representation (IR) as JSON. Useful for debugging, tooling integration, and inspecting how the parser interprets your workflow. Accepts .dip or .dot files (auto-detected by extension).

validate

dippin validate <file>

Run structural validation checks (DIP001-DIP009) on a workflow. Outputs "validation passed" or diagnostic messages. Exit code 1 if any errors found.

lint

dippin lint <file>

Run both structural validation and semantic linting (DIP001-DIP009 + DIP101-DIP133). All 39 diagnostic rules. Errors cause exit code 1; warnings alone exit 0.

check

dippin check [--format json|text] <file>

Parse, validate, and lint in one shot. Designed for LLM tool-calling loops and CI. Defaults to JSON output with valid, errors, warnings, diagnostics, and suggested_actions fields.

fmt

dippin fmt [--check] [--write] <file>

Format a .dip file to canonical form. 2-space indentation, standard field ordering, deterministic and idempotent output. Use --check for CI (exit 1 if unformatted) or --write for in-place formatting.

new

dippin new [--name <name>] [--write <file>] <template>

Generate a starter .dip file from a built-in template. Available templates: minimal, parallel, conditional, review-loop, human-gate. Output always passes dippin validate.

Export Commands

Export

export-dot

dippin export-dot [--rankdir=LR|TB] [--prompts] <file>

Export a workflow to Graphviz DOT format for visualization. Maps node kinds to DOT shapes (agent=box, human=hexagon, tool=parallelogram). Goal gate nodes get red background; restart edges are dashed.

migrate

dippin migrate [--output <file>] <file.dot>

Convert a DOT file to .dip source format. Maps DOT shapes to Dippin node kinds, extracts graph attributes, unescapes prompts, and prefixes bare condition variables with ctx..

validate-migration

dippin validate-migration <old.dot> <new.dip>

Check structural parity between a DOT file and a .dip file to verify migration correctness. Reports missing nodes, different edges, and changed conditions.

Analysis Commands

Analysis

simulate

dippin simulate [--scenario key=val] [--interactive] [--all-paths] <file>

Dry-run a workflow's execution graph without calling LLMs or running commands. Emits JSONL events (pipeline_start, node_enter, node_exit, edge_traverse, pipeline_end). Use --scenario to inject context values and --all-paths to enumerate all possible paths.

cost

dippin cost <file>

Estimate workflow execution cost based on model pricing tables. Per-node cost breakdown with turn and token heuristics.

coverage

dippin coverage <file>

Analyze edge coverage and reachability. Reports tool output extraction, edge condition matching, and termination analysis.

doctor

dippin doctor <file>

Health report card aggregating lint, coverage, and cost into a letter grade (A-F). Generates actionable suggestions.

test

dippin test [--verbose] [--coverage] <file.dip>

Run scenario tests defined in .test.json files against a workflow. Auto-discovers the test file from the workflow path. Use --verbose to show execution paths. Use --coverage to report node and edge coverage across all test scenarios.

watch

dippin watch [--lint] [--test] <file.dip>

Watch a workflow file for changes and re-run validation automatically. Use --lint to include semantic linting on each change, or --test to re-run scenario tests. Debounces rapid saves.