Other commands
Analysis and ops commands that are not the golden path (init → check → suggest → record). Each section is synopsis + flags + one example — scan, don’t scroll a tutorial.
Command index
Section titled “Command index”| Command | One-liner |
|---|---|
pr-comment |
Post coverage as a PR/MR comment |
compare |
Diff two coverage profiles |
badge |
Write an SVG coverage badge |
trend |
Show history trend |
record |
Append a history snapshot |
suggest |
Propose domain thresholds |
debt |
Rank coverage gaps |
ignore |
List exclude patterns |
detect |
Autodetect domains / write config |
mcp |
MCP server / doctor |
version / help |
Meta |
pr-comment
Section titled “pr-comment”coverctl pr-comment [flags]Posts a coverage report on GitHub, GitLab, or Bitbucket. Prefer CI after coverctl check.
| Flag | Description | Default |
|---|---|---|
-c, --config |
Config path | .coverctl.yaml |
-p, --profile |
Coverage profile | .cover/coverage.out |
--base-profile |
Base profile for deltas | |
--provider |
github / gitlab / bitbucket / auto |
auto |
--pr |
PR/MR number | auto-detected |
--owner / --repo |
Repository identity | auto-detected |
--update |
Update existing coverctl comment | true |
--dry-run |
Print body without posting | false |
coverctl pr-comment --pr 123 --dry-runProvider tokens: GITHUB_TOKEN, GITLAB_TOKEN / CI_JOB_TOKEN, or BITBUCKET_TOKEN (+ workspace/repo vars).
compare
Section titled “compare”coverctl compare --base <profile> [--head <profile>]| Flag | Description | Default |
|---|---|---|
--base |
Base profile (required) | |
--head |
Head profile | .cover/coverage.out |
-o, --output |
text / json |
text |
coverctl compare --base main.out --head .cover/coverage.out -o jsoncoverctl badge [flags]| Flag | Description | Default |
|---|---|---|
-p, --profile |
Coverage profile | .cover/coverage.out |
-o, --output |
SVG path | coverage.svg |
--label |
Badge label | coverage |
--style |
flat / flat-square |
flat |
coverctl badge -o docs/badge.svg --style flat-squarecoverctl trend [flags]| Flag | Description | Default |
|---|---|---|
--history |
History file | .cover/history.json |
-o, --output |
text / json |
text |
coverctl trend -o jsonrecord
Section titled “record”coverctl record [flags]Prefer profiles from coverctl check / coverctl run so history matches policy instrumentation.
| Flag | Description | Default |
|---|---|---|
-p, --profile |
Coverage profile | .cover/coverage.out |
--history |
History file | .cover/history.json |
--commit / --branch |
Git metadata | auto-detected |
--run |
Run coverage before recording | false |
-l, --language |
Override language detection | auto |
coverctl record --commit "$GITHUB_SHA" --branch "$GITHUB_REF_NAME"suggest
Section titled “suggest”coverctl suggest [--strategy current|aggressive|conservative]| Strategy | Behavior |
|---|---|
current |
Thresholds slightly below observed coverage |
aggressive |
Push targets up |
conservative |
Smaller incremental mins |
coverctl suggest --strategy currentcoverctl debt [flags]Ranks files/domains by shortfall vs policy. Use after a failing check to decide where to write tests.
coverctl debt -o jsonignore
Section titled “ignore”coverctl ignoreLists exclude patterns from .coverctl.yaml and matching files.
detect
Section titled “detect”coverctl detect [--dry-run] [--force]Non-interactive domain detection (sibling of coverctl init --no-interactive).
coverctl detect --dry-runcoverctl mcp serve [--mode=agent|ci|auto] [--mcp-telemetry]coverctl mcp doctorAgent mode advertises check / suggest / debt. Use --mode=ci for the full tool surface. doctor validates MCP wiring end-to-end. Full contract: MCP server.
version
Section titled “version”coverctl versioncoverctl help [command]coverctl check --helpExit codes
Section titled “Exit codes”Same family as the rest of the CLI: 0 success, 1 policy/soft failure, 2 usage/config, 3 runner failure (where applicable).