🌐
GitHub
github.com β€Ί kucherenko β€Ί jscpd
GitHub - kucherenko/jscpd: Copy/paste detector for programming source code, supports 223 formats. AI-ready with token-efficient reporter, skill and MCP server. Β· GitHub
Copy/paste detector for programming source code, supports 223 formats. AI-ready with token-efficient reporter, skill and MCP server. - kucherenko/jscpd
Author Β  kucherenko
🌐
jscpd
jscpd.dev
jscpd - Copy/Paste Detector for Source Code - jscpd
Detect copy/paste and duplicated code in your projects. Rust-powered native binary, 24-37x faster. Supports 223+ programming languages.
Discussions

I rewrote jscpd (copy/paste detector, 223 languages) in Rust for v5 β€” benchmarks show 24–37x faster than the Node.js version
Did you rewrite it, or did Claude rewrite it? More on reddit.com
🌐 r/rust
6
20
June 8, 2026
JavaScript/TypeScript Code Duplication (JSCPD) Ignore Imports - Stack Overflow
Some background: I am developing two main projects. The first project is an API written in TypeScript using NodeJS. The second project is also written in TypeScript, using Ionic Framework to develo... More on stackoverflow.com
🌐 stackoverflow.com
jscpd v4.2.0 just landed with Svelte support β€” thought this community might find it useful! 🧹
syntax recommended this tool and I have been using it on my svelte project now that it supports svelte itself I will give it a shot More on reddit.com
🌐 r/sveltejs
8
30
May 14, 2026
Finding duplicate code?
https://github.com/danielstjules/jsinspect is the best. Too bad its abandoned, but I guess it works allright. More on reddit.com
🌐 r/vscode
2
10
May 31, 2018
🌐
npm
npmjs.com β€Ί package β€Ί jscpd
jscpd - npm
3 weeks ago - Copy/paste detector for programming source code β€” Rust-based (v5.x). For the TypeScript version, see jscpd@4.x.. Latest version: 5.0.12, last published: 14 days ago. Start using jscpd in your project by running `npm i jscpd`. There are 92 ...
      Β» npm install jscpd
    
Published Β  Jul 08, 2026
Version Β  5.0.12
🌐
MegaLinter
megalinter.io β€Ί v5.0.2 β€Ί descriptors β€Ί copypaste_jscpd
jscpd - Mega-Linter
filtering can not be done using Mega-Linter configuration variables,it must be done using jscpd configuration or ignore file (if existing)
🌐
MegaLinter
megalinter.io β€Ί v9 β€Ί descriptors β€Ί copypaste_jscpd
jscpd configuration in MegaLinter - MegaLinter by OX Security
JSCPD (JavaScript Copy-Paste Detector) is a sophisticated copy-paste detection tool that scans codebases across multiple programming languages to identify duplicated code blocks.
🌐
Codeac
codeac.io β€Ί documentation β€Ί jscpd.html
jscpd.json - Copy/Paste Detector configuration
Copy/Paste Detector (jscpd) helps you find duplicated code within your project which is a common technical debt.
🌐
Elijah Manor
elijahmanor.com β€Ί blog β€Ί js-copypaste-detect
Detect and Refactor JavaScript Copy-Paste Code
February 14, 2018 - # changes files to search for css copy-paste npx jscpd -f "src/**/*.css" -e "**/+(lib|test)/**" -t 10
🌐
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.

Find elsewhere
🌐
Homebrew
formulae.brew.sh β€Ί formula β€Ί jscpd
Homebrew Formulae: jscpd
brew install jscpd Β· Copy/paste detector for programming source code Β· https://jscpd.dev/ License: MIT Β· Development: Pull requests Β· Formula JSON API: /api/formula/jscpd.json Β· Formula code: jscpd.rb on GitHub Β·
🌐
GitHub
github.com β€Ί kucherenko β€Ί jscpd β€Ί blob β€Ί master β€Ί docs β€Ί ai-ready.md
jscpd/docs/ai-ready.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. - kucherenko/jscpd
Author Β  kucherenko
🌐
Rust
docs.rs β€Ί jscpd-rs
jscpd_rs - Rust
Native Rust API for `jscpd-rs`, a 50x+ faster duplicate-code detector for local development and CI/CD.
🌐
DEV Community
dev.to β€Ί vvbogdanov β€Ί add-a-50x-faster-duplicate-code-gate-to-github-actions-with-jscpd-rs-kml
Add a 50x+ faster duplicate-code gate to GitHub Actions with jscpd-rs - DEV Community
June 4, 2026 - This post shows how to add a fast duplicate-code gate to GitHub Actions with jscpd-rs, a native Rust implementation of the common jscpd workflow.
🌐
Reddit
reddit.com β€Ί r/sveltejs β€Ί jscpd v4.2.0 just landed with svelte support β€” thought this community might find it useful! 🧹
r/sveltejs on Reddit: jscpd v4.2.0 just landed with Svelte support β€” thought this community might find it useful! 🧹
May 14, 2026 -

Hi everyone! πŸ‘‹

I'm fairly new here, so I hope this kind of post is welcome β€” please let me know if there's a better place to share it!

I just wanted to give a heads-up that jscpd v4.2.0 has landed with official Svelte support, and I thought the community might find it genuinely useful.


What is jscpd?

If you haven't come across it before, jscpd is a copy/paste detector for source code. It scans your project, finds duplicated blocks across files, and reports them β€” a really handy tool for spotting technical debt before it piles up. It supports 150+ languages and formats, and now .svelte is officially one of them.


Why does this matter for us?

Svelte's component model makes it wonderfully easy to build UIs quickly β€” but in larger projects it's easy to accidentally duplicate logic across components: repeated event handlers, similar reactive declarations, copy-pasted template sections. Having a tool that understands .svelte file structure (rather than just treating them as plain text) means you can actually catch those patterns automatically.


Getting started is pretty simple:

npm install -g jscpd
jscpd --format svelte ./src

You can also add it to your CI pipeline with a threshold to fail the build if duplication gets too high:

jscpd --format svelte --threshold 5 ./src

I've been wanting this for a while in my own Svelte projects, so I was really happy to see it land. Huge thanks to the maintainers for making it happen! πŸ™

Full changelog here if you're curious: https://github.com/kucherenko/jscpd/blob/master/CHANGELOG.md

Hope this is helpful to someone β€” happy to answer any questions if I can! 😊