CLI

The opencanon binary talks to the daemon. If no daemon is running, it can start one for a single request.

Context

context
sh
opencanon context --files src/services/company.service.ts
opencanon context --list-exceptions

Loads docs, decisions, validators, and optional Git history for files or topics.

Rules

rules
sh
opencanon rules --validator service-no-db-client
opencanon rules --decision service-db-boundary
opencanon rules --tree --validator service-no-db-client

Lists validator summaries, scopes, decisions, and fixture coverage. --tree shows the file scope.

Graph Search

graph-search
sh
opencanon search loadCompany --kind symbol --symbol-kind function --scope "src/services/**"
opencanon symbols loadCompany --kind function --scope "src/services/**"
opencanon graph callers loadCompany
opencanon graph callees loadCompany
opencanon refactor rename-symbol loadCompany fetchCompany --file src/services/company.service.ts --format json

Searches the indexed TS/JS graph, filters symbols by kind and file scope, and inspects caller/callee edges before a change or refactor.

Validate

validate
sh
opencanon validate --changed
opencanon validate --project --profile
opencanon validate --check-fixtures
opencanon validate --changed --strict-warnings

Commit Gates

gate
sh
opencanon gate pending --format json
opencanon gate approve <gate-id> \
  --summary "User explicitly approved the blocked change." \
  --via agent

Validators can emit commit gates for intent-sensitive changes. Pending gates are written during changed-file validation. Agents should inspect the staged diff and gate evidence, ask the user for explicit Approve or Reject, and only then record the scoped approval before retrying the commit.

Feedback

feedback
sh
opencanon feedback --changed
opencanon feedback --changed --strict-warnings

Writes concise findings for an agent after edits.

Daemon

daemon
sh
opencanon daemon start
opencanon daemon status
opencanon daemon list
opencanon daemon open
opencanon daemon stop
opencanon daemon check

Bundles

bundle
sh
opencanon bundle list
opencanon bundle inspect ./opencanon.bundle.ts
opencanon bundle plan ./opencanon.bundle.ts --option sourceRoot=src
opencanon bundle install ./opencanon.bundle.ts --option sourceRoot=src

Bundles list local examples, inspect metadata, plan installs, and install docs, decisions, validators, impact surfaces, external tool declarations, and owned files.

Runtime Updates

update
sh
opencanon update check --manifest ./opencanon-runtime-manifest.json
opencanon update apply --manifest ./opencanon-runtime-manifest.json --dry-run

Updates read a manifest, select the current engine target, and verify checksums before writing runtime assets.

Baselines

baseline
sh
opencanon baseline check
opencanon baseline update

Baselines record known findings so validators can distinguish existing debt from new drift.

Diagnostics

diagnostics
sh
opencanon doctor
opencanon benchmark --sizes 1000,10000,50000

Local State

db
sh
opencanon db status
opencanon db reset --confirm