All commands are offline-first. Charter makes no network calls and never sends your code anywhere.
Commands
doctor
Scan a repo, evaluate all rules, and compute an AI-agent-readiness score.
init
Scaffold missing agent context files into a repo with create-missing-only safety.
fix
Preview and apply diff-first auto-repair for supported findings.
report
Generate a shareable, self-contained offline HTML report artifact.
explain
Look up a rule by ID and print its catalog metadata.
suppress
Record a governed suppression entry in
.charter-suppress.yml.version
Print build metadata for the currently installed binary.
Exit Codes
| Code | Meaning | When |
|---|---|---|
0 | Pass | Score ≥ threshold, or non-gating commands (report, explain, version) completed successfully |
1 | Fail | Score < threshold, or --rule fired at least one matching finding |
2 | Error | Invalid flags, unknown rule ID, scan failure, not a TTY for -i, malformed config |
Global Flags
These flags are shared across most commands.Explicit repository root to scan. Defaults to the current working directory.
Minimum passing score. Overrides the value set in
charter.yaml when provided. Used by doctor for gating; reflected in report output but does not gate the report write.Output format. Available values depend on the command:
doctor supports all four; report supports html, markdown, and json; explain and version support text and json.Write rendered output to a file instead of stdout. Supported by
doctor and report.Silent on pass; emits one summary line on fail. Applies to
doctor text output only — JSON, Markdown, and SARIF still emit the full payload.Typical Workflows
- Local development
- CI gate
- SARIF upload