Skip to content

CLI Reference

Auto-Generated

This page was auto-generated from canon --help on 2026-04-23 00:00 UTC. See source script.

The Canon CLI provides local spec management commands.

Installation

bash
# With uv (recommended)
uv tool install canonhq

# With pip
pip install canonhq

# Run without installing
uvx --from canonhq canon --help

Commands

usage: canon [-h]

canon setup

Initialize a repository for Canon. Creates CANON.yaml, the spec directory, and a starter template.

bash
usage: canon setup [-h] [--team TEAM] [--ticket-system {github,jira,linear}] [--non-interactive] [--agent AGENT] [--force]

Options:

OptionDescription
-h, --helpshow this help message and exit
--team TEAMTeam name for CANON.yaml
--ticket-system {github,jira,linear}Ticket system (default: github)
--non-interactiveSkip prompts (for CI/Actions)
--agent AGENTGenerate agent config file (claude, cursor, copilot, codex, gemini, or all)
--forceOverwrite existing non-Canon agent config files

canon login

Authenticate with the Canon platform using device authorization flow or API key.

bash
usage: canon login [-h] [--api-key API_KEY] [--server SERVER] [--org ORG]

Options:

OptionDescription
-h, --helpshow this help message and exit
--api-key API_KEYAuthenticate with an API key instead of OAuth
--server SERVERPlatform URL (default: $CANON_URL or https://canonhq.co)
--org ORGTarget organization slug (e.g. 'canonhq'). Used to scope the device-flow token to a specific Auth0 Organization. If omitted, auto-detected from the current git remote when run inside a repo.

canon logout

Log out and revoke the current session.

bash
usage: canon logout [-h]

Options:

OptionDescription
-h, --helpshow this help message and exit

canon auth

Authentication utilities. Use auth status to check current authentication state.

bash
usage: canon auth [-h] {status} ...

Arguments:

ArgumentDescription
statusShow current authentication status

Options:

OptionDescription
-h, --helpshow this help message and exit

canon auth status

bash
usage: canon auth status [-h]

Options:

OptionDescription
-h, --helpshow this help message and exit

canon tasks

List actionable work items from specs. Shows sections with todo or in_progress status and their acceptance criteria.

bash
usage: canon tasks [-h] [--status STATUS] [--spec SPEC] [--all]

Options:

OptionDescription
-h, --helpshow this help message and exit
--status STATUSFilter by specific status
--spec SPECFilter to a single spec file
--allInclude done/deprecated/draft

canon status

Show spec coverage dashboard. Displays per-spec and aggregate coverage metrics. Supports --json for machine-readable output consumed by the coverage-report GitHub Action.

bash
usage: canon status [-h] [--spec SPEC] [--json]

Options:

OptionDescription
-h, --helpshow this help message and exit
--spec SPECShow detail for a single spec file
--jsonEmit machine-readable JSON instead of human-friendly output

canon start

Mark a spec section as in_progress. Optionally creates or updates a linked GitHub Issue.

bash
usage: canon start [-h] [--issue] section_id

Arguments:

ArgumentDescription
section_idSection ID, number, or partial slug

Options:

OptionDescription
-h, --helpshow this help message and exit
--issueCreate/update GitHub Issue for this section

canon done

Mark a spec section as done. Optionally closes the linked GitHub Issue.

bash
usage: canon done [-h] [--issue] section_id

Arguments:

ArgumentDescription
section_idSection ID, number, or partial slug

Options:

OptionDescription
-h, --helpshow this help message and exit
--issueUpdate/close GitHub Issue if ticket link exists

canon sync

Sync spec sections with the configured ticket system (GitHub Issues, Jira, or Linear). Supports forward sync (spec → tickets) and reverse sync (tickets → spec).

bash
usage: canon sync [-h] [--reverse] [--spec SPEC] [--dry-run] [--local] [--backfill-fingerprints] [--close-stale] [--remote]

Options:

OptionDescription
-h, --helpshow this help message and exit
--reversePull ticket statuses into spec markdown
--spec SPECFilter to a single spec file
--dry-runPreview changes without executing
--localBypass server proxy and use GITHUB_TOKEN / gh CLI directly
--backfill-fingerprintsAdd section fingerprints to existing issue bodies (one-time migration)
--close-staleClose tickets for all done/deprecated sections (one- shot cleanup)
--remoteForce server proxy mode (overrides auto-detection)

canon lint

Static structural validation of spec files — frontmatter schema, section numbering, AC format, status comment syntax, and depends_on resolvability. Pure parser, no Claude spend, no network. The cheapest layer of the lint → verify → audit ladder; safe to run on every PR.

bash
usage: canon lint [-h] [--spec SPEC] [--json] [--warnings-as-errors]

Options:

OptionDescription
-h, --helpshow this help message and exit
--spec SPECLint a single spec by partial path match (default: all discovered specs)
--jsonEmit machine-readable JSON instead of human-friendly output
--warnings-as-errorsTreat warnings as errors (affects exit code)

canon verify

Static verification of acceptance criteria against the codebase. Greps source paths for keywords from each unchecked AC and classifies it as likely realized, not started, or unknown. No Claude spend. Supports --json for the verify GitHub Action.

bash
usage: canon verify [-h] [--section SECTION] [--json] [--gate]

Options:

OptionDescription
-h, --helpshow this help message and exit
--section SECTIONFilter to a single section ID
--jsonEmit machine-readable JSON instead of human-friendly output
--gateGate mode — exit nonzero if any in-scope ACs are unchecked

canon audit

Audit spec statuses against the codebase using Claude. Checks off realized ACs, inserts evidence comments, and optionally runs ticket sync.

bash
usage: canon audit [-h] [--dry-run] [--sync] [--spec SPEC] [--no-ac-updates] [--json]

Options:

OptionDescription
-h, --helpshow this help message and exit
--dry-runPreview changes without writing
--syncRun ticket sync after audit
--spec SPECFilter to a single spec file
--no-ac-updatesSkip checking off ACs and inserting evidence
--jsonEmit machine-readable JSON instead of human-friendly output

canon plan

Generate a task plan from a spec. Outputs a structured implementation plan based on unchecked acceptance criteria.

bash
usage: canon plan [-h] [--output OUTPUT] spec_file

Arguments:

ArgumentDescription
spec_fileSpec file path or partial match

Options:

OptionDescription
-h, --helpshow this help message and exit
--output OUTPUTWrite plan to file instead of stdout

canon new

Scaffold a new spec file from a template. Non-interactive — every input is a flag. Used by the new-spec GitHub Action to produce consistent output.

bash
usage: canon new [-h] --title TITLE [--type {adr,design,runbook,spec}] [--owner OWNER] [--team TEAM] [--output OUTPUT] [--force]

Options:

OptionDescription
-h, --helpshow this help message and exit
--title TITLESpec title (e.g. "Auth Hardening")
--type {adr,design,runbook,spec}Document type (default: spec)
--owner OWNEROwner GitHub handle or name
--team TEAMOwning team
--output OUTPUTExplicit output path. Defaults to <doc_paths_directory>/<slug>.md based on CANON.yaml's first doc_paths entry
--forceOverwrite the output file if it already exists

canon release-notes

Generate spec-driven release notes between two git refs. Diffs spec files at the section level and reports sections that transitioned to done, new realization evidence, and new/removed spec files.

bash
usage: canon release-notes [-h] [--from FROM_REF] [--to TO_REF] [--json] [--output OUTPUT]

Options:

OptionDescription
-h, --helpshow this help message and exit
--from FROM_REFGit ref (tag, branch, or SHA) to compare from. Defaults to the previous tag from git describe --tags --abbrev=0 HEAD^
--to TO_REFGit ref to compare to (default: HEAD)
--jsonEmit machine-readable JSON instead of human-friendly markdown
--output OUTPUTWrite output to file instead of stdout

canon stale

Find specs whose realization code has churned but the spec itself has not been updated. Uses git log timestamps and line-count deltas — no Claude spend, no network. Feeds the stale-spec-check GitHub Action.

A spec is flagged as stale when: its file has not been touched in N days AND at least one file referenced in its <!-- canon:realized-in --> comments has changed AND the combined churn exceeds the configured threshold.

bash
usage: canon stale [-h] [--stale-days STALE_DAYS] [--code-churn-threshold CODE_CHURN_THRESHOLD] [--json]

Options:

OptionDescription
-h, --helpshow this help message and exit
--stale-days STALE_DAYSSpec is candidate-stale when not touched in this many days (default: 90)
--code-churn-threshold CODE_CHURN_THRESHOLDCombined changed lines across realization files required to flag (default: 50)
--jsonEmit machine-readable JSON instead of human-friendly output

canon export

Emit a compliance-grade audit trail of every acceptance criterion across every spec. One row per AC with spec coordinates, owner, team, realization references, and last-modified date. Designed for regulated environments.

bash
usage: canon export [-h] [--format {json,csv}] [--output OUTPUT] [--spec SPEC]

Options:

OptionDescription
-h, --helpshow this help message and exit
--format {json,csv}Output format (default: json). CSV joins list fields with semicolons
--output OUTPUTWrite to file instead of stdout
--spec SPECFilter to a single spec file (substring match)

canon dedup

Find and resolve duplicate tickets for spec sections. Rewrites ticket:unknown links to ticket:github and detects duplicate open tickets for the same section.

bash
usage: canon dedup [-h] [--dry-run] [--spec SPEC]

Options:

OptionDescription
-h, --helpshow this help message and exit
--dry-runPreview changes without acting
--spec SPECPath to specific spec file

canon ide-config

Emit the resolved ide: section from CANON.yaml as JSON for hook scripts. Always exits 0 — missing or malformed CANON.yaml degrades to defaults so hooks never need to handle error cases.

bash
usage: canon ide-config [-h] [--json]

Options:

OptionDescription
-h, --helpshow this help message and exit
--jsonEmit JSON to stdout (currently the only output mode; reserved for future formats)

canon evidence

Capture and inspect dev-session evidence for the plugin evidence pipeline. Manages session records in .canon/session-evidence.json and verify logs in .canon/verify-log.jsonl.

bash
usage: canon evidence [-h] {record,list-verify-runs,show,push} ...

Arguments:

ArgumentDescription
recordCompose a SessionRecord and append to .canon/session-evidence.json
list-verify-runsPrint records from .canon/verify-log.jsonl
showPretty-print .canon/session-evidence.json
pushPersist evidence per commit_on_push mode (called by pre-push hook)

Options:

OptionDescription
-h, --helpshow this help message and exit

canon evidence list-verify-runs

bash
usage: canon evidence list-verify-runs [-h] [--since SINCE]

Options:

OptionDescription
-h, --helpshow this help message and exit
--since SINCEOnly show records with at >= this ISO 8601 timestamp

canon evidence push

bash
usage: canon evidence push [-h] [--mode {auto,always,ask,never}]

Options:

OptionDescription
-h, --helpshow this help message and exit
--mode {auto,always,ask,never}Override commit_on_push mode (default: read from CANON.yaml)

canon integrations

Manage ticket system and service connections. Alias: canon int.

bash
usage: canon integrations [-h] {list,add,remove,test} ...

Arguments:

ArgumentDescription
listList configured integrations
addConnect a ticket system or service
removeDisconnect an integration
testHealth check integration connections

Options:

OptionDescription
-h, --helpshow this help message and exit

canon integrations list

bash
usage: canon integrations list [-h] [--json] [--source {backend,local,env}]

Options:

OptionDescription
-h, --helpshow this help message and exit
--jsonJSON output
--source {backend,local,env}Filter by credential source

canon integrations add

bash
usage: canon integrations add [-h] [--token TOKEN] [--non-interactive] {github,jira,linear}

Arguments:

ArgumentDescription
providerProvider to connect (github, jira, or linear)

Options:

OptionDescription
-h, --helpshow this help message and exit
--token TOKENAPI token (skip interactive prompt)
--non-interactiveFail if prompts are needed

canon integrations remove

bash
usage: canon integrations remove [-h] [--yes] {github,jira,linear}

Arguments:

ArgumentDescription
providerProvider to disconnect

Options:

OptionDescription
-h, --helpshow this help message and exit
--yes, -ySkip confirmation

canon integrations test

bash
usage: canon integrations test [-h] [--json] [{github,jira,linear}]

Arguments:

ArgumentDescription
providerProvider to test (default: all configured)

Options:

OptionDescription
-h, --helpshow this help message and exit
--jsonJSON output

canon extension

Manage Canon extensions — install, remove, list, create, validate, search, and update extensions.

bash
usage: canon extension [-h] {add,remove,list,create,validate,search,info,update,enable,disable} ...

Arguments:

ArgumentDescription
addInstall an extension from a local directory
removeRemove an installed extension
listList installed extensions
createScaffold a new extension
validateValidate an extension manifest
searchSearch extension catalogs
infoShow detailed extension information
updateUpdate an installed extension
enableEnable a disabled extension
disableDisable an extension without removing it

Options:

OptionDescription
-h, --helpshow this help message and exit

canon extension add

bash
usage: canon extension add [-h] [--dev] source

Arguments:

ArgumentDescription
sourcePath to extension directory

Options:

OptionDescription
-h, --helpshow this help message and exit
--devSymlink instead of copy (dev mode — edits propagate instantly)

canon extension create

bash
usage: canon extension create [-h] [--skill] [--command] [--hook] [--adapter] [--author AUTHOR] [-o OUTPUT] ext_id

Arguments:

ArgumentDescription
ext_idExtension ID (lowercase, hyphens)

Options:

OptionDescription
-h, --helpshow this help message and exit
--skillInclude skill template
--commandInclude command template
--hookInclude hook template
--adapterInclude adapter skeleton
--author AUTHORAuthor name
-o, --output OUTPUTOutput directory (default: ./<ext_id>)
bash
usage: canon extension search [-h] [--tag TAG] [--category CATEGORY] [query]

Arguments:

ArgumentDescription
querySearch query (substring match)

Options:

OptionDescription
-h, --helpshow this help message and exit
--tag TAGFilter by tag
--category CATEGORYFilter by category

canon extension update

bash
usage: canon extension update [-h] [--all] [ext_id]

Arguments:

ArgumentDescription
ext_idExtension ID to update

Options:

OptionDescription
-h, --helpshow this help message and exit
--allUpdate all extensions

canon doctor

Run diagnostic checks on your Canon installation. Checks config (CANON.yaml, .mcp.json, spec files), authentication (Canon token, GitHub CLI), integrations, and MCP server availability.

bash
usage: canon doctor [-h] [--json] [--fix]

Options:

OptionDescription
-h, --helpshow this help message and exit
--jsonJSON output
--fixAttempt to auto-fix issues where possible

AI-native enterprise documentation platform.