[{"data":1,"prerenderedAt":628},["ShallowReactive",2],{"navigation_docs":3,"-guides-dashboard":188,"-guides-dashboard-surround":623},[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":614,"extension":615,"links":616,"meta":617,"navigation":618,"path":74,"seo":619,"stem":75,"__hash__":622},"docs\u002F2.guides\u002F5.dashboard.md",{"type":191,"value":192,"toc":608},"minimark",[193,202,211,216,279,292,300,304,403,447,451,466,470,503,506,571,604],[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],"note",{},"Available from jscpd ",[207,208,209],"strong",{},"5.3.0",". The dead-code section covers JavaScript, TypeScript and Python.",[212,213,215],"h2",{"id":214},"running-it","Running it",[217,218,224],"pre",{"className":219,"code":220,"filename":221,"language":222,"meta":223,"style":223},"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,225,226,242,264],{"__ignoreMap":223},[227,228,231,235,239],"span",{"class":229,"line":230},"line",1,[227,232,234],{"class":233},"sBMFI","jscpd",[227,236,238],{"class":237},"sfazB"," .",[227,240,241],{"class":237}," --dashboard\n",[227,243,245,247,250,253,256,260],{"class":229,"line":244},2,[227,246,234],{"class":233},[227,248,249],{"class":237}," src",[227,251,252],{"class":237}," --dashboard",[227,254,255],{"class":237}," --summary-top",[227,257,259],{"class":258},"sbssI"," 10",[227,261,263],{"class":262},"sHwdD","          # ten rows per list instead of five\n",[227,265,267,269,271,273,276],{"class":229,"line":266},3,[227,268,234],{"class":233},[227,270,249],{"class":237},[227,272,252],{"class":237},[227,274,275],{"class":237}," --ignore-identifiers",[227,277,278],{"class":262},"      # count renamed copies too\n",[194,280,281,282,291],{},"On ",[283,284,288],"a",{"href":285,"rel":286},"https:\u002F\u002Fgithub.com\u002Fkucherenko\u002Fjscpd\u002Ftree\u002Fmaster\u002Ffixtures\u002Fdashboard-demo",[287],"nofollow",[198,289,290],{},"fixtures\u002Fdashboard-demo",", a five-file TypeScript service:",[217,293,298],{"className":294,"code":296,"language":297,"meta":223},[295],"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,299,296],{"__ignoreMap":223},[212,301,303],{"id":302},"what-each-section-shows","What each section shows",[305,306,307,320],"table",{},[308,309,310],"thead",{},[311,312,313,317],"tr",{},[314,315,316],"th",{},"Section",[314,318,319],{},"What it reports",[321,322,323,336,346,367,380],"tbody",{},[311,324,325,331],{},[326,327,328],"td",{},[207,329,330],{},"Health",[326,332,333,334],{},"One 0-100 score with a grade, from duplication, dead code and complexity; see ",[283,335,78],{"href":79},[311,337,338,343],{},[326,339,340],{},[207,341,342],{},"Project",[326,344,345],{},"Files, lines and tokens analyzed, and the largest formats by lines",[311,347,348,353],{},[326,349,350],{},[207,351,352],{},"Duplication",[326,354,355,356,359,360,359,363,366],{},"The duplicated-lines percentage, clones per kind (",[198,357,358],{},"exact",", ",[198,361,362],{},"renamed",[198,364,365],{},"similar",") and the files with the largest share of copied lines",[311,368,369,374],{},[326,370,371],{},[207,372,373],{},"Complexity",[326,375,376,377],{},"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,378,379],{},"0",[311,381,382,387],{},[326,383,384],{},[207,385,386],{},"Dead code",[326,388,389,390,359,393,359,396,359,399,402],{},"For JavaScript, TypeScript and Python: the share of lines nothing runs, findings per category (",[198,391,392],{},"unused-file",[198,394,395],{},"unused-export",[198,397,398],{},"unused-symbol",[198,400,401],{},"unused-import",") and the largest findings",[194,404,405,406,359,409,359,412,359,415,359,418,359,421,424,425,428,429,359,432,424,435,438,439,442,443,446],{},"The options of a normal run apply: ",[198,407,408],{},"--min-tokens",[198,410,411],{},"--ignore",[198,413,414],{},"--format",[198,416,417],{},"--ignore-identifiers",[198,419,420],{},"--max-gap-lines",[198,422,423],{},"--similarity"," and ",[198,426,427],{},"--kind"," shape the duplication section, and ",[198,430,431],{},"--entry",[198,433,434],{},"--dead-code-categories",[198,436,437],{},"--min-confidence"," shape the dead-code section. ",[198,440,441],{},"--summary-top N"," sets the rows per list (default ",[198,444,445],{},"5",").",[212,448,450],{"id":449},"cost","Cost",[194,452,453,454,457,458,461,462,465],{},"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,455,456],{},"node_modules",", it takes close to the two scans combined, because they share the CPU. ",[198,459,460],{},"--workers N"," is a budget for the whole run — the two scans take half of it each — and ",[198,463,464],{},"--workers 1"," runs them one after the other.",[212,467,469],{"id":468},"exit-codes","Exit codes",[194,471,472,473,476,477,480,481,484,485,488,489,359,492,424,495,498,499,502],{},"A dashboard run is gated like a clone run: ",[198,474,475],{},"--threshold"," compares the duplication percentage, ",[198,478,479],{},"--exit-code"," is returned when clones were found, and ",[198,482,483],{},"--fail-on-empty"," fails a scan that analyzed nothing, so ",[198,486,487],{},"jscpd . --dashboard --threshold 3"," works in CI. The baseline options are the exception: ",[198,490,491],{},"--baseline",[198,493,494],{},"--baseline-from-ref",[198,496,497],{},"--update-baseline"," need the clone report the dashboard does not write, so they warn and are ignored, and ",[198,500,501],{},"--fail-on-new-clones"," is refused instead of passing silently.",[194,504,505],{},"When you only need one part, use the dedicated run:",[305,507,508,518],{},[308,509,510],{},[311,511,512,515],{},[314,513,514],{},"Question",[314,516,517],{},"Command",[321,519,520,530,541,551,561],{},[311,521,522,525],{},[326,523,524],{},"How healthy is the project, in one number?",[326,526,527],{},[198,528,529],{},"jscpd src --health",[311,531,532,535],{},[326,533,534],{},"Which files are the most complex?",[326,536,537,540],{},[198,538,539],{},"jscpd src --complexity"," (no clone detection)",[311,542,543,546],{},[326,544,545],{},"Where is the duplication?",[326,547,548],{},[198,549,550],{},"jscpd src --summary",[311,552,553,556],{},[326,554,555],{},"Which clones are renamed copies?",[326,557,558],{},[198,559,560],{},"jscpd src --ignore-identifiers --kind renamed",[311,562,563,566],{},[326,564,565],{},"What does nothing run?",[326,567,568],{},[198,569,570],{},"jscpd src --dead-code",[194,572,573,576,577,359,580,583,584,587,588,591,592,595,596,599,600,603],{},[198,574,575],{},"--reporters json"," writes every section of the screen to ",[198,578,579],{},"jscpd-dashboard.json",[198,581,582],{},"--reporters badge"," writes the health badge as ",[198,585,586],{},"jscpd-health-badge.svg",", and ",[198,589,590],{},"--reporters markdown,html"," write the same sections to ",[198,593,594],{},"jscpd-dashboard.md","\u002F",[198,597,598],{},".html"," — handy for a PR comment or a static status page. Clone lists and dead-code findings still come from the regular ",[283,601,602],{"href":101},"reporters",".",[605,606,607],"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":223,"searchDepth":244,"depth":244,"links":609},[610,611,612,613],{"id":214,"depth":244,"text":215},{"id":302,"depth":244,"text":303},{"id":449,"depth":244,"text":450},{"id":468,"depth":244,"text":469},"One screen with a project's size, duplication, complexity and dead code, from a single jscpd --dashboard run.","md",null,{},{"icon":76},{"title":620,"description":621},"Project Dashboard with jscpd --dashboard","jscpd --dashboard prints project size, duplication by clone kind, the most duplicated and most complex files, and dead code for JavaScript, TypeScript and Python on one terminal screen.","TOngb7tgXyF4ISC_FcMvlisZ6weCTmMua4l8lKEPrRQ",[624,626],{"title":68,"path":69,"stem":70,"description":625,"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":627,"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.",1789749595683]