Copy/Paste Detector for Source Code
--reporters ai flag.curl -fsSL https://jscpd.dev/install.sh | bashWhy Developers Love jscpd
JavaScript, Python, Java, Go, Rust, C++, TypeScript, Ruby... If you can write it, we can scan it. Vue, Svelte, Astro, and Markdown cross-format detection too.
View supported formats →Rewritten in Rust. 24-37x faster than the TypeScript engine. 159 MB codebase? 3.4 seconds. No Node.js runtime — just a single native binary.
See benchmarks →One command to rule them all. Works everywhere — your laptop, CI/CD, that ancient Jenkins server nobody wants to touch.
Get started →HTML, JSON, XML, badges for your README. Make technical debt visible (and slightly embarrassing).
Explore reporters →v5: Rust crate API. v4: Node.js API. Same CLI in both. Use whichever fits your stack.
View API documentation →Set a threshold, fail the build, save the day. Your future self will thank you.
Configure thresholds →Let AI assistants like Claude check your code for duplications directly using the Model Context Protocol.
Learn about MCP Server →<script> in .vue can match a .ts file. Detect duplication across file types.Compact output that saves ~79% of tokens compared to the default reporter — ideal for piping into LLMs.
AI Reporter docs →Install a skill for your AI coding assistant to automatically detect and refactor duplications — one command to get started.
npx skills add kucherenko/jscpd
See It In Action
# Scan your source code
$ jscpd ./src
Clone found (typescript):
- src/utils.ts [10:1 - 25:3] (15 lines, 129 tokens)
src/helpers.ts [5:1 - 20:3]
Clone found (typescript):
- src/utils.ts [45:5 - 62:2] (17 lines, 178 tokens)
src/components/Button.tsx [12:1 - 29:2]
Clone found (javascript):
- src/hooks/useAuth.ts [1:1 - 34:2] (33 lines, 245 tokens)
src/hooks/useSession.ts [1:1 - 34:2]
# ... more clones
Found 90 clones.
Detection time: 13ms
v5 vs v4: Performance
| Target | Files | Size | v4 (TypeScript) | v5 (Rust) | Speedup |
|---|---|---|---|---|---|
| fixtures | 548 | 1.5 MB | 1.03s | 0.03s | 34.3x |
| Svelte | 8,963 | 38 MB | 15.80s | 0.43s | 36.9x |
| CopilotKit | 17,092 | 159 MB | 82.89s | 3.44s | 24.1x |
Git blame is 27.5x faster with v5's in-process gitoxide (0.13s vs 3.57s on fixtures).
Benchmarked on macOS (Apple Silicon). See the Migration Guide for full details.
💙 Huge Thank You to Our Contributors!
To everyone who has contributed to jscpd — thank you! 🌟
Whether you've submitted code, reported bugs, suggested features, improved documentation, or simply spread the word — your contributions make jscpd better for everyone. We're grateful for every issue closed, every PR merged, and every kind word shared.
With a grateful heart, 🤗
The jscpd Team