Skip to main content

jscpd

Copy/paste detector for programming source code. jscpd finds duplicated blocks across 224 language formats, including cross-format detection for Vue, Svelte, Astro and Markdown, and writes the result with 15 reporters: console, JSON, XML, CSV, HTML, Markdown, SARIF, Code Climate, OpenMetrics, badge, Xcode, a token-efficient AI format and more.

This package ships the same self-contained Rust binary as the npm and crates.io releases, as platform wheels for macOS (arm64, x64), Linux (glibc and musl, x64 and arm64) and Windows (x64, arm64). It installs the jscpd and cpd commands. No Python code, no Node.js runtime.

Install

pip install jscpd          # or: pipx install jscpd / uv tool install jscpd
jscpd /path/to/code

uvx jscpd /path/to/code    # run without installing

What it finds

  • Exact clones by default; --min-tokens and --min-lines set the size.
  • Type-2 clones: --ignore-identifiers, --ignore-literals and --ignore-annotations catch blocks that differ only in names, literal values or annotations.
  • Type-3 near-miss clones: --max-gap-lines N merges copies with a few inserted or changed lines; --similarity 0.85 compares JavaScript and TypeScript functions by syntax-tree structure.
  • Only new duplication: --baseline or --baseline-from-ref origin/main with --fail-on-new-clones tolerate legacy clones and fail CI on regressions.
  • Threshold: --threshold 5 fails the run when more than 5% of the code is duplicated.

Also --blame (git authorship per clone), --summary (refactoring hotspots by tokens, lines, size and complexity), --mcp (a built-in MCP server so an AI assistant can query the scan), --skip-local and --skip-isolated for monorepos, and .jscpd.json configuration. Full CLI reference: https://jscpd.dev

pre-commit

No Node.js needed; the hook installs this wheel:

repos:
  - repo: local
    hooks:
      - id: jscpd
        name: jscpd - copy/paste detector
        entry: jscpd
        language: python
        additional_dependencies: ['jscpd==5.3.0']
        args: [--threshold, "5", --reporters, console,silent]
        pass_filenames: false
        always_run: true

The repository also publishes a .pre-commit-hooks.yaml, so repo: https://github.com/kucherenko/jscpd with a v5.2.1 or later rev works without additional_dependencies.

Metadata

Release files for jscpd 5.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for jscpd 5.3.0
File
jscpd-5.3.0-py3-none-win_arm64.whl Python 3 none Windows ARM64 Details
jscpd-5.3.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
jscpd-5.3.0-py3-none-musllinux_1_2_x86_64.whl Python 3 none Linux musl 1.2+ x86-64 Details
jscpd-5.3.0-py3-none-musllinux_1_2_aarch64.whl Python 3 none Linux musl 1.2+ ARM64 Details
jscpd-5.3.0-py3-none-manylinux_2_34_x86_64.whl Python 3 none Linux glibc 2.34+ x86-64 Details
jscpd-5.3.0-py3-none-manylinux_2_34_aarch64.whl Python 3 none Linux glibc 2.34+ ARM64 Details
jscpd-5.3.0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details
jscpd-5.3.0-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details

Total release size: 51.8 MB

Release files / jscpd-5.3.0-py3-none-win_arm64.whl

Download URL jscpd-5.3.0-py3-none-win_arm64.whl
Size 5.9 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
3813e8ecea714b1f69efd55cfba6aa9cf6e597f4d1301c23803de03fcfe468f7
BLAKE2b-256 checksum
How to use checksums
ae33a584a7cec89f5b5380665067675f33ae8a0486e3912dd450f9a3b3200125
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.

Transparency log

Release files / jscpd-5.3.0-py3-none-win_amd64.whl

Download URL jscpd-5.3.0-py3-none-win_amd64.whl
Size 6.2 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
0efc61c941ceda518b5ffaf2214e3fc0085aa7efb8ad72e4c1bce728a2737a58
BLAKE2b-256 checksum
How to use checksums
b0dea409d9665a9566171dd294b9bcdb720a903fb0c52331873fa8b246b88132
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.

Transparency log

Release files / jscpd-5.3.0-py3-none-musllinux_1_2_x86_64.whl

Download URL jscpd-5.3.0-py3-none-musllinux_1_2_x86_64.whl
Size 7.1 MB
Tags Linux musl 1.2+ x86-64 Python 3
SHA-256 checksum
How to use checksums
792627b69fcf8e4335ae3bdcb9548c101028fa87e696689cb3fdb4a116f4777d
BLAKE2b-256 checksum
How to use checksums
a1e1104ad5e731780589b66369a5c94d44749880861f8457200a6051e175c512
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.

Transparency log

Release files / jscpd-5.3.0-py3-none-musllinux_1_2_aarch64.whl

Download URL jscpd-5.3.0-py3-none-musllinux_1_2_aarch64.whl
Size 6.5 MB
Tags Linux musl 1.2+ ARM64 Python 3
SHA-256 checksum
How to use checksums
36b10e20483783709c2884d9b6588be9643c3219ee8e368821baa62e27a24837
BLAKE2b-256 checksum
How to use checksums
c38b4574e7ceb9dfe3a2737056fc43ffbc8bf1010b0e57a85615fbc2e9d7953e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.

Transparency log

Release files / jscpd-5.3.0-py3-none-manylinux_2_34_x86_64.whl

Download URL jscpd-5.3.0-py3-none-manylinux_2_34_x86_64.whl
Size 6.9 MB
Tags Linux glibc 2.34+ x86-64 Python 3
SHA-256 checksum
How to use checksums
6008e1b01d98282f322e289e833c43208bdc3e1387949f5ea3bf9b05ebaf762d
BLAKE2b-256 checksum
How to use checksums
fb4cfa4ab4aca1f62a9b7c35c4823ac4aa4831d4e877f85ba15eb8e2414696cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.

Transparency log

Release files / jscpd-5.3.0-py3-none-manylinux_2_34_aarch64.whl

Download URL jscpd-5.3.0-py3-none-manylinux_2_34_aarch64.whl
Size 6.5 MB
Tags Linux glibc 2.34+ ARM64 Python 3
SHA-256 checksum
How to use checksums
d4be8ebe33c9482cd2fed906300d6930546111e512430ca4a4b7ca0cdf5f3004
BLAKE2b-256 checksum
How to use checksums
2ce0db7ff90e92914d54e1c68a93f384596646285c0edcfdcd2f979529d1399c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.

Transparency log

Release files / jscpd-5.3.0-py3-none-macosx_11_0_arm64.whl

Download URL jscpd-5.3.0-py3-none-macosx_11_0_arm64.whl
Size 6.1 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
df2bb73e5ae416599aaae0717144ee8f990815dcb6c0f577b972a755258c37bf
BLAKE2b-256 checksum
How to use checksums
3f0bd3fa7b0b8f25959b4c29f16cc2d965173d5eece93c7efd13ec245821fd01
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.

Transparency log

Release files / jscpd-5.3.0-py3-none-macosx_10_12_x86_64.whl

Download URL jscpd-5.3.0-py3-none-macosx_10_12_x86_64.whl
Size 6.6 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
2770efc77192c0cc11fbf8ad22b637c797dca76fc4ee260bf1973b6fc348ad87
BLAKE2b-256 checksum
How to use checksums
d1bab54089e424f4db7d0608c81ef92d1989d48e5d5d990c531cf7e37dc6b0cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.

Transparency log

Release history Release notifications | RSS feed

5.4.1

8 release files

5.4.0

8 release files

5.3.3

8 release files

5.3.2

8 release files

5.3.1

8 release files

This release

5.3.0 This release

8 release files

5.2.1

8 release files

5.2.0

8 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page