Welcome to jscpd, a powerful copy/paste detector for programming source code that supports 150+ languages and formats.
jscpd is a tool that helps you find duplicated blocks in programming source code. Copy/paste is a common source of technical debt in software projects, and jscpd helps you identify and eliminate these duplications.
The tool implements the Rabin-Karp algorithm for efficient searching of duplications across large codebases.
150+ Languages
Fast Detection
CLI & API
Multiple Reporters
jscpd is modular and consists of several packages:
| Package | Description |
|---|---|
| jscpd | Main package with CLI and detection API |
| jscpd-server | Standalone server application |
| @jscpd/core | Core detection algorithm |
| @jscpd/finder | File duplication detector |
| @jscpd/tokenizer | Source code tokenizer |
| @jscpd/html-reporter | HTML report generator |
| @jscpd/badge-reporter | Badge generator for README files |
| @jscpd/leveldb-store | LevelDB store for big repositories |
# Install globally
npm install -g jscpd
# Run on your source code
jscpd /path/to/source
# Or use npx without installing
npx jscpd /path/to/source
Ready to get started? Head to the Installation guide.