Show HN: Jscpd start support type2/type3 clones Jscpd v5, a copy/paste detector for programming source code maintained by kucherenko, now detects Type-2 renamed clones and Type-3 near-miss clones across 224 supported formats. The Rust-based tool runs on a Rabin-Karp algorithm over language-aware token streams and ships as a self-contained binary installable via npm, PyPI, Cargo, Homebrew, Nix, and Docker, with an MCP server and token-efficient reporter for AI workflows. The release also provides a GitHub Action that uploads SARIF results to GitHub Code Scanning by default. Copy/paste detector for programming source code. 220+ formats, language-aware tokenization, exact, renamed and near-miss clones, Rust engine, self-contained binary, AI-ready with MCP server and token-efficient reporter. Documentation: https://jscpd.dev https://jscpd.dev jscpd reads code the way its language defines it, not as plain text. Each of the 224 formats is tokenized with its own comment and string syntax, so in Python, -- in SQL or ' in Visual Basic opens a comment only where the language says so. JavaScript, TypeScript, JSX and TSX go through the oxc https://oxc.rs parser, which handles template literals, regular expressions, JSX and decorators, and can erase TypeScript-only syntax so a .ts file matches its .js twin. Vue, Svelte, Astro, Markdown and Razor files are split into their embedded languages first, and each block is tokenized as the language it contains. Identifiers, keywords and literals are classified, which is what lets the renamed-clone pass replace names while keeping keywords in place. On that token stream jscpd runs the Rabin-Karp https://en.wikipedia.org/wiki/Rabin%E2%80%93Karp algorithm algorithm to find duplicated blocks across files. Opt-in passes extend it to blocks that differ only in names or values Type-2 and to copies with a few edited lines or the same function structure Type-3 , each reported with its kind and a similarity score. See How detection works /kucherenko/jscpd/blob/master/docs/rust.md how-detection-works . macOS / Linux curl -fsSL https://jscpd.dev/install.sh | bash Windows PowerShell irm https://jscpd.dev/install.ps1 | iex No install — run once with npx Node.js npx jscpd . Then scan a project: jscpd /path/to/code | Method | Command | Notes | |---|---|---| | npm | npm install -g jscpd | Installs the jscpd command; prebuilt binary, no Node.js at runtime | | npm cpd command | npm install -g cpd | Same binary, exposed as cpd | | PyPI | pip install jscpd | Platform wheels with both commands; also pipx install jscpd , uv tool install jscpd , or uvx jscpd . to run without installing | | Cargo | cargo install jscpd | Builds from crates.io; installs both jscpd and cpd | | Homebrew | brew install jscpd | macOS / Linux | | Nix | nix run github:kucherenko/jscpd -- /path/to/code | Or nix profile install github:kucherenko/jscpd | | Docker | docker run --rm -v "$PWD:/src" ghcr.io/kucherenko/jscpd . | Multi-arch image built from the release binaries | - uses: kucherenko/jscpd@v5 with: threshold: 5 Uploads SARIF results to GitHub Code Scanning by default. See CI & Pre-Commit Hooks /kucherenko/jscpd/blob/master/docs/ci-and-hooks.md for all inputs and outputs. | Document | Description | |---|---| | Rust engine /kucherenko/jscpd/blob/master/docs/rust.md | Installation, CLI reference, reporters, baseline, summary, blame, config file | | AI-Ready /kucherenko/jscpd/blob/master/docs/ai-ready.md | AI reporter, agent skills, MCP server | | Programming API /kucherenko/jscpd/blob/master/docs/api.md | Rust API cpd-finder crate | | CI & Pre-Commit Hooks /kucherenko/jscpd/blob/master/docs/ci-and-hooks.md | GitHub Action, Docker image, pre-commit hooks | | Packages /kucherenko/jscpd/blob/master/docs/packages.md | npm packages and crates that make up a release | | Supported formats /kucherenko/jscpd/blob/master/FORMATS.md | All 224 formats with their file extensions | | Runnable demos /kucherenko/jscpd/blob/master/fixtures | One fixtures/