🌐
npm
npmjs.com β€Ί package β€Ί jscpd
jscpd - npm
3 weeks ago - # npm β€” installs the jscpd command npm install -g jscpd # crates.io β€” installs both jscpd and cpd binaries cargo install jscpd # Nix β€” run without installing nix run github:kucherenko/jscpd -- /path/to/code # Nix β€” install permanently ...
      Β» npm install jscpd
    
Published Β  Jul 08, 2026
Version Β  5.0.12
🌐
CodeSandbox
codesandbox.io β€Ί examples β€Ί package β€Ί jscpd
jscpd examples - CodeSandbox
Use this online jscpd playground to view and fork jscpd example apps and templates on CodeSandbox.
🌐
jscpd
jscpd.dev
jscpd - Copy/Paste Detector for Source Code - jscpd
Andrey Kucherenko believes that every copy-pasted code block is a bug waiting to happen twice. He built jscpd so you don't have to fix the same issue in five files.
🌐
UNPKG
unpkg.com β€Ί browse β€Ί jscpd@1.0.1 β€Ί README.md
UNPKG
In following example jscpd will analyze files `*.es` and `*.es6` as javascript and `*.dt` files as dart: ```bash $ jscpd --formats-exts javascript:es,es6;dart:dt /path/to/code ``` > Note: formats defined in the option redefine default configuration, you should define all need formats manually ...
🌐
Codeac
codeac.io β€Ί documentation β€Ί jscpd.html
jscpd.json - Copy/Paste Detector configuration
If you want to ignore specific files, you have to specify the path within the .jscpd.json file and add it to the root of your project.
🌐
Elijah Manor
elijahmanor.com β€Ί blog β€Ί js-copypaste-detect
Detect and Refactor JavaScript Copy-Paste Code
February 14, 2018 - # search js files, exclude lib folder, tokens at 30 npx jscpd -f "src/**/*.js" -e "**/lib/**" -t 30 # exclude multiple folders and adjust tokens to 10 npx jscpd -f "src/**/*.js" -e "**/+(lib|test)/**" -t 10
🌐
GitHub
github.com β€Ί KlavierCat β€Ί pretty-jscpd
GitHub - KlavierCat/pretty-jscpd: Data visualization for JSCPD report
You'll see an edge pointing back towards itself in this case. For example: The List View presents a sorted list of duplications found in your code base, starting from the file with the largest amount of duplication. Run JSCPD to produce ...
Author Β  KlavierCat
🌐
Aarongoldenthal
aarongoldenthal.com β€Ί posts β€Ί gitlab-code-quality-duplication-analysis-with-pmd-cpd
GitLab Code Quality Duplication Analysis With PMD CPD
The first is a JavaScript example with code duplicated 3 times, which finds similar results, but illustrates that this is reported as different duplicates by jscpd.
Find elsewhere
🌐
Open Collective
opencollective.com β€Ί jscpd
jscpd - Copy/Paste Detector for Source Code for the AI Era - Open Collective
The v4.1.0 release introduced an AI Reporter, an MCP Server, and an Agent Skill that lets Claude, Cursor, Copilot, and Gemini run duplication checks during their own workflows. v4.2.0 (May 2026) added cross-format duplicate detection - a <script> block in a .vue file can now match a .ts file, fenced code in Markdown matches the language it declares. No other tool in this category does this. This collective funds the time it takes to keep jscpd maintained, secure, and ready for the next decade of software development.
🌐
UNPKG
app.unpkg.com β€Ί jscpd@1.0.2 β€Ί files β€Ί README.md
jscpd
In following example jscpd will analyze files `*.es` and `*.es6` as javascript and `*.dt` files as dart: ```bash $ jscpd --formats-exts javascript:es,es6;dart:dt /path/to/code ``` > Note: formats defined in the option redefine default configuration, you should define all need formats manually ...
🌐
MegaLinter
megalinter.io β€Ί latest β€Ί descriptors β€Ί copypaste_jscpd
jscpd configuration in MegaLinter - MegaLinter by OX Security
How to use jscpd (configure, ignore files, ignore errors, help & version documentations) to analyze COPYPASTE files
🌐
Npmdoc
npmdoc.github.io β€Ί node-npmdoc-jscpd β€Ί build β€Ί apidoc.html
Github
function JsCpd() {} example usage Β· n/a Β· description and source-code Β· function StorageMemory() { this.codeHashes = {}; } example usage Β· n/a Β· description and source-code Β· function TokenizerBase() { this.skipComments = false; this.tokenTypes = []; } example usage Β·
🌐
Skills Directory
skillsdirectory.com β€Ί home β€Ί jscpd
Jscpd (Grade A) - Claude Skill
February 11, 2026 - ## Quick Start ```bash # With ignore patterns bunx jscpd --ignore "**/node_modules/**,**/dist/**" <path> ``` ## Common Options | Option | Description | | ------------------ | ---------------------------------------- | | `--min-tokens N` | Minimum tokens for duplicate detection | | `--min-lines N` | Minimum lines for duplicate detection | | `--threshold N` | Fail if duplication % exceeds threshold | | `--ignore "glob"` | Ignore patterns (comma-separated) | | `--reporters type` | Output format: `console`, `json`, `html` | | `--output path` | Output directory for reports | | `--silent` | Suppress console output | ## Workflow 1.
🌐
jscpd
jscpd.dev β€Ί getting started β€Ί introduction
jscpd - Copy/Paste Detector
Copy/paste is a common source of technical debt in software projects, and jscpd helps you identify and eliminate these duplications.
🌐
MegaLinter
megalinter.io β€Ί v5.0.2 β€Ί descriptors β€Ί copypaste_jscpd
jscpd - Mega-Linter
HTML report saved to report/copy-paste/html/ ERROR: jscpd found too many duplicates (50%) over threshold (0%) Error: ERROR: jscpd found too many duplicates (50%) over threshold (0%) at ThresholdReporter.report (/node_modules/@jscpd/finder/dist/reporters/threshold.js:12:19) at /node_modules/@jscpd/finder/dist/in-files-detector.js:82:26 at Array.forEach (<anonymous>) at /node_modules/@jscpd/finder/dist/in-files-detector.js:81:28
🌐
EliteAi
eliteai.tools β€Ί agent-skills β€Ί jscpd
jscpd - AI Agent skill
# Scan a directory, ignoring build artifacts bunx jscpd --ignore "**/node_modules/**,**/dist/**" src/ # Scan with threshold β€” exit code 1 if duplication exceeds 5% bunx jscpd --threshold 5 --ignore "**/node_modules/**,**/dist/**" src/
🌐
GitHub
github.com β€Ί kucherenko β€Ί jscpd β€Ί blob β€Ί master β€Ί docs β€Ί ai-ready.md
jscpd/docs/ai-ready.md at master Β· kucherenko/jscpd
jscpd integrates into AI-powered development workflows through three complementary mechanisms: the AI reporter, agent skills, and an MCP server.
Author Β  kucherenko
🌐
Reddit
reddit.com β€Ί r/rust β€Ί i rewrote jscpd (copy/paste detector, 223 languages) in rust for v5 β€” benchmarks show 24–37x faster than the node.js version
r/rust on Reddit: I rewrote jscpd (copy/paste detector, 223 languages) in Rust for v5 β€” benchmarks show 24–37x faster than the Node.js version
June 8, 2026 -

Hey r/rust πŸ‘‹

I'm the author of jscpd β€” a copy/paste detection CLI tool for source code, supporting 223 languages/formats. It's been around for years as a TypeScript/Node.js tool. Starting with v5, I rewrote the core engine in Rust.

Here are the actual benchmark numbers (10 runs, Apple Silicon, v4.2.5 Node.js vs v5.0.4 native binary):

Target                         v4 (Node.js)   v5 (Rust)   Speedup
───────────────────────────────────────────────────────────────────
fixtures  (548 files,  1.5 MB)     1.030s      0.030s      34.3x
svelte    (9K files,  164 MB)     15.803s      0.428s      36.9x
CopilotKit (17K files, 902 MB)   82.890s      3.440s      24.1x

A few things that stand out from the data:

Startup overhead is gone. On the tiny fixtures run, v4 takes 1.03s β€” that's almost entirely Node.js startup. v5 is 0.03s, consistent to the millisecond across all 10 runs (std dev: 0.000s).

Multi-threading shows up clearly. On CopilotKit, v5 reports 7.3s user time vs 3.4s real time β€” it's genuinely using multiple cores. v4 is strictly single-threaded (user β‰ˆ real throughout).

Blame mode is a special story. v4 shells out to git blame per file, which tanks its --blame performance badly (3.57s vs 1.03s baseline β€” a 3.5x regression from its own non-blame mode). v5 uses gitoxide for in-process blame, so --blame adds only ~0.10s. Same feature, night and day.

Detection improved too. v5 finds more clones on large codebases β€” on CopilotKit, 22,487 vs 12,272 clones β€” likely due to better token counting and different maxSize defaults.

The CLI is still installable via npm (npm i -g jscpd) since most users are in the JS ecosystem, but under the hood it's a native binary now. Pre-built binaries for Linux/macOS/Windows ship with each release.

The 223-language support survived the rewrite intact β€” everything from TypeScript and Rust to COBOL, Terraform, and Solidity.

Would love any feedback from the Rust community on the implementation β€” especially around the tokenizer architecture and language registry design. Code at github.com/kucherenko/jscpd, site at jscpd.dev.

Happy to answer questions about the rewrite process or the profiling methodology.

🌐
GitHub
github.com β€Ί kucherenko β€Ί jscpd β€Ί blob β€Ί master β€Ί README.md
jscpd/README.md at master Β· kucherenko/jscpd
Copy/paste detector for programming source code, supports 223 formats. AI-ready with token-efficient reporter, skill and MCP server. - jscpd/README.md at master Β· kucherenko/jscpd
Author Β  kucherenko