[{"data":1,"prerenderedAt":631},["ShallowReactive",2],{"navigation_docs":3,"-guides-dashboard":188,"-guides-dashboard-surround":626},[4,50,82,99,135,157,173,178,183],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":6},"Getting Started",false,"\u002Fgetting-started","1.getting-started",[10,15,20,25,30,35,40,45],{"title":11,"path":12,"stem":13,"icon":14},"Introduction","\u002Fgetting-started\u002Fintroduction","1.getting-started\u002F2.introduction","i-lucide-house",{"title":16,"path":17,"stem":18,"icon":19},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F3.installation","i-lucide-download",{"title":21,"path":22,"stem":23,"icon":24},"Configuration","\u002Fgetting-started\u002Fconfiguration","1.getting-started\u002F4.configuration","i-lucide-settings",{"title":26,"path":27,"stem":28,"icon":29},"Supported Formats","\u002Fgetting-started\u002Fsupported-formats","1.getting-started\u002F5.supported-formats","i-lucide-file-code",{"title":31,"path":32,"stem":33,"icon":34},"Agent Skill","\u002Fgetting-started\u002Fagent-skill","1.getting-started\u002F6.agent-skill","i-lucide-cpu",{"title":36,"path":37,"stem":38,"icon":39},"Changelog","\u002Fgetting-started\u002Fchangelog","1.getting-started\u002F7.changelog","i-lucide-scroll-text",{"title":41,"path":42,"stem":43,"icon":44},"Migrating from v4 to v5","\u002Fgetting-started\u002Fmigration","1.getting-started\u002F8.migration","i-lucide-arrow-right-left",{"title":46,"path":47,"stem":48,"icon":49},"jscpd v4 (TypeScript)","\u002Fgetting-started\u002Fv4","1.getting-started\u002F9.v4","i-simple-icons-typescript",{"title":51,"path":52,"stem":53,"children":54,"icon":6},"Guides","\u002Fguides","2.guides\u002F1.index",[55,57,62,67,72,77],{"title":51,"path":52,"stem":53,"icon":56},"i-lucide-book-open",{"title":58,"path":59,"stem":60,"icon":61},"Types of Code Clones","\u002Fguides\u002Fclone-types","2.guides\u002F2.clone-types","i-lucide-copy",{"title":63,"path":64,"stem":65,"icon":66},"How Detection Works","\u002Fguides\u002Fhow-detection-works","2.guides\u002F3.how-detection-works","i-lucide-scan-search",{"title":68,"path":69,"stem":70,"icon":71},"Duplication Trend over Git History","\u002Fguides\u002Fhistory","2.guides\u002F4.history","i-lucide-chart-no-axes-combined",{"title":73,"path":74,"stem":75,"icon":76},"Project Dashboard","\u002Fguides\u002Fdashboard","2.guides\u002F5.dashboard","i-lucide-layout-dashboard",{"title":78,"path":79,"stem":80,"icon":81},"Project Health Score","\u002Fguides\u002Fhealth","2.guides\u002F6.health","i-lucide-heart-pulse",{"title":83,"path":84,"stem":85,"children":86,"icon":6},"CI & Hooks","\u002Fci-and-hooks","3.ci-and-hooks\u002F1.index",[87,89,94],{"title":83,"path":84,"stem":85,"icon":88},"i-lucide-git-pull-request",{"title":90,"path":91,"stem":92,"icon":93},"Use jscpd in CI","\u002Fci-and-hooks\u002Fci","3.ci-and-hooks\u002F2.ci","i-lucide-github",{"title":95,"path":96,"stem":97,"icon":98},"Use jscpd in Pre-Commit Hook","\u002Fci-and-hooks\u002Fpre-commit","3.ci-and-hooks\u002F3.pre-commit","i-lucide-git-commit",{"title":100,"path":101,"stem":102,"children":103,"icon":105},"Reporters","\u002Freporters","4.reporters\u002F1.index",[104,106,110,115,120,125,130],{"title":100,"path":101,"stem":102,"icon":105},"i-lucide-file-chart-column",{"title":107,"path":108,"stem":109,"icon":29},"HTML Reporter","\u002Freporters\u002Fhtml","4.reporters\u002F2.html",{"title":111,"path":112,"stem":113,"icon":114},"JSON Reporter","\u002Freporters\u002Fjson","4.reporters\u002F3.json","i-lucide-braces",{"title":116,"path":117,"stem":118,"icon":119},"Badge Reporter","\u002Freporters\u002Fbadge","4.reporters\u002F4.badge","i-lucide-award",{"title":121,"path":122,"stem":123,"icon":124},"SARIF Reporter","\u002Freporters\u002Fsarif","4.reporters\u002F5.sarif","i-lucide-shield-check",{"title":126,"path":127,"stem":128,"icon":129},"CodeClimate \u002F GitLab Reporter","\u002Freporters\u002Fcodeclimate","4.reporters\u002F6.codeclimate","i-lucide-flag-triangle-right",{"title":131,"path":132,"stem":133,"icon":134},"OpenMetrics Reporter","\u002Freporters\u002Fopenmetrics","4.reporters\u002F7.openmetrics","i-lucide-activity",{"title":136,"path":137,"stem":138,"children":139,"icon":6},"Benchmarks","\u002Fbenchmarks","5.benchmarks\u002F1.index",[140,142,147,152],{"title":136,"path":137,"stem":138,"icon":141},"i-lucide-gauge",{"title":143,"path":144,"stem":145,"icon":146},"Detection Speed","\u002Fbenchmarks\u002Fdetection-speed","5.benchmarks\u002F2.detection-speed","i-lucide-zap",{"title":148,"path":149,"stem":150,"icon":151},"Multi-Format Detection","\u002Fbenchmarks\u002Fcross-format","5.benchmarks\u002F3.cross-format","i-lucide-layers",{"title":153,"path":154,"stem":155,"icon":156},"AI Token Efficiency","\u002Fbenchmarks\u002Fai-token-efficiency","5.benchmarks\u002F4.ai-token-efficiency","i-lucide-sparkles",{"title":158,"path":159,"stem":160,"children":161,"icon":163},"API","\u002Fapi","6.api\u002F1.index",[162,164,169],{"title":158,"path":159,"stem":160,"icon":163},"i-lucide-code",{"title":165,"path":166,"stem":167,"icon":168},"Rust Crates (v5)","\u002Fapi\u002Fcore","6.api\u002F2.core","i-lucide-box",{"title":170,"path":171,"stem":172,"icon":168},"MCP Server","\u002Fapi\u002Fmcp-server","6.api\u002F4.mcp-server",{"title":174,"path":175,"stem":176,"icon":177},"Trending","\u002Ftrending","7.trending","i-lucide-trending-up",{"title":179,"path":180,"stem":181,"icon":182},"Research","\u002Fresearch","8.research","i-lucide-graduation-cap",{"title":184,"path":185,"stem":186,"icon":187},"Articles","\u002Farticles","9.articles","i-lucide-newspaper",{"id":189,"title":73,"body":190,"description":617,"extension":618,"links":619,"meta":620,"navigation":621,"path":74,"seo":622,"stem":75,"__hash__":625},"docs\u002F2.guides\u002F5.dashboard.md",{"type":191,"value":192,"toc":611},"minimark",[193,202,215,220,283,296,304,308,407,451,455,470,474,507,510,575,607],[194,195,196,197,201],"p",{},"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. ",[198,199,200],"code",{},"--dashboard"," answers all four in one run and prints them on one screen.",[203,204,205,206,210,211,214],"note",{},"Available from jscpd ",[207,208,209],"strong",{},"5.3.0",". The dead-code section covers JavaScript, TypeScript and Python, and Rust when you pass ",[198,212,213],{},"--rust-diagnostics",".",[216,217,219],"h2",{"id":218},"running-it","Running it",[221,222,228],"pre",{"className":223,"code":224,"filename":225,"language":226,"meta":227,"style":227},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","jscpd . --dashboard\njscpd src --dashboard --summary-top 10          # ten rows per list instead of five\njscpd src --dashboard --ignore-identifiers      # count renamed copies too\n","Terminal","bash","",[198,229,230,246,268],{"__ignoreMap":227},[231,232,235,239,243],"span",{"class":233,"line":234},"line",1,[231,236,238],{"class":237},"sBMFI","jscpd",[231,240,242],{"class":241},"sfazB"," .",[231,244,245],{"class":241}," --dashboard\n",[231,247,249,251,254,257,260,264],{"class":233,"line":248},2,[231,250,238],{"class":237},[231,252,253],{"class":241}," src",[231,255,256],{"class":241}," --dashboard",[231,258,259],{"class":241}," --summary-top",[231,261,263],{"class":262},"sbssI"," 10",[231,265,267],{"class":266},"sHwdD","          # ten rows per list instead of five\n",[231,269,271,273,275,277,280],{"class":233,"line":270},3,[231,272,238],{"class":237},[231,274,253],{"class":241},[231,276,256],{"class":241},[231,278,279],{"class":241}," --ignore-identifiers",[231,281,282],{"class":266},"      # count renamed copies too\n",[194,284,285,286,295],{},"On ",[287,288,292],"a",{"href":289,"rel":290},"https:\u002F\u002Fgithub.com\u002Fkucherenko\u002Fjscpd\u002Ftree\u002Fmaster\u002Ffixtures\u002Fdashboard-demo",[291],"nofollow",[198,293,294],{},"fixtures\u002Fdashboard-demo",", a five-file TypeScript service:",[221,297,302],{"className":298,"code":300,"language":301,"meta":227},[299],"language-text","Health  B  74\u002F100  ███████████████░░░░░  93 lines of code (XS)\n  duplication 75 (5.4%) · dead code 72 (14.0%) · complexity 76 (0.0% in complex files)\n\n── Project ─────────────────────────────────────────────────\n  7 files · 383 lines · 2.0K tokens · 3 formats\n  largest: bash 145, markdown 145, typescript 93 lines\n\n── Duplication ─────────────────────────────────────────────\n  1.31% duplicated lines · 1 clone (1 exact)\n  Most duplicated files:\n    DUP%  LINES  PATH\n    45.5      5  src\u002Flabels.ts\n    23.8      5  src\u002Fchecks.ts\n\n── Complexity ──────────────────────────────────────────────\n  25 total · 5.0 mean per file\n  Most complex files:\n    CX  LINES  SIZE  PATH\n    11     35   757  src\u002Frates.ts\n     6     21   665  src\u002Fchecks.ts\n     3     11   409  src\u002Flabels.ts\n     3     10   430  src\u002Flegacy\u002Fmanifest.ts\n     2     16   423  src\u002Findex.ts\n\n── Dead code (JavaScript, TypeScript, Python) ──────────────\n  13.98% unused lines · 2 findings in 5 files\n  1 unused-file · 1 unused-export\n  Largest findings:\n    LINES  CATEGORY       WHERE\n       10  unused-file    src\u002Flegacy\u002Fmanifest.ts\n        3  unused-export  src\u002Fchecks.ts:19 checkBatch\n","text",[198,303,300],{"__ignoreMap":227},[216,305,307],{"id":306},"what-each-section-shows","What each section shows",[309,310,311,324],"table",{},[312,313,314],"thead",{},[315,316,317,321],"tr",{},[318,319,320],"th",{},"Section",[318,322,323],{},"What it reports",[325,326,327,340,350,371,384],"tbody",{},[315,328,329,335],{},[330,331,332],"td",{},[207,333,334],{},"Health",[330,336,337,338],{},"One 0-100 score with a grade, from duplication, dead code and complexity; see ",[287,339,78],{"href":79},[315,341,342,347],{},[330,343,344],{},[207,345,346],{},"Project",[330,348,349],{},"Files, lines and tokens analyzed, and the largest formats by lines",[315,351,352,357],{},[330,353,354],{},[207,355,356],{},"Duplication",[330,358,359,360,363,364,363,367,370],{},"The duplicated-lines percentage, clones per kind (",[198,361,362],{},"exact",", ",[198,365,366],{},"renamed",[198,368,369],{},"similar",") and the files with the largest share of copied lines",[315,372,373,378],{},[330,374,375],{},[207,376,377],{},"Complexity",[330,379,380,381],{},"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 ",[198,382,383],{},"0",[315,385,386,391],{},[330,387,388],{},[207,389,390],{},"Dead code",[330,392,393,394,363,397,363,400,363,403,406],{},"For the languages the run could read: the share of lines nothing runs, findings per category (",[198,395,396],{},"unused-file",[198,398,399],{},"unused-export",[198,401,402],{},"unused-symbol",[198,404,405],{},"unused-import",") and the largest findings",[194,408,409,410,363,413,363,416,363,419,363,422,363,425,428,429,432,433,363,436,428,439,442,443,446,447,450],{},"The options of a normal run apply: ",[198,411,412],{},"--min-tokens",[198,414,415],{},"--ignore",[198,417,418],{},"--format",[198,420,421],{},"--ignore-identifiers",[198,423,424],{},"--max-gap-lines",[198,426,427],{},"--similarity"," and ",[198,430,431],{},"--kind"," shape the duplication section, and ",[198,434,435],{},"--entry",[198,437,438],{},"--dead-code-categories",[198,440,441],{},"--min-confidence"," shape the dead-code section. ",[198,444,445],{},"--summary-top N"," sets the rows per list (default ",[198,448,449],{},"5",").",[216,452,454],{"id":453},"cost","Cost",[194,456,457,458,461,462,465,466,469],{},"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 ",[198,459,460],{},"node_modules",", it takes close to the two scans combined, because they share the CPU. ",[198,463,464],{},"--workers N"," is a budget for the whole run — the two scans take half of it each — and ",[198,467,468],{},"--workers 1"," runs them one after the other.",[216,471,473],{"id":472},"exit-codes","Exit codes",[194,475,476,477,480,481,484,485,488,489,492,493,363,496,428,499,502,503,506],{},"A dashboard run is gated like a clone run: ",[198,478,479],{},"--threshold"," compares the duplication percentage, ",[198,482,483],{},"--exit-code"," is returned when clones were found, and ",[198,486,487],{},"--fail-on-empty"," fails a scan that analyzed nothing, so ",[198,490,491],{},"jscpd . --dashboard --threshold 3"," works in CI. The baseline options are the exception: ",[198,494,495],{},"--baseline",[198,497,498],{},"--baseline-from-ref",[198,500,501],{},"--update-baseline"," need the clone report the dashboard does not write, so they warn and are ignored, and ",[198,504,505],{},"--fail-on-new-clones"," is refused instead of passing silently.",[194,508,509],{},"When you only need one part, use the dedicated run:",[309,511,512,522],{},[312,513,514],{},[315,515,516,519],{},[318,517,518],{},"Question",[318,520,521],{},"Command",[325,523,524,534,545,555,565],{},[315,525,526,529],{},[330,527,528],{},"How healthy is the project, in one number?",[330,530,531],{},[198,532,533],{},"jscpd src --health",[315,535,536,539],{},[330,537,538],{},"Which files are the most complex?",[330,540,541,544],{},[198,542,543],{},"jscpd src --complexity"," (no clone detection)",[315,546,547,550],{},[330,548,549],{},"Where is the duplication?",[330,551,552],{},[198,553,554],{},"jscpd src --summary",[315,556,557,560],{},[330,558,559],{},"Which clones are renamed copies?",[330,561,562],{},[198,563,564],{},"jscpd src --ignore-identifiers --kind renamed",[315,566,567,570],{},[330,568,569],{},"What does nothing run?",[330,571,572],{},[198,573,574],{},"jscpd src --dead-code",[194,576,577,580,581,363,584,587,588,591,592,595,596,599,600,603,604,214],{},[198,578,579],{},"--reporters json"," writes every section of the screen to ",[198,582,583],{},"jscpd-dashboard.json",[198,585,586],{},"--reporters badge"," writes the health badge as ",[198,589,590],{},"jscpd-health-badge.svg",", and ",[198,593,594],{},"--reporters markdown,html"," write the same sections to ",[198,597,598],{},"jscpd-dashboard.md","\u002F",[198,601,602],{},".html"," — handy for a PR comment or a static status page. Clone lists and dead-code findings still come from the regular ",[287,605,606],{"href":101},"reporters",[608,609,610],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":227,"searchDepth":248,"depth":248,"links":612},[613,614,615,616],{"id":218,"depth":248,"text":219},{"id":306,"depth":248,"text":307},{"id":453,"depth":248,"text":454},{"id":472,"depth":248,"text":473},"One screen with a project's size, duplication, complexity and dead code, from a single jscpd --dashboard run.","md",null,{},{"icon":76},{"title":623,"description":624},"Project Dashboard with jscpd --dashboard","jscpd --dashboard prints project size, duplication by clone kind, the most duplicated and most complex files, and dead code on one terminal screen.","5wLYCOXEG4gtI4VgmEyClWjfYbMC501zD__JMvRAoMg",[627,629],{"title":68,"path":69,"stem":70,"description":628,"icon":71,"children":-1},"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.",{"title":78,"path":79,"stem":80,"description":630,"icon":81,"children":-1},"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.",1790314232584]