| Flag |
Short |
Default |
Description |
--threshold |
-t |
5 |
Minimum duplicated statements to report |
--detection-methods |
-m |
art-dupl |
Detection method(s): art-dupl, hash |
--sort |
-s |
size |
Sort: size, occurrence, hash, total-tokens |
--semantic |
|
true |
Match by structure AND alpha-normalized identifiers (default) |
--exact |
|
false |
Verbatim name matching (Type 1 only) |
--structural |
|
false |
AST shape only (loosest matching) |
--config |
-c |
|
Path to JSON config file |
--verbose |
-v |
false |
Verbose logging (repeat for more) |
--quiet |
-q |
false |
Suppress non-essential status output |
--no-color |
|
false |
Disable colored output |
--version |
|
|
Show version |
--files |
-f |
false |
Read file paths from stdin, one per line |
| Flag |
Short |
Default |
Description |
--html |
|
false |
HTML report with syntax highlighting |
--json |
-j |
false |
Structured JSON with statistics |
--simple-json |
|
false |
Lightweight JSON with impact scores |
--sarif |
|
false |
SARIF 2.1.0 format |
--plumbing |
-p |
false |
Machine-readable file:startLine-endLine |
--rich-text |
|
false |
Enhanced text with priority badges |
--all |
-a |
false |
Generate all formats |
--output-dir |
-o |
reports/art-dupl |
Output directory (used with --all) |
--diff |
|
|
Diff visualization: side-by-side, inline, or true |
| Flag |
Short |
Default |
Description |
--vendor |
|
false |
Include vendor directory |
--include-node-modules |
|
false |
Include node_modules (hash detection only) |
--include-generated |
|
[] |
Generated categories: sqlc, templ, protobuf, mockgen, stringer, generic, all |
--include-pattern |
|
[] |
Glob patterns to include |
--exclude-pattern |
|
[] |
Glob patterns to exclude |
--only |
|
|
Restrict to go or templ |
--ignore-tests |
|
false |
Exclude *_test.go files entirely |
--include-tests |
|
false |
Override all test-specific filtering and analyze tests normally |
--test-threshold |
|
0 |
Separate threshold for test files (0 = max(30, threshold)) |
--suppress-test-low |
|
true |
Suppress low-priority clones in test files |
--min-lines |
|
0 |
Suppress clone groups spanning fewer than N source lines (0 = disabled) |
| Flag |
Short |
Default |
Description |
--workers |
|
0 |
Concurrent workers (0 = auto-detect) |
--incremental |
|
false |
Enable AST caching |
--cache-dir |
|
"" |
Cache directory (default: .cache/art-dupl) |
--clear-cache |
|
false |
Clear cache before running |
--max-cache-entries |
|
0 |
Max cached AST files to keep (0 = unlimited) |
--timeout |
|
30m |
Execution timeout (hidden in --help) |
--profile |
|
false |
Emit pprof CPU and memory profiles (hidden in --help) |
| Flag |
Short |
Default |
Description |
--dump-tokens |
|
false |
Dump serialized token stream and exit |
art-dupl stats [flags] [paths...]
| Flag |
Default |
Description |
--format |
text |
Output format: text, json, csv |
--output-file |
|
Write stats output to file |
art-dupl baseline [flags] [paths...]
Records current clones to .art-dupl-baseline.json.
art-dupl check [flags] [paths...]
Reports only clones NOT in the baseline. Exits 1 if new clones found.
art-dupl completion [bash|zsh|fish|powershell] # Shell completion
art-dupl --version # Version info