Back to directory

jscpd

A copy-paste and duplicate code detector for more than 220 languages, with a Rust engine, that also finds dead code, complexity hotspots, and a duplication trend.

jscpd

jscpd tokenizes each supported language according to its own comment and string rules rather than treating source as generic text, then finds duplicated token sequences across files using a rolling Rabin-Karp hash. Optional passes catch near-duplicates that differ only in names or literal values, copies with a few edited lines, and, experimentally, functions that do the same thing written differently, using a code embedding model.

Beyond exact and near duplicates, it can also report dead code, rank files by complexity, track duplication over git history, and combine these into one overall health score for a codebase, and it integrates into CI as a GitHub Action that uploads SARIF results to GitHub code scanning by default. It exposes an MCP server and a token-efficient reporter so an AI coding agent can query the same results directly.

It is written in Rust, distributed as a self-contained binary, and installable via npm, PyPI, Cargo, Homebrew, Nix, or Docker under the MIT license.

More in Code quality

See all 94
  • Critic

    critic.run

    A code-change viewer, backed by Y Combinator, built for reviewing work written by coding agents, presenting a plain-language narrative of each change alongside the diff and a running conversation with the agent.

  • GitIntel

    hoangsonww.github.io

    An MCP server that computes git repository analytics such as hotspots, churn, temporal coupling, knowledge maps and risk scoring entirely from local commit history, for AI coding agents like Claude Code and Codex.

  • Axint

    axint.ai

    A verification layer for AI coding agents working on Apple projects: it runs real Xcode builds and tests against the Swift an agent wrote, reconciles static analysis findings against that evidence, and returns a signed proof with the exact repairs still needed.