Skip to content

CLI Overview

coverctl provides a comprehensive CLI for managing test coverage across 15 supported languages.

These flags work with all commands:

FlagDescription
-q, --quietSuppress non-essential output
--no-colorDisable colored output
--ciCI mode: quiet + no-color + GitHub Actions annotations
-h, --helpShow help for any command
CommandDescription
checkRun coverage and enforce policy
runRun coverage without policy enforcement
watchWatch for changes and re-run coverage
reportAnalyze an existing coverage profile
CommandDescription
initInteractive setup wizard
detectAuto-detect domains and write config
CommandDescription
badgeGenerate SVG coverage badge
trendShow coverage trends over time
recordRecord coverage to history
suggestSuggest optimal coverage thresholds
debtShow coverage debt report
ignoreShow configured excludes

See Other Commands for details on analysis commands.

Most commands accept these flags:

FlagDescription
-c, --configConfig file path (default: .coverctl.yaml)
-p, --profileCoverage profile path
-d, --domainFilter to specific domain (repeatable)
-o, --outputOutput format: text, json, html

The check, run, and watch commands support test flags (Go-specific flags are passed through to go test; other languages use their native test runners):

FlagDescription
--tagsBuild tags (e.g., integration,e2e)
--raceEnable race detector
--shortSkip long-running tests
-vVerbose test output
--runRun only tests matching pattern
--timeoutTest timeout (e.g., 10m, 1h)
--test-argAdditional go test argument (repeatable)

See Build Flags Guide for examples.

CodeMeaning
0Success
1Policy violation or coverage below threshold
2Invalid arguments or configuration error
3Test or coverage generation failure
Terminal window
# Basic coverage check
coverctl check
# Check specific domains with JSON output
coverctl check -d core -d api -o json
# Run with integration test tags
coverctl check --tags integration --timeout 30m
# Generate HTML report
coverctl report -o html > coverage.html
# Watch mode during development
coverctl watch -d core