| 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 |
--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 |
--lsp |
|
false |
Per-file LSP diagnostics (publishDiagnostics JSON) |
--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 |
--diff-report |
|
false |
Compare against a baseline file: show new/suppressed/resolved clones |
--html-out |
|
|
Write the HTML report to this file (with --html); auto-writes art-dupl-report.html on a terminal |
| 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) |
--min-tokens |
|
0 |
Suppress clone groups with fewer than N tokens (0 = disabled) |
--include-ignored |
|
false |
Include gitignored files (default: honor .gitignore) |
--include-examples |
|
false |
Include examples/, demo/ directories (excluded by default) |
| 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) |
--memory-cache-entries |
|
512 |
AST node slices kept in the in-memory cache layer (requires --incremental) |
--search-workers |
|
0 |
Concurrent suffix-tree search workers (0/1 = sequential, >1 = parallel) |
| Flag |
Short |
Default |
Description |
--dump-tokens |
|
false |
Dump serialized token stream (with line:col positions) and exit |
--timing |
|
false |
Print per-stage timing and allocation statistics after the run |
| Flag |
Short |
Default |
Description |
--explain |
|
false |
Explain each clone group (type, actionability, category, extractability) |
--no-actionability |
|
false |
Disable boilerplate suppression (show all clone groups) |
--show-suppressed |
|
false |
Show suppressed groups for calibration |
--disable-pattern |
|
[] |
Suppress a specific actionability pattern by label (repeatable) |
--list-patterns |
|
false |
List all pattern labels and exit |
--no-accept-directives |
|
false |
Ignore //art-dupl:accept directives in source |
--recommend-threshold |
|
false |
Suggest a threshold from codebase size and exit |
--type-aware |
|
false |
go/types-based detection (same-name methods on different types no longer match; 10-100x slower) |
--suggest-generics |
|
false |
Annotate generics-extraction candidates (does NOT filter) |
--suggest-generics-min-lines |
|
4 |
Minimum lines per generics candidate (0 disables) |
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.
| Flag |
Default |
Description |
--baseline-path |
`` |
Baseline file path (default: .art-dupl-baseline.json) |
art-dupl check [flags] [paths...]
Reports only clones NOT in the baseline. Exits 1 if new clones found.
Also honors --baseline-path (shared with the baseline subcommand).
art-dupl version [--short] [--json]
| Flag |
Description |
--short |
Print only the version string |
--json |
Print structured version info (version/commit/date) |
art-dupl completion [bash|zsh|fish|powershell] # Shell completion
art-dupl version # Version info (subcommand)