Project Dashboard
A clone report answers one question. When you open an unfamiliar codebase, or check where a project stands before a refactoring, you want several at once: how big it is, how much of it is copied, where the complexity sits, and what nothing runs. --dashboard answers all four in one run and prints them on one screen.
Running it
jscpd . --dashboard
jscpd src --dashboard --summary-top 10 # ten rows per list instead of five
jscpd src --dashboard --ignore-identifiers # count renamed copies too
On fixtures/dashboard-demo, a five-file TypeScript service:
Health B 74/100 ███████████████░░░░░ 93 lines of code (XS)
duplication 75 (5.4%) · dead code 72 (14.0%) · complexity 76 (0.0% in complex files)
── Project ─────────────────────────────────────────────────
7 files · 383 lines · 2.0K tokens · 3 formats
largest: bash 145, markdown 145, typescript 93 lines
── Duplication ─────────────────────────────────────────────
1.31% duplicated lines · 1 clone (1 exact)
Most duplicated files:
DUP% LINES PATH
45.5 5 src/labels.ts
23.8 5 src/checks.ts
── Complexity ──────────────────────────────────────────────
25 total · 5.0 mean per file
Most complex files:
CX LINES SIZE PATH
11 35 757 src/rates.ts
6 21 665 src/checks.ts
3 11 409 src/labels.ts
3 10 430 src/legacy/manifest.ts
2 16 423 src/index.ts
── Dead code (JavaScript, TypeScript, Python) ──────────────
13.98% unused lines · 2 findings in 5 files
1 unused-file · 1 unused-export
Largest findings:
LINES CATEGORY WHERE
10 unused-file src/legacy/manifest.ts
3 unused-export src/checks.ts:19 checkBatch
What each section shows
| Section | What it reports |
|---|---|
| Health | One 0-100 score with a grade, from duplication, dead code and complexity; see Project Health Score |
| Project | Files, lines and tokens analyzed, and the largest formats by lines |
| Duplication | The duplicated-lines percentage, clones per kind (exact, renamed, similar) and the files with the largest share of copied lines |
| Complexity | Total and mean complexity per file, and the most complex files. Complexity is one path per function plus one per branch, counted from the token stream; prose and data files score 0 |
| Dead code | For JavaScript, TypeScript and Python: the share of lines nothing runs, findings per category (unused-file, unused-export, unused-symbol, unused-import) and the largest findings |
The options of a normal run apply: --min-tokens, --ignore, --format, --ignore-identifiers, --max-gap-lines, --similarity and --kind shape the duplication section, and --entry, --dead-code-categories and --min-confidence shape the dead-code section. --summary-top N sets the rows per list (default 5).
Cost
The dashboard runs a clone scan and a dead-code scan side by side. On a normal project that takes well under a second. On a very large tree, such as a 565 MB node_modules, it takes close to the two scans combined, because they share the CPU. --workers N is a budget for the whole run — the two scans take half of it each — and --workers 1 runs them one after the other.
Exit codes
A dashboard run is gated like a clone run: --threshold compares the duplication percentage, --exit-code is returned when clones were found, and --fail-on-empty fails a scan that analyzed nothing, so jscpd . --dashboard --threshold 3 works in CI. The baseline options are the exception: --baseline, --baseline-from-ref and --update-baseline need the clone report the dashboard does not write, so they warn and are ignored, and --fail-on-new-clones is refused instead of passing silently.
When you only need one part, use the dedicated run:
| Question | Command |
|---|---|
| How healthy is the project, in one number? | jscpd src --health |
| Which files are the most complex? | jscpd src --complexity (no clone detection) |
| Where is the duplication? | jscpd src --summary |
| Which clones are renamed copies? | jscpd src --ignore-identifiers --kind renamed |
| What does nothing run? | jscpd src --dead-code |
--reporters json writes every section of the screen to jscpd-dashboard.json, --reporters badge writes the health badge as jscpd-health-badge.svg, and --reporters markdown,html write the same sections to jscpd-dashboard.md/.html — handy for a PR comment or a static status page. Clone lists and dead-code findings still come from the regular reporters.
Duplication Trend over Git History
Scan every commit in a range with --history and see whether duplication is going up or down, as a chart and a table in the terminal.
Project Health Score
One 0-100 score with a grade for a codebase, from how much of it is duplicated, dead or concentrated in complex files, extensible with coverage, test and security metrics.