CLI Reference
Complete documentation for all Mutagoph commands and flags.
Commands
| Command |
Description |
run |
Run mutation testing |
watch |
Watch mode - continuous testing |
report |
Generate reports from JSON results |
version |
Print version information |
help |
Show help message |
mutagoph run
Run mutation testing on target packages.
Target Selection
| Flag |
Default |
Description |
--target |
./... |
Package pattern to mutate |
--files |
- |
Specific files to mutate (comma-separated) |
--lines |
- |
Specific lines to mutate (file:line format) |
--diff-base |
- |
Git ref to diff against (e.g., main, HEAD~1) |
Mutation Settings
| Flag |
Default |
Description |
--mutations |
mutilated |
Mutation set: lite, standard, thorough, mutilated |
--timeout |
30s |
Timeout per mutant test |
Parallelism
| Flag |
Default |
Description |
--parallelism |
dynamic |
Level: low, medium, high, mutilated, dynamic |
--dynamic-level |
balanced |
Sub-level: minimal, balanced, comprehensive, mutilated |
Output
| Flag |
Default |
Description |
--output |
terminal |
Format: terminal, json, html |
--output-file |
- |
Output file path (default: stdout) |
Filtering
| Flag |
Default |
Description |
--exclude-generated |
true |
Exclude generated code |
--exclude-vendor |
true |
Exclude vendor directory |
--coverage-filter |
false |
Skip testing uncovered code (shown as Naked) |
Caching
| Flag |
Default |
Description |
--cache |
true |
Enable caching |
--cache-dir |
~/.cache/mutagoph |
Cache directory |
--clear-cache |
false |
Clear cache before running |
Quality Gate
| Flag |
Default |
Description |
--min-score |
0 |
Minimum mutation score threshold (0-100) |
mutagoph watch
Watch for file changes and re-run mutation testing.
| Flag |
Default |
Description |
--target |
./... |
Package pattern to mutate |
--mutations |
lite |
Mutation set (defaults to lite for speed) |
--parallelism |
low |
Parallelism level |
--interval |
2s |
Polling interval |
--timeout |
30s |
Timeout per mutant |
mutagoph report
Generate reports from saved JSON results.
mutagoph report --input results.json --format html --output report.html
| Flag |
Description |
--input |
Input JSON results file (required) |
--format |
Output format: terminal, html |
--output |
Output file path |
Examples
# Basic run
mutagoph run
# Test specific package with standard mutations
mutagoph run --target ./internal/parser --mutations standard
# Generate HTML report
mutagoph run --output html --output-file report.html
# CI mode: diff-based with quality gate
mutagoph run --diff-base origin/main --min-score 80
# Fast mode: skip testing uncovered code
mutagoph run --coverage-filter
# Combined: diff-based + coverage filter for fastest CI
mutagoph run --diff-base origin/main --coverage-filter --min-score 80
# Watch mode for development
mutagoph watch --mutations lite