jscpd is a copy-paste detector for source code that identifies duplicated code blocks across files in over 220 programming languages using a Rust engine.
The tool implements the Rabin-Karp algorithm to find exact duplicates and offers optional passes to detect Type-2 clones that differ only in variable or function names, and Type-3 clones with minor edits or matching structure. Each detected clone is reported with its classification and a similarity score, helping developers identify and refactor redundant code.
Teams should adopt jscpd if they want to enforce the DRY principle across codebases and need broad language support without language-specific tooling. It suits projects of any size and integrates into CI/CD pipelines through a GitHub Action that uploads SARIF results to GitHub Code Scanning. The tool ships as a self-contained binary with no runtime dependencies, available through npm, PyPI, Cargo, Homebrew, Nix, and Docker. For teams working with AI agents, the project includes an MCP server and token-efficient reporter designed for integration with coding assistants.
The project maintains active development with regular updates to the Rust engine and continuous expansion of supported formats. Documentation is comprehensive, covering the CLI, reporters, CI integration, and a programming API for the underlying Rust library. The repository includes runnable demo fixtures for each feature with expected output, supporting developers in understanding and validating the tool's behavior.