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

Total release size: 124.9 MB

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

Download URL jscpd-5.4.0-py3-none-win_arm64.whl
Size 14.3 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
8e2dd77c278dfaa2b09afad33e70b8ab3f0f129916b5387ed8474cc0cec0be3f
BLAKE2b-256 checksum
How to use checksums
37f8a5e28d9c85062e2ef6ff912d3e0de9edff01efd505f43dab54215edd8345
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 30, 2026.

Transparency log

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

Download URL jscpd-5.4.0-py3-none-win_amd64.whl
Size 15.0 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
48bb57c7f4ae7f3ebbcd777976a678c3c72384d171a778611ce4653d03ccc911
BLAKE2b-256 checksum
How to use checksums
fb48584d5ea0c0e738bacf034e1f5eb556652b4883379685592e4eb52a7a67a9
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 30, 2026.

Transparency log

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

Download URL jscpd-5.4.0-py3-none-musllinux_1_2_x86_64.whl
Size 17.2 MB
Tags Linux musl 1.2+ x86-64 Python 3
SHA-256 checksum
How to use checksums
7f6f7d7f53695e5d428f844200bdd98599f80dfc34a04e5f9f9782461172d08d
BLAKE2b-256 checksum
How to use checksums
89854969878199c15e3159581f97b97965971c60cb05d17d157e71612033ff34
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 30, 2026.

Transparency log

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

Download URL jscpd-5.4.0-py3-none-musllinux_1_2_aarch64.whl
Size 15.9 MB
Tags Linux musl 1.2+ ARM64 Python 3
SHA-256 checksum
How to use checksums
53a84dab8bab239aa7a14a24917aeefdd3e9f6a791d34b298228e0975e4b5423
BLAKE2b-256 checksum
How to use checksums
8aa990fe7978ec0fafea61229104b4c5e4482d927c0556ce8b20b038bfb1bf71
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 30, 2026.

Transparency log

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

Download URL jscpd-5.4.0-py3-none-manylinux_2_34_x86_64.whl
Size 16.9 MB
Tags Linux glibc 2.34+ x86-64 Python 3
SHA-256 checksum
How to use checksums
5a227f4045e1f4d595a107c04cc7613e83ba49b2000f61ae71654434f9b51c49
BLAKE2b-256 checksum
How to use checksums
d99e3049d1d7af74e08c3fcc301aba553c59fddd79e68f5d5ba57386418a2b4c
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 30, 2026.

Transparency log

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

Download URL jscpd-5.4.0-py3-none-manylinux_2_34_aarch64.whl
Size 16.0 MB
Tags Linux glibc 2.34+ ARM64 Python 3
SHA-256 checksum
How to use checksums
ee6ff9142d50ac869845b16647441b5ba2877fe5440ec16c23673353536ac467
BLAKE2b-256 checksum
How to use checksums
6689b30a749a9b0f56931e1176a7397e8878cd7bdc7f9132e5d8bb6eec42a80b
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 30, 2026.

Transparency log

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

Download URL jscpd-5.4.0-py3-none-macosx_11_0_arm64.whl
Size 14.5 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
a6551874b2a2eecd80642673cb5675a290144daa6e847dd80e2d78ce9a8e4b94
BLAKE2b-256 checksum
How to use checksums
b10df7df119a36a447d5ed1d2af1717eca62b0260dfc786c105619c8c057bf30
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 30, 2026.

Transparency log

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

Download URL jscpd-5.4.0-py3-none-macosx_10_12_x86_64.whl
Size 15.1 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
b69fe5e68f1ddb00ed966af93dba2238cc5a773e53fa03d5e51175c19250c019
BLAKE2b-256 checksum
How to use checksums
c076e852018433a600a36d28b977078cb01458077120bafe70faa4a6a6d758e0
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 30, 2026.

Transparency log

Release history Release notifications | RSS feed

5.4.1

8 release files

This release

5.4.0 This release

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