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.3']
        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.3

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

Total release size: 150.2 MB

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

Download URL jscpd-5.4.3-py3-none-win_arm64.whl
Size 17.0 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
9d66b2e6ea46b90392ffd591541796c6038574f843ce5b0167727ce9605028a9
BLAKE2b-256 checksum
How to use checksums
a49615575b0f4b409187991c8cc37774ea64a8ee8ec484c21cdfca01846be6f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 8, 2026.

Transparency log

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

Download URL jscpd-5.4.3-py3-none-win_amd64.whl
Size 17.9 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
5390ebf04c22a6ae173b58a0a760c82b0d2c571541de64773237a5329910557b
BLAKE2b-256 checksum
How to use checksums
90cc0def11820ca4a36c2c77c6b17523e627daca14c008cef397929200af8236
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 8, 2026.

Transparency log

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

Download URL jscpd-5.4.3-py3-none-musllinux_1_2_x86_64.whl
Size 20.6 MB
Tags Linux musl 1.2+ x86-64 Python 3
SHA-256 checksum
How to use checksums
461ccad74f63011ca722ba59507aac2138bc6f7326c47de63709fd76839bbcb1
BLAKE2b-256 checksum
How to use checksums
53e7f923c58d7e14e542b093ef5e848eeea994851b10d03538803e6208ef72f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 8, 2026.

Transparency log

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

Download URL jscpd-5.4.3-py3-none-musllinux_1_2_aarch64.whl
Size 19.1 MB
Tags Linux musl 1.2+ ARM64 Python 3
SHA-256 checksum
How to use checksums
6f82f17cec63f76cf209db1d58191fe06b2b15675609b605eaa8de44be6275b3
BLAKE2b-256 checksum
How to use checksums
6f69bec041affa26b45a9e68468d6a75414d1f6452f4963cadeb4ef923671005
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 8, 2026.

Transparency log

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

Download URL jscpd-5.4.3-py3-none-manylinux_2_34_x86_64.whl
Size 20.3 MB
Tags Linux glibc 2.34+ x86-64 Python 3
SHA-256 checksum
How to use checksums
bdb173c425aa8f887ab6176981197760b74c68fe9df623f9d672b652676299cc
BLAKE2b-256 checksum
How to use checksums
33f064f0fd5bb8141a663309cf9e3d12bcae49fd6139e38781a55106944e334c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 8, 2026.

Transparency log

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

Download URL jscpd-5.4.3-py3-none-manylinux_2_34_aarch64.whl
Size 19.2 MB
Tags Linux glibc 2.34+ ARM64 Python 3
SHA-256 checksum
How to use checksums
915b5db5d98898e722fdbd5d0e82d525263a0f73171f33467577e9e8d4a56367
BLAKE2b-256 checksum
How to use checksums
4cd8ecd18c6eae51453fc36add7e133df650e1c8fb778a64ad3ba6de7af88449
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 8, 2026.

Transparency log

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

Download URL jscpd-5.4.3-py3-none-macosx_11_0_arm64.whl
Size 17.7 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
1d054986145a7b4e4fb6ac40ebd6747eeef38313391fec2e79bee75cdf7bad8b
BLAKE2b-256 checksum
How to use checksums
598b3cd4c0e949f6fb7859c5bbd3839a47ab3a9c1d63bb705bc56756b0ba8c39
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 8, 2026.

Transparency log

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

Download URL jscpd-5.4.3-py3-none-macosx_10_12_x86_64.whl
Size 18.4 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
9e84956fbeb8bdfc6857cc88ae714a028af5e17e14607965a68f84c973f56b93
BLAKE2b-256 checksum
How to use checksums
89b0a4a1d3cd5922164779ea6cf974107c1bea0aad76cfe4e3ed761e94e15cde
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 8, 2026.

Transparency log

Security for jscpd 5.4.3

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.

Full provenance

All 8 files in this release have been uploaded with provenance metadata.

Select from 8 files

Attestation for jscpd-5.4.3-py3-none-win_arm64.whl

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 Nov 8, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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