jscpd
jscpd.dev
- Free plan
- Open source
- Windows
- macOS
- Linux
- API
- Self-hosted
What jscpd is
jscpd is an open-source tool for finding repeated code in repositories. It can scan a codebase and fail a build when duplication goes above a configured threshold, making it usable in local development and CI/CD. The project says it supports 224 languages. Exact clones are detected by default, with optional detection for renamed and near-miss clones; semantic clone detection is described as experimental. Version 5 is available as a self-contained native binary that does not require Node.js, with direct macOS, Linux and Windows downloads, including x64 and ARM64 variants. Reports can be produced in HTML, JSON, XML, README badge, SARIF, CodeClimate and OpenMetrics formats. Its GitHub Action can enforce a threshold and upload SARIF for GitHub Code Scanning, and GitLab CI reporters are documented. Developers can also run it in pre-commit hooks or Docker. A dashboard summarizes project size, duplication, complexity, dead code and a health score. Dead-code analysis covers JavaScript, TypeScript and Python, plus Rust when compiler diagnostics are supplied. jscpd is free and open source.
Who it suits
jscpd suits developers who want to identify duplicated code locally or add a duplication threshold to a build pipeline. Its hooks, CI integrations and native binaries offer several ways to include scans in a development workflow.
Good to know, and what to watch
- Supports 224 languages
- Can fail builds above a duplication threshold
- Native binary does not require Node.js
- Reports include SARIF and multiple other formats
- GitHub Action supports threshold checks and SARIF uploads
- Semantic clone detection is experimental
- Dead-code analysis covers only specified languages
- Rust dead-code analysis requires compiler diagnostics
Plans
Every plan and pricejscpd
jscpd open-source distribution
Open source
Getting started
- Open the jscpd website
- Install using curl, PowerShell, npm, pip, cargo, Homebrew, Nix, Docker, or npx
- Choose a macOS, Linux, or Windows binary, including x64 or ARM64 variants
- Run the CLI against a repository
- Add threshold checks to GitHub Actions or documented GitLab CI reporters
- Connect it to pre-commit, Husky, or a shell hook
The Club's review
jscpd is a free, open-source repository scanner for teams that want duplicate-code checks in local development and CI/CD. It is particularly suitable for mixed-language projects and engineers who need configurable build gates, while its narrower dead-code coverage and experimental semantic matching matter when evaluating broader quality analysis.
Its strongest case is flexible, repository-wide clone detection with many output formats and deployment choices. Look elsewhere if you need a commercial support contract or mature semantic and dead-code analysis across more languages.
Overview
jscpd uses token-based scanning to find duplicated source code and can fail a build when duplication passes a threshold you set. Exact clones are the default; renamed, near-miss and semantic comparisons can be enabled when those checks fit your policy. The project says it supports 224 languages, giving it useful reach for polyglot repositories, although semantic detection is experimental rather than a dependable replacement for exact matching.
The tool is CLI-first and works on laptops as well as CI/CD systems. Version 5 is a self-contained native binary, so installations do not require a Node.js runtime. It is credited to Andrey Kucherenko and contributors. For a wider category view, see Code Clone Detection Tools.
Key features
Detection and reporting
jscpd can emit HTML, JSON, XML, SARIF, CodeClimate and OpenMetrics reports, plus README badges. That mix serves developers reading a report, dashboards consuming metrics and security-style code-scanning workflows. A repository-wide scan is a practical default for enforcing consistent duplication policy rather than checking only selected files.
CI and pre-commit controls
The GitHub Action scans repositories, enforces your configured threshold and uploads SARIF to GitHub Code Scanning. GitLab CI reporters are documented as well. Before code reaches CI, checks can run through the pre-commit framework, Husky or a shell hook. These options make jscpd useful when a team wants duplication treated as a gate, not just an occasional report.
Native, container and AI access
Direct binaries are provided for macOS, Linux and Windows, with x64 and ARM64 variants; Docker installation is also available. A built-in MCP server lets Claude, Cursor or another MCP client check for clones, and the project supplies agent skills. Those integrations suit teams adding clone checks to editor or agent workflows, while the command-line design remains the clearest fit for scripted automation.
Codebase health view
One dashboard run summarizes project size, duplication, complexity, dead code and a health score. Dead-code analysis is limited to JavaScript, TypeScript and Python, with Rust supported when compiler diagnostics are supplied. Treat that dashboard as a useful snapshot, not a universal dead-code audit for every language jscpd can scan.
Pricing
jscpd is free and open source. The jscpd plan costs free and is described as an open-source code detector. Installation is offered through curl, PowerShell, npm, pip, cargo, Homebrew, Nix, Docker or npx. There are no paid tiers, seat charges or trial terms to weigh, which makes it practical for individual developers and organisations standardising one tool across many repositories. The trade-off is that the published offering does not provide a separate commercial support tier or service-level commitment.
Platforms
Supported platforms are API, Linux, macOS, self-hosted and Windows. Native downloads cover x64 and ARM64 on the three desktop operating systems, and Docker extends deployment to environments that prefer containers. Self-hosting and local execution keep source analysis within your own infrastructure, while the API and CI integrations support automated pipelines.
Who it's for
Choose jscpd for developers, platform teams and CI owners who need repository-wide duplication thresholds, pre-commit checks and machine-readable reports without licensing spend. It is especially well matched to polyglot codebases because of its stated 224-language support and to teams already using GitHub Code Scanning, GitLab CI, Husky or MCP-enabled coding tools.
It is less suitable as a sole quality platform when dead-code findings must span many languages or when semantic clone detection needs production-grade confidence. Those teams should treat its experimental semantic mode and language-limited dead-code view as constraints.
Pros and cons
- Pro: Free, open-source licensing removes per-seat and repository costs.
- Pro: Exact, renamed and near-miss modes let teams tune detection to their policy.
- Pro: GitHub Action, SARIF, GitLab reporters and pre-commit hooks connect checks to everyday delivery workflows.
- Pro: Native x64 and ARM64 binaries, Docker and self-hosting give deployment flexibility without a Node.js runtime in v5.
- Con: Semantic clone detection is experimental, so it should not be treated as a mature semantic analysis engine.
- Con: Dead-code analysis covers only JavaScript, TypeScript and Python, plus Rust with compiler diagnostics.
Alternatives
Simian Similarity Analyzer is a free, open-source option for Linux, macOS and Windows. CloneWorks is another free Windows, macOS and Linux choice, with acknowledgement and redistribution conditions. Pick dcd if macOS or Linux support and an AGPL-3.0 project are the priority; paid priority email support is offered separately. Duplo provides free GPLv2-or-later software with prebuilt Alpine Linux, macOS and Windows binaries. PMD is a free BSD-style static analyzer for Linux, macOS, Windows and self-hosted use. CCFinderSW is a free MIT-licensed Windows tool requiring Java Runtime Environment 8 or later. CodeMatch is a paid Windows product with a free plan and trial. Algo VPN is a free self-hosted VPN setup tool rather than a code-clone detector.
Verdict
jscpd is the right choice for teams seeking a no-cost, open-source clone detector that can run locally, in hooks and in CI across a broad range of languages. Its configurable thresholds, extensive reporting and deployment flexibility are compelling. Look elsewhere if your decision depends on comprehensive dead-code coverage, mature semantic matching or paid enterprise support.
The verdict
jscpd provides repository-wide duplicate-code detection with local, hook and CI/CD workflows. Readers should note that semantic clone checks are experimental and dead-code coverage is limited to the listed languages.
Questions people ask
Is jscpd free?
Yes. The listed jscpd plan is free, and the project is open source.
Which platforms can run jscpd?
Supported platforms include API, Linux, macOS, self-hosted environments, and Windows. Direct native binaries are listed for macOS, Linux, and Windows.
What clone types does it detect?
Exact clones are detected by default. Renamed, near-miss, and semantic clone checks are opt-in, with semantic detection described as experimental.
Can jscpd run in CI?
Yes. Its GitHub Action scans repositories, enforces a threshold, and uploads SARIF for GitHub Code Scanning. GitLab CI reporters are also documented.
What reports can it generate?
Reporters include HTML, JSON, XML, README badges, SARIF, CodeClimate, and OpenMetrics.
Does it require Node.js?
Version 5 is a self-contained native binary that does not require a Node.js runtime.
What the maker publishes
- Agent skills
- Five installable skills provide workflows for duplication cleanup, dead-code removal and code migration tasks. source
- AI integrations
- A built-in MCP server lets Claude, Cursor, or another MCP client check code for clones, and the project provides agent skills. source
- API limitation
- The v5 CLI crate library target is internal and may change without notice; other languages are directed to JSON output or MCP. source
- CI integrations
- The GitHub Action scans repositories, enforces a threshold, and uploads SARIF for GitHub Code Scanning; the site also documents GitLab CI reporters. source
- CI integrations
- The official GitHub Action accepts a duplication threshold and uploads SARIF results to GitHub Code Scanning; GitLab and generic CI workflows are documented. source
- Clone types
- It detects exact clones by default and offers opt-in detection for renamed, near-miss, and semantic clones; semantic detection is described as experimental. source
- Codebase analysis
- The dashboard summarizes project size, duplication, complexity, dead code, and a health score in one run. source
- Codebase comparison
- Experimental compare mode pairs functions in two folders to measure porting progress or implementation parity. source
- Community distribution
- Open Collective says the tool is used in pipelines at Microsoft, Salesforce and Deutsche Bahn and bundled by Super-Linter, Mega-Linter and Codacy. source
- Complexity analysis
- The complexity mode ranks files and folders by complexity without running a clone scan. source
- Dashboard and health
- Dashboard and health modes combine duplication, dead-code and complexity measures into a scored project view. source
- Dead-code analysis
- The dead-code mode reports unused files, exports, symbols and imports for JavaScript, TypeScript and Python. source
- Dead-code limits
- The dashboard documentation says dead-code analysis covers JavaScript, TypeScript, and Python, plus Rust when compiler diagnostics are supplied. source
- Developer workflow
- It can run in pre-commit hooks through the pre-commit framework, Husky, or a shell hook. source
- Documentation depth
- Documentation includes installation, guides, concepts, CLI and configuration references, reporters, supported formats, Rust crates, MCP, benchmarks and migration material. source
- Editor integration
- The language server supplies diagnostics and navigation actions for Neovim, Helix, Sublime Text, Emacs and JetBrains editors. source
- Exact clones
- Default detection finds identical token sequences while ignoring whitespace, layout and comments. source
- Git history
- The history mode scans commits over a range and charts duplication changes over time. source
- Independent maintenance signal
- Snyk classified the project maintenance as healthy and reported one maintainer, active repository metadata and recent releases. source
- Install platforms
- Direct binaries are listed for macOS, Linux, and Windows, including x64 and ARM64 variants. source
- Install platforms
- Official installers provide macOS and Linux shell builds plus Windows x64 and ARM64 PowerShell builds; Docker publishes amd64 and arm64 images. source
- Languages
- The site says jscpd supports 224 languages. source
- License
- The project and its published packages use the permissive MIT license. source
- Limit: CI success ambiguity
- GitTested found unknown formats, missing paths, unwritable output, invalid modes and misspelled configuration keys could still exit with status zero. source
Checked against the maker's pages on 15 Oct 2026.