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

Total release size: 54.3 MB

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

Download URL jscpd-5.3.1-py3-none-win_arm64.whl
Size 6.2 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
671be3243e140106d720c0efa9bf28d10d3f8aa9718386fefce1c0da8deddba0
BLAKE2b-256 checksum
How to use checksums
313ff60667957a06c7924397065e1a354292727d0b340de0fb2f105bceab3c05
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 21, 2026.

Transparency log

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

Download URL jscpd-5.3.1-py3-none-win_amd64.whl
Size 6.5 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
51c13f2f22aea0f332206c78827d3fb8cbfc6e90efb415abb645bbc44cee22f5
BLAKE2b-256 checksum
How to use checksums
76e26fb5533778de25d90df37cb8ff07f1c83880a14285fed226190af1b5914b
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 21, 2026.

Transparency log

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

Download URL jscpd-5.3.1-py3-none-musllinux_1_2_x86_64.whl
Size 7.4 MB
Tags Linux musl 1.2+ x86-64 Python 3
SHA-256 checksum
How to use checksums
30311f3fb5cb21f1ce80b1f628e8353fb3f00c67f333d1b5acbc4cfd6a8ded67
BLAKE2b-256 checksum
How to use checksums
85bc341c0e6ef7596cb4eb0cd86a2f691b2c97e483ea09c9b74eb1dcf1861758
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 21, 2026.

Transparency log

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

Download URL jscpd-5.3.1-py3-none-musllinux_1_2_aarch64.whl
Size 6.8 MB
Tags Linux musl 1.2+ ARM64 Python 3
SHA-256 checksum
How to use checksums
d385fe53ca3f39d8cd54598e9f4aa5e1b30edc1a34d34b94581190c80bc23e6a
BLAKE2b-256 checksum
How to use checksums
4e5c4cf6391cb4318deac8b8d33cfec12d4f53fd085e340ecb14373a8e686f80
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 21, 2026.

Transparency log

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

Download URL jscpd-5.3.1-py3-none-manylinux_2_34_x86_64.whl
Size 7.2 MB
Tags Linux glibc 2.34+ x86-64 Python 3
SHA-256 checksum
How to use checksums
74e21dd86a08eb0a51a0a2f505e65c76a7ae04c73decfb6ec286c41f9d64cd87
BLAKE2b-256 checksum
How to use checksums
2d942dd81394d9b56782ae16adbc8b92379a3fcaac075fc2860e4814617c9bf6
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 21, 2026.

Transparency log

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

Download URL jscpd-5.3.1-py3-none-manylinux_2_34_aarch64.whl
Size 6.8 MB
Tags Linux glibc 2.34+ ARM64 Python 3
SHA-256 checksum
How to use checksums
6a970b95d7f5a40f7894bd2825191bc826cb540a91a1684e22cfb94ed67d62d4
BLAKE2b-256 checksum
How to use checksums
cc5ac5b2e9210bd6a03e115f107dcdef1aa1d09b1539900308e2951b496da69d
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 21, 2026.

Transparency log

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

Download URL jscpd-5.3.1-py3-none-macosx_11_0_arm64.whl
Size 6.4 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
aeeb33102e84703e6d2262a5656cff1aede9c42e9406a07f683b74dbfb58c14a
BLAKE2b-256 checksum
How to use checksums
d096ad57760d6669b1c97ad26db2aa273f7ae4d10c23e63a990ef3f7ce7cb1a4
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 21, 2026.

Transparency log

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

Download URL jscpd-5.3.1-py3-none-macosx_10_12_x86_64.whl
Size 7.0 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
1b976fa0648c129a3ef9288cd929eb1791706ab1bdd2ecc5e788f5d9cb220a16
BLAKE2b-256 checksum
How to use checksums
ab530de399b8d82dc28e37c44eca76c780222a595056dad64e53c668f718b7e5
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 21, 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

This release

5.3.1 This release

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