kucherenko/jscpd

Copy/paste detector for source code. 220+ languages, Rust engine, SARIF/HTML/badge reporters, GitHub Action, MCP server for AI agents.

What it solves

jscpd is a copy-paste detector for programming source code that identifies duplicated code blocks across files. It helps developers reduce technical debt by finding redundant logic that should be refactored into reusable components.

How it works

The tool implements the Rabin-Karp algorithm to find clones. It is built as a high-performance Rust engine that can be distributed as a self-contained binary. It supports 224 different language formats and can detect duplication across different formats (e.g., matching clones between JavaScript and TypeScript).

Who it’s for

Software engineers and DevOps teams who want to maintain clean codebases, as well as AI coding assistants that need to identify and refactor duplication through specialized reporters and protocols.

Highlights

  • Extensive Language Support: Supports 224 formats with cross-format detection capabilities.
  • AI-Ready Integration: Includes an AI reporter for token-efficient LLM output, an MCP server for real-time duplication checks, and installable skills for AI agents.
  • CI/CD Integration: Provides a GitHub Action and baseline support to gate builds on new duplications only.
  • High Performance: Built in Rust for speed, outperforming many traditional copy-paste detectors.
  • Flexible Reporting: Offers 15 different reporters, including SARIF, JSON, and HTML.

Related

  • Project
  • Project
  • Project
  • Project
  • Project