charter doctor is the primary Charter command. It resolves the target repository, loads the effective score threshold from charter.yaml or the --threshold flag, evaluates the full rule set, renders the result, and exits with a code that is safe to use in local workflows, pre-commit hooks, and CI pipelines.
Usage

Flags
Explicit repository root to scan. Defaults to the current working directory.
Minimum passing score. Overrides the threshold or profile value in
charter.yaml when provided.Output format. Defaults to
text. In a TTY, text renders styled terminal output; when piped or redirected, it falls back to a plain byte-stable stream.Write the rendered output to a file instead of stdout.
Comma-separated rule IDs for a scoped text-only view. Omits the overall score and exits
1 if any named rule fired. Incompatible with --interactive.Suppress non-failure output. Useful in hooks and CI. Applies to text output only — JSON, Markdown, and SARIF still emit the full payload.
Color output mode for text rendering. Defaults to
auto.Disable color. Equivalent to
--color=never and wins over --color when both are set.Open the interactive TUI. Requires a real terminal — exits with code
2 if stdin is not a TTY.Output Formats
- Text (default)
- JSON
- Markdown
- SARIF
Styled terminal output with a category scorecard, per-finding evidence rows, and a score hero at the bottom. In a TTY, Charter renders color and box-drawing characters. When stdout is piped or redirected, it falls back to a plain, byte-stable stream safe for log capture.
Interactive TUI
charter doctor -i opens a full-screen terminal UI over a single scan result. It is a browser over the findings, not a different scan engine.

--out, --quiet, non-text --format, or --rule.
-i requires a real TTY. It exits with code 2 if stdin is not a terminal.Exit Codes
| Code | Meaning | When |
|---|---|---|
0 | Pass | Score ≥ threshold, or --rule view found no matching findings |
1 | Fail | Score < threshold, or --rule view found at least one matching finding |
2 | Error | Invalid --format, unknown rule ID in --rule, --interactive on non-TTY, malformed charter.yaml, unreadable files |