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 compares functions of fifteen languages by the subtrees of their normalized syntax trees.
  • 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.4.1']
        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.4.1

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.4.1
File
jscpd-5.4.1-py3-none-win_arm64.whl Python 3 none Windows ARM64 Details
jscpd-5.4.1-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
jscpd-5.4.1-py3-none-musllinux_1_2_x86_64.whl Python 3 none Linux musl 1.2+ x86-64 Details
jscpd-5.4.1-py3-none-musllinux_1_2_aarch64.whl Python 3 none Linux musl 1.2+ ARM64 Details
jscpd-5.4.1-py3-none-manylinux_2_34_x86_64.whl Python 3 none Linux glibc 2.34+ x86-64 Details
jscpd-5.4.1-py3-none-manylinux_2_34_aarch64.whl Python 3 none Linux glibc 2.34+ ARM64 Details
jscpd-5.4.1-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details
jscpd-5.4.1-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details

Total release size: 137.2 MB

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

Download URL jscpd-5.4.1-py3-none-win_arm64.whl
Size 15.8 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
df259a482fc8a0dd44c8eaf268ded5250bd16a9d44fc91d199bcd90d9c2817fe
BLAKE2b-256 checksum
How to use checksums
e1539c84d27de8bfaca486d3efff8de3cdc191bed1960be915fa473e80a6608c
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 Oct 9, 2026.

Transparency log

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

Download URL jscpd-5.4.1-py3-none-win_amd64.whl
Size 16.5 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
443f639758c3c99da3664dd26f85d103a38732798cc705b07c3c3dd375cabff9
BLAKE2b-256 checksum
How to use checksums
58e3b8a0bb62fc2917dbee5a57603f9d6d27370a554927495b565c27fe4bd2e3
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 Oct 9, 2026.

Transparency log

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

Download URL jscpd-5.4.1-py3-none-musllinux_1_2_x86_64.whl
Size 18.8 MB
Tags Linux musl 1.2+ x86-64 Python 3
SHA-256 checksum
How to use checksums
48a1da125cab7f1a2f316002ef22ab65edc1363a2542682f2f2356077efd6d45
BLAKE2b-256 checksum
How to use checksums
197b53207ef2fd542c5c4f5888d1b43844e55c9d0b1941232aecf375965a741f
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 Oct 9, 2026.

Transparency log

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

Download URL jscpd-5.4.1-py3-none-musllinux_1_2_aarch64.whl
Size 17.4 MB
Tags Linux musl 1.2+ ARM64 Python 3
SHA-256 checksum
How to use checksums
061f0fb5bae507994d69fbe97a0936d9252d26740ab00e8b4df11ff0171d70ac
BLAKE2b-256 checksum
How to use checksums
958584623940b55089d1d89670d1372d4de618b1027fa9f4a3e3856cccfacfef
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 Oct 9, 2026.

Transparency log

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

Download URL jscpd-5.4.1-py3-none-manylinux_2_34_x86_64.whl
Size 18.4 MB
Tags Linux glibc 2.34+ x86-64 Python 3
SHA-256 checksum
How to use checksums
a3fb1d80c0b40ea72825619b94bd1730d507b05043a84bd813ade66fed96aefc
BLAKE2b-256 checksum
How to use checksums
4ce17b60e0940530c189fe16b35cb59d4172f1288dcf4cc9e38ea83b0c2d33e1
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 Oct 9, 2026.

Transparency log

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

Download URL jscpd-5.4.1-py3-none-manylinux_2_34_aarch64.whl
Size 17.6 MB
Tags Linux glibc 2.34+ ARM64 Python 3
SHA-256 checksum
How to use checksums
4ccdba98e13defb62bf19ef928dc2736da7f284345f762a5ed4543c229045703
BLAKE2b-256 checksum
How to use checksums
61ceebec3fcd4c5472535f3fe6cd233958b4c80c62cd197e57149f30ed1fe4d9
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 Oct 9, 2026.

Transparency log

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

Download URL jscpd-5.4.1-py3-none-macosx_11_0_arm64.whl
Size 16.0 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
b561bb670703128dd3aec506d3b9142c3c16e7c5d70dbd40eb9cf1ac4fe24645
BLAKE2b-256 checksum
How to use checksums
558261a5f08995122c7d1b2d34668f7d709fac4faaebdd06bd17e0f9c1109736
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 Oct 9, 2026.

Transparency log

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

Download URL jscpd-5.4.1-py3-none-macosx_10_12_x86_64.whl
Size 16.6 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
eb2a2a05fde9e80a8e36f2773c04abfc747fb974a7000b8940afd9f13acb6563
BLAKE2b-256 checksum
How to use checksums
bd37ec72271a6cbc338f1ee40ee0ea996fb2a81a860d5870d44e1afe45f14e34
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 Oct 9, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

5.4.1 This release

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

5.3.0

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