CLI Reference

This page documents the CLI surface that currently ships in this repo.

All examples here match the command shapes exercised in tests/framework.test.mjs. Most commands print JSON to stdout. The agent-facing exception is veritas shadow run, which defaults to lint-style feedback; use --format json when you need the previous machine-readable orchestration object.

Entry Points

The convenience veritas-report binary defaults to repo-local starter paths:

Core Workflow

The shortest end-user path is:

npm install -D @kontourai/veritas
npx @kontourai/veritas init
npx @kontourai/veritas budget --working-tree
npx @kontourai/veritas shadow run --working-tree

Use budget when you want the concise “what are we checking and what should be reviewed?” view. Use shadow run when you want proof, evidence, eval-draft orchestration, and agent-readable feedback in one command. Use report when you want evidence only. Treat print and apply as optional installer helpers, not the main product path.

Breaking proof-command migration notes live in ../MIGRATING.md.

Commands

init

Bootstraps the starter kit for a target repo.

npx @kontourai/veritas init [--root <path>] [--project-name <name>] [--proof-lane <cmd>] [--force]
npx @kontourai/veritas init --explore [--root <path>] [--project-name <name>] [--proof-lane <cmd>] [--output .veritas/init-plans/<name>.json]
npx @kontourai/veritas init --guided --answers <answers.json> [--root <path>] [--project-name <name>] [--output .veritas/init-plans/<name>.json]
npx @kontourai/veritas init --apply --plan <path> [--root <path>] [--force]

Writes:

init keeps stdout machine-readable JSON and prints the suggested CODEOWNERS block to stderr as informational text.

The bootstrap logic infers:

Guided initialization splits setup into a reviewed artifact flow:

Answers are JSON and may include:

{
  "proofLane": "npm run verify",
  "selectedInstructionTargets": ["AGENTS.md", "CLAUDE.md"],
  "boundaries": ["Do not edit generated snapshots without approval."],
  "codingStyle": "Prefer small ESM modules.",
  "releaseExpectations": "Run npm test and npm run verify before merge."
}

selectedInstructionTargets controls the AI instruction files that --apply mutates and the governance-block rule that the starter policy pack enforces.

report

Generates an evidence artifact for a set of files or a repo state slice.

npx @kontourai/veritas report [--root <path>] [--adapter <path>] [--policy-pack <path>] [--run-id <id>] [file ...]
npx @kontourai/veritas report --format feedback --working-tree
npx @kontourai/veritas report --working-tree
npx @kontourai/veritas report --staged
npx @kontourai/veritas report --unstaged --untracked
npx @kontourai/veritas report --changed-from <ref> --changed-to <ref>

Important behaviors:

To turn a Veritas artifact into a Surface trust report:

artifact_path="$(npx @kontourai/veritas report --working-tree --format json | node -e 'let data=""; process.stdin.on("data", c => data += c); process.stdin.on("end", () => { const parsed = JSON.parse(data); if (!parsed.artifactPath) throw new Error("missing artifactPath"); console.log(parsed.artifactPath); });')"
surface report --adapter veritas --input "$artifact_path" --format summary

Surface generates report-only fields such as id, generatedAt, summary, faultLines, and proofRequirementsByClaimId. Veritas emits the input evidence; Surface owns the report.

budget

Prints the verification budget without requiring operators to read the full report artifact.

npx @kontourai/veritas budget [--root <path>] [--adapter <path>] [--policy-pack <path>] [--run-id <id>] [file ...]
npx @kontourai/veritas budget --working-tree
npx @kontourai/veritas budget --format feedback --working-tree
npx @kontourai/veritas budget --format json --working-tree

Important behaviors:

shadow run

Runs proof first, then creates a report, then creates an eval draft, and optionally finishes the eval record if the missing judgment fields are supplied.

npx @kontourai/veritas shadow run [--root <path>] [--adapter <path>] [--policy-pack <path>] [--team-profile <path>]
  [--format feedback|json]
  [--proof-command <cmd>] [--skip-proof]
  [--working-tree | --changed-from <ref> --changed-to <ref>]
  [--run-id <id>]
  [--reviewer-confidence <scale-entry|unknown>]
  [--time-to-green-minutes <number>]
  [--override-count <number>]
  [--false-positive-rule <rule-id>]
  [--missed-issue <text>]
  [--note <text>]
  [--accepted-without-major-rewrite <true|false>]
  [--required-followup <true|false>]
  [--force]

If accepted_without_major_rewrite, required_followup, and time_to_green_minutes are not all present, the command stops after report plus draft. Feedback mode prints the report path, eval-draft path, and run id in the footer. JSON mode returns the previous orchestration object with the suggested eval record command.

Proof commands are executed as tokenized argv, not through an implicit shell. Keep each proof lane to one executable plus arguments, or move compound shell logic into a real script.

Exit codes:

eval draft

Builds a repo-local draft artifact from a repo-local evidence artifact.

npx @kontourai/veritas eval draft --evidence <path> [--team-profile <path>] [--output <path>] [--force]
  [--reviewer-confidence <scale-entry|unknown>]
  [--time-to-green-minutes <number>]
  [--override-count <number>]
  [--false-positive-rule <rule-id>]
  [--missed-issue <text>]
  [--note <text>]

Guardrail:

eval record

Completes a live-eval record from either evidence directly or a previously created draft.

npx @kontourai/veritas eval record --evidence <path> [--team-profile <path>] [--output <path>] [--force]
  --accepted-without-major-rewrite <true|false>
  --required-followup <true|false>
  --reviewer-confidence <scale-entry|unknown>
  --time-to-green-minutes <number>
  --override-count <number>

npx @kontourai/veritas eval record --draft <path> [--team-profile <path>] [--output <path>] [--force]
  --accepted-without-major-rewrite <true|false>
  --required-followup <true|false>
  --reviewer-confidence <scale-entry|unknown>
  --time-to-green-minutes <number>
  --override-count <number>

Guardrails:

eval marker

Scores a deterministic marker-surfacing benchmark by comparing one without Veritas transcript to one with Veritas transcript against the same benchmark scenario.

npx @kontourai/veritas eval marker \
  --scenario examples/benchmarks/migration-marker-scenario.json \
  --without-veritas-transcript examples/benchmarks/migration-marker-without-veritas.json \
  --with-veritas-transcript examples/benchmarks/migration-marker-with-veritas.json

Important behaviors:

eval marker-suite

Scores a suite of marker benchmarks and reports aggregate reliability metrics across multiple scenario groups and trials.

npx @kontourai/veritas eval marker-suite \
  --suite examples/benchmarks/marker-suite.json

Important behaviors:

eval summary

Reads .veritas/evals/history.jsonl and prints recent local outcome metrics.

npx @kontourai/veritas eval summary [--root <path>]

The summary includes acceptance count, required rewrites, average time to green, average overrides, confidence distribution, and the most flagged false-positive rule.

print

Print-only helpers return suggested content without changing the repo.

npx @kontourai/veritas print package-scripts [--root <path>] [--proof-lane <cmd>]
npx @kontourai/veritas print ci-snippet [--root <path>] [--proof-lane <cmd>]
npx @kontourai/veritas print git-hook [--root <path>] [--hook post-commit]
npx @kontourai/veritas print runtime-hook [--root <path>]
npx @kontourai/veritas print stop-hook [--root <path>] [--tool generic|claude-code|cursor]
npx @kontourai/veritas print governance-block
npx @kontourai/veritas print codex-hook [--root <path>] [--target-hooks-file <path>] [--codex-home <path>]

Printed helper surfaces:

apply

Write the suggested assets into the repo.

npx @kontourai/veritas apply package-scripts [--root <path>] [--proof-lane <cmd>] [--force]
npx @kontourai/veritas apply ci-snippet [--root <path>] [--output <path>] [--proof-lane <cmd>] [--force]
npx @kontourai/veritas apply git-hook [--root <path>] [--hook post-commit] [--output <path>] [--configure-git] [--force]
npx @kontourai/veritas apply runtime-hook [--root <path>] [--output <path>] [--force]
npx @kontourai/veritas apply stop-hook [--root <path>] [--tool generic|claude-code|cursor] [--output <path>] [--force]
npx @kontourai/veritas apply governance-blocks [--root <path>] [--force]
npx @kontourai/veritas apply codex-hook [--root <path>] [--output <path>] [--target-hooks-file <path> | --codex-home <path>] [--force]

Write restrictions are intentional:

runtime status

Inspects the installed state of the tracked adapter surfaces.

npx @kontourai/veritas runtime status [--root <path>] [--target-hooks-file <path>] [--codex-home <path>]

It reports:

Generated Hook Behavior

print git-hook and apply git-hook produce a post-commit hook that:

print runtime-hook and apply runtime-hook produce a shell wrapper that:

print stop-hook and apply stop-hook produce .veritas/hooks/stop.sh, which:

print codex-hook and apply codex-hook produce a tracked Codex config that installs the runtime hook as a Stop hook.

Environment Variables

Do not set either skip variable in CI if the CI lane is meant to enforce proof execution.

Output Shape

The exact JSON varies by command, but the operator-facing contract is stable:

For the artifact fields themselves, see Artifacts and Schemas.