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

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

Total release size: 54.8 MB

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

Download URL jscpd-5.3.2-py3-none-win_arm64.whl
Size 6.3 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
10654e344b4de962813ff83c37de593697d9871b5d0290d81ab424b571db6f66
BLAKE2b-256 checksum
How to use checksums
88219bf17aa9ad634eba58835ec1baab86c8dd73389e1fa32fbf4a02561fa0e4
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 23, 2026.

Transparency log

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

Download URL jscpd-5.3.2-py3-none-win_amd64.whl
Size 6.6 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
3bd59f136a13f3b9b3844163751837ac7430b45a1c8a8780e2b400414498c725
BLAKE2b-256 checksum
How to use checksums
371d759452ea3b7c60ab397c3208bf410f5c0357cc48448480300272dd4d312d
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 23, 2026.

Transparency log

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

Download URL jscpd-5.3.2-py3-none-musllinux_1_2_x86_64.whl
Size 7.5 MB
Tags Linux musl 1.2+ x86-64 Python 3
SHA-256 checksum
How to use checksums
e1fd091ca410b81431d4df5914e3b76631956a176ca32e959b08adf45a3c4788
BLAKE2b-256 checksum
How to use checksums
e7b850f61f5318cdc99292287eaa3a6b98b329bd3db3d52e2e93f527d112ba8f
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 23, 2026.

Transparency log

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

Download URL jscpd-5.3.2-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
079a062879f81c5270fb05395ae067e5df387ba8906e6862fb3ce3758914a7dc
BLAKE2b-256 checksum
How to use checksums
89ff2090f0d357700351d709adc8db0ea7ffcf920d884d601221dcb043bfba50
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 23, 2026.

Transparency log

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

Download URL jscpd-5.3.2-py3-none-manylinux_2_34_x86_64.whl
Size 7.3 MB
Tags Linux glibc 2.34+ x86-64 Python 3
SHA-256 checksum
How to use checksums
9af49d7a64f1c142fc8a06004a6d61176e32e78f4044d3b6b5ceba71cd29a118
BLAKE2b-256 checksum
How to use checksums
77e56e38ec4bd801c81fc190fb5afaa0ab901dc14693bd0eadd27712d79620f4
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 23, 2026.

Transparency log

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

Download URL jscpd-5.3.2-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
dd05ed140a543cd92b525ae148a0acf9bbb392c7fd201b393d4c35668b85c90b
BLAKE2b-256 checksum
How to use checksums
6582aaa5c442f6fd4e7425824360d54f41ec2f0f84ffae2720feceff332fd5c3
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 23, 2026.

Transparency log

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

Download URL jscpd-5.3.2-py3-none-macosx_11_0_arm64.whl
Size 6.5 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
ded0b3d5acff972fc394f8f444a1c30d74d1547ac6fcdf3d4795200fa8ebeee7
BLAKE2b-256 checksum
How to use checksums
13133710aa8e1a58dbcd9cd794711d4c217a606c2bc0c81f937076eee14dcdee
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 23, 2026.

Transparency log

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

Download URL jscpd-5.3.2-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
79388dabce739ce02d4839db55e34c787bbf91c1d7b3b95d9959618609d08f9b
BLAKE2b-256 checksum
How to use checksums
cfbc1a9d2e29d76aa97ea99fb30c7474d39f0ecab9cb63fe031fb6f15288313a
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 23, 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

This release

5.3.2 This release

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