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

Total release size: 30.2 MB

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

Download URL jscpd-5.2.1-py3-none-win_arm64.whl
Size 3.4 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
3b95d2cfd5fb700c273d4425b57f7e2f14cc6285a77944bcafedebdcf1e1604f
BLAKE2b-256 checksum
How to use checksums
bee0285303ce6c3f46f04cdd24926fccf1d1060a9ac9e2b2e6d1d7fdd59e8360
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 15, 2026.

Transparency log

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

Download URL jscpd-5.2.1-py3-none-win_amd64.whl
Size 3.6 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
b1e575297c66f74e8b0ef964d670b9685f1f02cd40722edc92b9fa75439fb51f
BLAKE2b-256 checksum
How to use checksums
908b8635588460be869e19415f735a2dff0a8820ffd6981f9dc66763543ba6fb
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 15, 2026.

Transparency log

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

Download URL jscpd-5.2.1-py3-none-musllinux_1_2_x86_64.whl
Size 4.2 MB
Tags Linux musl 1.2+ x86-64 Python 3
SHA-256 checksum
How to use checksums
529f804cc6a1aeb4cd83b51be94a3d6ee48d9e8a42ba46712c877d9bb537a6d3
BLAKE2b-256 checksum
How to use checksums
7855b2c66a6727da723535e6caa5bfbcfe21fe0abb5a8396f5cb14a39c072eae
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 15, 2026.

Transparency log

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

Download URL jscpd-5.2.1-py3-none-musllinux_1_2_aarch64.whl
Size 3.8 MB
Tags Linux musl 1.2+ ARM64 Python 3
SHA-256 checksum
How to use checksums
d2290eb6e3a685f8c56b5ae1f79ddd08568930017f867cb2d36648b2635e7778
BLAKE2b-256 checksum
How to use checksums
b483cbac6a58f21a45507c1528489bcef00a9c406cafb21baee0abafa5796262
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 15, 2026.

Transparency log

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

Download URL jscpd-5.2.1-py3-none-manylinux_2_34_x86_64.whl
Size 4.1 MB
Tags Linux glibc 2.34+ x86-64 Python 3
SHA-256 checksum
How to use checksums
679d1728909880b692968bf5398ed3363b1981cb0f991237d491d82ed49f9a4d
BLAKE2b-256 checksum
How to use checksums
15ae39a8de85c7bdbb8deb9389a2fa91791834f3e4e1892382531425450a5b40
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 15, 2026.

Transparency log

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

Download URL jscpd-5.2.1-py3-none-manylinux_2_34_aarch64.whl
Size 3.8 MB
Tags Linux glibc 2.34+ ARM64 Python 3
SHA-256 checksum
How to use checksums
f246208435d9022752a119a9a55af4e3b848bf6ec917958d895cab6a52e42ccd
BLAKE2b-256 checksum
How to use checksums
f7876746ac84fd593dea5fe22a799225b22b7d48dccdcd4db4419b3a84f51839
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 15, 2026.

Transparency log

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

Download URL jscpd-5.2.1-py3-none-macosx_11_0_arm64.whl
Size 3.5 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
c5e375e3e4fd284f90930003d0b23eaf7e21531727ccc02127ef70500ad35689
BLAKE2b-256 checksum
How to use checksums
9f63a0dc7e053a19de9765af05bdc1fc6cf96b367b06736af97b164540277308
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 15, 2026.

Transparency log

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

Download URL jscpd-5.2.1-py3-none-macosx_10_12_x86_64.whl
Size 3.9 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
27adb3b5955f020e12f18d1b64d8f42affd2e6a2b82d8cbfd953b20d45fd1752
BLAKE2b-256 checksum
How to use checksums
8840a320fe33998286b6db184bd6ccdbaaac8b44abb9f32dfc8104f17d26aa02
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 15, 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

5.3.1

8 release files

5.3.0

8 release files

This release

5.2.1 This release

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