Skip to main content
Charter is a single-binary, offline-first Go CLI for scoring a repository’s AI-agent readiness. It makes no network calls and never sends your code anywhere.
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

CodeMeaningWhen
0PassScore ≥ threshold, or non-gating commands (report, explain, version) completed successfully
1FailScore < threshold, or --rule fired at least one matching finding
2ErrorInvalid flags, unknown rule ID, scan failure, not a TTY for -i, malformed config

Global Flags

These flags are shared across most commands.
--path
string
Explicit repository root to scan. Defaults to the current working directory.
--threshold
int
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.
--format
text | json | markdown | sarif
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.
--out
string
Write rendered output to a file instead of stdout. Supported by doctor and report.
--quiet
boolean
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

charter doctor --path . --threshold 80