Navigated to /docs/cli/automation

Automation and JSON protocol

Give agents and tooling bounded context, hash-guarded change plans, dry runs, receipts, and focused verification.

Request only the context needed

agent-context returns task-relevant conventions, the selected entity, API cards, diagnostics, and next actions. Summary output is intentionally bounded; request full detail only when a complete graph is necessary.

BASH
bashnpx tavo agent-context --json --task modify-route --target /account
npx tavo inspect route /account --json

Use a read-plan-apply cycle

  • Inspect the target and capture its SHA-256 hash.

  • Create a versioned change plan with expected hashes or expectedMissing preconditions.

  • Run change with --dry-run and review every operation.

  • Apply the same plan and retain the returned receipt.

  • Verify only the changed files and their dependent Tavo.js modules.

BASH
bashnpx tavo change --from-json change.json --dry-run
npx tavo change --from-json change.json > change-receipt.json
npx tavo verify --receipt change-receipt.json --smoke --no-project-scripts --json

change prints its receipt as a JSON protocol envelope; it does not create .tavo/change-receipt.json automatically. Save stdout to a project-relative file, check that the change command exited successfully, then pass that exact file to verify.

Prefer machine-readable diagnostics

JSON forms of routes, inventory, doctor, check, and verify are stable inputs for editors and agents. Validate generation specs independently and use doctor fix dry runs when tooling needs suggested repairs without immediate writes.

BASH
bashnpx tavo doctor --fix-dry-run --json
npx tavo generate --validate-spec tavo.generated.json
npx tavo verify --spec tavo.generated.json --no-project-scripts --json