FREEDOM251

Freedom251 › Code Clone Detection Tools

jscpd

Free plan Open source APILinuxMacSelf-hostedWindows

Visit jscpd Alternatives Pricing

jscpd's own site

What jscpd is

jscpd is a command-line tool for finding duplicated code in repositories and enforcing a duplication threshold in builds. It supports 224 languages, according to the project, and detects exact clones by default. Optional checks cover renamed, near-miss, and semantic clones; semantic detection is experimental. Version 5 is available as a self-contained native binary that does not need a Node.js runtime, with direct builds for macOS, Linux, and Windows, including x64 and ARM64 variants.

Reports can be generated 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 add jscpd to pre-commit hooks. A dashboard brings together project size, duplication, complexity, dead code, and a health score. Dead-code analysis covers JavaScript, TypeScript, and Python, plus Rust when compiler diagnostics are provided. jscpd is open source and free.

Who it suits

jscpd suits developers who want to find repeated code in a repository, locally or in CI/CD. Its hooks, reports, and threshold enforcement also fit teams that want duplication checks in their build process.

What it does well

  • Supports 224 languages, according to the project
  • Can enforce duplication thresholds in builds
  • Offers multiple report formats, including SARIF
  • Runs as a native binary without Node.js
  • Free and open source

What to know first

  • Semantic clone detection is experimental
  • Dead-code analysis covers only specified languages
  • Rust dead-code analysis needs compiler diagnostics

Plans

PlanBilled and limitsPrice
jscpdOpen-source code detector · installs via curl, PowerShell, npm, pip, cargo, Homebrew, Nix, Docker, or npxFree
jscpd open-source distributionself-hosted CLI; installation via npm, PyPI, Cargo, Homebrew, Nix, Docker or installersFree

As jscpd.dev lists them, read 29 Sept 2026. The maker's own page has the final word.

Getting started

  1. Open https://jscpd.dev/.
  2. Choose an installation route such as a direct platform binary, curl, PowerShell, npm, pip, cargo, Homebrew, Nix, Docker, or npx.
  3. Run the CLI locally or in CI/CD against a repository.
  4. Set a duplication threshold if you want a build to fail when it is exceeded.
  5. Choose a report format or add the GitHub Action or documented GitLab CI reporters.

Overview

jscpd is a free, open-source repository scanner for duplicate code. It is best suited to developers and teams that want one clone check to run on laptops, in commits, and in CI, with a threshold that can stop a build. Its broad language coverage and integration options make it flexible, while its more ambitious semantic matching is still experimental.

Scanning is token-based. Exact clones are detected by default; renamed, near-miss, and semantic clones require opt-in. The project says it supports 224 languages, a strong fit for mixed-language repositories, although its dead-code analysis covers only JavaScript, TypeScript, Python, and Rust when compiler diagnostics are supplied. For a wider comparison, see Code Clone Detection Tools.

Key features

Detection and analysis

Repository-wide scanning can enforce a configured duplication limit and fail the build when that limit is exceeded. Exact matching is the sensible default for dependable policy checks. Renamed and near-miss modes can find less obvious repetition, but semantic detection is explicitly experimental, so it should support investigation rather than carry the same authority as an exact-clone gate.

A single run can summarize project size, duplication, complexity, dead code, and a health score. That broader dashboard is useful when clone debt is one part of a larger review, but teams should not mistake its language-limited dead-code coverage for a general dead-code analyzer.

Reports and automation

Output formats include HTML, JSON, XML, README badges, SARIF, CodeClimate, and OpenMetrics. This covers readable reports, repository badges, and ingestion by code-scanning or metrics systems without forcing one reporting workflow.

The GitHub Action scans repositories, applies the threshold, and uploads SARIF to GitHub Code Scanning. GitLab CI reporters are documented as well. Pre-commit framework, Husky, and shell-hook support moves checks earlier in the developer workflow, which is useful for teams that want duplication caught before CI.

Installation and AI workflow

Version 5 is a self-contained native binary and does not need a Node.js runtime. Direct binaries are listed for macOS, Linux, and Windows, including x64 and ARM64 variants; Docker is also supported. A built-in MCP server lets Claude, Cursor, and other MCP clients check for clones, and agent skills are provided for AI-assisted workflows. Those integrations broaden where results can be requested, but they do not change the experimental status of semantic matching.

Pricing

jscpd is free and open source. The jscpd plan costs nothing 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 seats, usage quotas, trial periods, or renewal terms stated for this plan. Its main trade-off is that support and operating responsibility remain with the team using the self-hosted or local tooling.

Platforms

Platforms are API, Linux, macOS, self-hosted, and Windows. Native downloads include x64 and ARM64 builds for macOS, Linux, and Windows, while Docker provides another local or CI deployment route.

Who it's for

Choose jscpd when a repository needs configurable duplication gates, many language options, machine-readable reports, and integrations spanning GitHub, GitLab, commit hooks, and MCP clients. It is particularly suitable for mixed-language codebases and teams that prefer a CLI-first, self-hosted tool.

Look elsewhere if you need mature semantic clone analysis or broad dead-code coverage beyond the languages supported by its dashboard. Teams wanting a managed service rather than local and CI operation may also find its open-source, self-run model less convenient.

Pros and cons

  • Pros: supports 224 languages, making it practical for polyglot repositories.
  • Pros: exact, renamed, near-miss, and experimental semantic modes let teams tune detection depth.
  • Pros: threshold-based build failure and SARIF upload connect clone policy directly to CI review.
  • Pros: HTML, JSON, XML, badges, SARIF, CodeClimate, and OpenMetrics serve different reporting systems.
  • Pros: native binaries avoid a Node.js runtime, with x64 and ARM64 downloads plus Docker.
  • Cons: semantic detection is experimental, so it is not a dependable replacement for exact-clone checks.
  • Cons: dead-code analysis is limited to JavaScript, TypeScript, Python, and conditionally Rust.
  • Cons: the open-source model leaves deployment and ongoing operation to the user.

Alternatives

Duplo is a free GNU GPL v2-or-later option with prebuilt Alpine Linux, macOS, and Windows binaries. PMD is a free BSD-style downloadable static code analyzer for Linux, macOS, self-hosted, and Windows. NiCad is free MIT-licensed software for Linux, macOS, self-hosted, and Windows, but requires OpenTxl 11 or later.

dcd is free and AGPL-3.0 licensed on Linux and macOS, with optional priority support at custom pricing. CloneWorks is free on Linux, macOS, and Windows, subject to acknowledgement and free-of-charge redistribution terms. Simian Similarity Analyzer is free open source under Apache License 2.0 for Linux, macOS, and Windows.

CCFinderSW is a free MIT-licensed Windows tool requiring Java Runtime Environment 8 or later. Algo VPN is a free self-hosted VPN setup tool rather than a code-clone detector, so it is not a direct substitute.

Verdict

jscpd is a strong choice for developers and CI teams that want free, repository-wide clone detection with enforceable thresholds, extensive reports, and broad platform coverage. Choose it for dependable exact-clone gates and workflow flexibility; look elsewhere when experimental semantic matching or wider dead-code analysis is central to the decision.

Verdict

jscpd combines repository-wide clone detection with build thresholds, reports, and developer workflow integrations. Its experimental semantic detection and language-specific dead-code limits are worth considering when choosing which checks to rely on.

Questions

Is jscpd free?

Yes. The listed plan is free, and the project is open source.

Which platforms can run it?

The listed platforms are API, Linux, macOS, self-hosted, and Windows. Direct binaries are listed for macOS, Linux, and Windows, including x64 and ARM64 variants.

What clone types does it detect?

Exact clones are detected by default. Optional modes cover renamed, near-miss, and semantic clones; semantic detection is described as experimental.

Can it run in CI?

Yes. The GitHub Action can enforce a threshold and upload SARIF for GitHub Code Scanning, and GitLab CI reporters are documented.

Who makes jscpd?

The project credits Andrey Kucherenko and contributors.

Facts from jscpd's own pages

Agent skills
Five installable skills provide workflows for duplication cleanup, dead-code removal and code migration tasks. · jscpd.dev, 15 Oct 2026
AI integrations
A built-in MCP server lets Claude, Cursor, or another MCP client check code for clones, and the project provides agent skills. · jscpd.dev, 29 Sept 2026
API limitation
The v5 CLI crate library target is internal and may change without notice; other languages are directed to JSON output or MCP. · jscpd.dev, 15 Oct 2026
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. · github.com, 15 Oct 2026
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. · jscpd.dev, 29 Sept 2026
Codebase analysis
The dashboard summarizes project size, duplication, complexity, dead code, and a health score in one run. · jscpd.dev, 29 Sept 2026
Codebase comparison
Experimental compare mode pairs functions in two folders to measure porting progress or implementation parity. · jscpd.dev, 15 Oct 2026
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. · opencollective.com, 15 Oct 2026
Complexity analysis
The complexity mode ranks files and folders by complexity without running a clone scan. · jscpd.dev, 15 Oct 2026
Dashboard and health
Dashboard and health modes combine duplication, dead-code and complexity measures into a scored project view. · jscpd.dev, 15 Oct 2026
Dead-code analysis
The dead-code mode reports unused files, exports, symbols and imports for JavaScript, TypeScript and Python. · jscpd.dev, 15 Oct 2026
Dead-code limits
The dashboard documentation says dead-code analysis covers JavaScript, TypeScript, and Python, plus Rust when compiler diagnostics are supplied. · jscpd.dev, 29 Sept 2026
Developer workflow
It can run in pre-commit hooks through the pre-commit framework, Husky, or a shell hook. · jscpd.dev, 29 Sept 2026
Documentation depth
Documentation includes installation, guides, concepts, CLI and configuration references, reporters, supported formats, Rust crates, MCP, benchmarks and migration material. · jscpd.dev, 15 Oct 2026
Editor integration
The language server supplies diagnostics and navigation actions for Neovim, Helix, Sublime Text, Emacs and JetBrains editors. · jscpd.dev, 15 Oct 2026
Exact clones
Default detection finds identical token sequences while ignoring whitespace, layout and comments. · jscpd.dev, 15 Oct 2026
Git history
The history mode scans commits over a range and charts duplication changes over time. · jscpd.dev, 15 Oct 2026
Independent maintenance signal
Snyk classified the project maintenance as healthy and reported one maintainer, active repository metadata and recent releases. · security.snyk.io, 15 Oct 2026
Install platforms
Official installers provide macOS and Linux shell builds plus Windows x64 and ARM64 PowerShell builds; Docker publishes amd64 and arm64 images. · jscpd.dev, 15 Oct 2026
Languages
The site says jscpd supports 224 languages. · jscpd.dev, 29 Sept 2026
License
The project and its published packages use the permissive MIT license. · pypi.org, 15 Oct 2026
Limit: CI success ambiguity
GitTested found unknown formats, missing paths, unwritable output, invalid modes and misspelled configuration keys could still exit with status zero. · gittested.com, 15 Oct 2026
Limit: human review required
GitTested noted that jscpd identifies repeated passages but does not decide whether repetition should be refactored or retained. · gittested.com, 15 Oct 2026
Local use
The site describes a CLI-first tool for laptops and CI/CD, and provides Docker installation. · jscpd.dev, 29 Sept 2026

Where jscpd stands on Freedom251

Look at these too