Commands & Flags¶
trep <command> [flags] [args]
Commands:
test Parse test results → HTML report
cov Parse coverage data → HTML report
report Parse both → two linked HTML pages
completion Generate shell completion script
trep test¶
Parse one or more test result files into an HTML report.
Use - as the file argument to read from stdin.
| Flag | Short | Default | Description |
|---|---|---|---|
--output |
-o |
<input>.html |
Output file; - for stdout |
--output-format |
html |
Output format: html · json · sarif |
|
--title |
-t |
derived | Report title |
--no-merge |
false |
One report per input instead of merging | |
--fail |
false |
Exit 1 when any tests failed | |
--open |
false |
Open in browser after writing | |
--quiet |
-q |
false |
Suppress stderr output |
--annotate |
false |
Emit CI annotations for failed tests (GitHub/GitLab auto-detected) | |
--annotate-platform |
auto |
Annotation platform: auto · github · gitlab |
|
--save-snapshot |
Write JSON snapshot for future delta comparison | ||
--baseline |
JSON snapshot from a previous run (enables delta badges) | ||
--baseline-label |
Human label for the baseline (e.g. main) |
trep cov¶
Parse a coverage data file into an HTML report.
| Flag | Short | Default | Description |
|---|---|---|---|
--output |
-o |
<input>.html |
Output file; - for stdout |
--output-format |
html |
Output format: html · json · sarif |
|
--format |
-f |
auto |
Force input format: lcov · gocover · cobertura · clover |
--title |
-t |
derived | Report title |
--threshold |
0 (off) |
Minimum line coverage %; alias for --threshold-line |
|
--threshold-line |
0 (off) |
Minimum line coverage %; draws red marker | |
--threshold-branch |
0 (off) |
Minimum branch coverage % | |
--threshold-func |
0 (off) |
Minimum function coverage % | |
--fail |
false |
Exit 1 if any enabled threshold is not met | |
--strip-prefix |
Remove path prefix from all file paths | ||
--exclude |
Glob patterns to exclude (repeatable; vendor/** excludes a tree) |
||
--open |
false |
Open in browser after writing | |
--quiet |
-q |
false |
Suppress stderr output |
--annotate |
false |
Emit CI annotations for files below threshold | |
--annotate-platform |
auto |
Annotation platform: auto · github · gitlab |
|
--save-snapshot |
Write JSON snapshot | ||
--baseline |
Previous snapshot (enables delta badges) | ||
--baseline-label |
Human label for the baseline |
trep report¶
Parse test results and coverage data in a single pass, producing two cross-linked HTML pages.
| Flag | Short | Default | Description |
|---|---|---|---|
--tests |
required | Test result file(s) | |
--cov |
required | Coverage file | |
--format-test |
auto |
Force test format | |
--format-cov |
auto |
Force coverage format | |
--output-dir |
. |
Directory to write both files into | |
--prefix |
report |
Filename prefix (report → report_tests.html + report_cov.html) |
|
--title |
-t |
Title applied to both pages | |
--threshold |
0 |
Minimum line coverage % for --fail-cov |
|
--fail-tests |
false |
Exit 1 if any tests failed | |
--fail-cov |
false |
Exit 1 if coverage below threshold | |
--strip-prefix |
Remove path prefix from coverage file paths | ||
--open |
false |
Open both reports in browser | |
--quiet |
-q |
false |
Suppress stderr output |
--annotate |
false |
Emit CI annotations for failures and low-coverage files | |
--annotate-platform |
auto |
Annotation platform: auto · github · gitlab |
|
--save-snapshot |
Write combined JSON snapshot | ||
--baseline |
Previous snapshot | ||
--baseline-label |
Baseline label |
trep completion¶
Generate shell completion scripts.
Supported shells: bash, zsh, fish, powershell.
Global flags¶
| Flag | Description |
|---|---|
--version |
Print version and exit |
--help, -h |
Show help |