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

Total release size: 115.0 MB

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

Download URL jscpd-5.3.3-py3-none-win_arm64.whl
Size 13.2 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
939eaafbbf8194f15ac9c9aeb19a0f5051ae049b5c3213006d9de6caca3ee6c2
BLAKE2b-256 checksum
How to use checksums
ba9b5c3d262642f3ca3263605bda9800a51de41550e9662c45c3f9289888de7e
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 28, 2026.

Transparency log

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

Download URL jscpd-5.3.3-py3-none-win_amd64.whl
Size 13.8 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
d6a9e48b2d606e893d3b05a4a623c054e526f915e1b44ba08b5aedd4c629e367
BLAKE2b-256 checksum
How to use checksums
1f8e615cefaa674eda399b1ac719d3cb08e5fbbb2ab9a352b911ddf95e39b595
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 28, 2026.

Transparency log

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

Download URL jscpd-5.3.3-py3-none-musllinux_1_2_x86_64.whl
Size 15.9 MB
Tags Linux musl 1.2+ x86-64 Python 3
SHA-256 checksum
How to use checksums
83cba0bcf3d166406fb47971153bff5d2e7ac75c6e4823bc5958bd6d3aa5d557
BLAKE2b-256 checksum
How to use checksums
95b46f6db9ea8400036a73774488112437ff255955f537daa941aad6e75e6154
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 28, 2026.

Transparency log

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

Download URL jscpd-5.3.3-py3-none-musllinux_1_2_aarch64.whl
Size 14.7 MB
Tags Linux musl 1.2+ ARM64 Python 3
SHA-256 checksum
How to use checksums
39eb90329f234be7514f73cd03c65802922672187a9d2b45143b10a77a1c7a16
BLAKE2b-256 checksum
How to use checksums
ab5855a78fcc389f75e84f277d606c0fa2a17a48ebf58cd959567820a556bd7c
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 28, 2026.

Transparency log

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

Download URL jscpd-5.3.3-py3-none-manylinux_2_34_x86_64.whl
Size 15.5 MB
Tags Linux glibc 2.34+ x86-64 Python 3
SHA-256 checksum
How to use checksums
2defbd6364d2e01432ea9f2a5856355af591275763c483a623e605601da03625
BLAKE2b-256 checksum
How to use checksums
5afbd6227ea12901c67d784c1a3cbe1648067c98346c840236006bdb3dcc85f4
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 28, 2026.

Transparency log

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

Download URL jscpd-5.3.3-py3-none-manylinux_2_34_aarch64.whl
Size 14.8 MB
Tags Linux glibc 2.34+ ARM64 Python 3
SHA-256 checksum
How to use checksums
4e483b5311c7cb9c0d1a826895021e5095a15a52cd862e5442397d9d4ae5abc6
BLAKE2b-256 checksum
How to use checksums
e674f2f76ab0c68d5ef56e576dc1b0720bd3aed1de3abc3eed99a0e4e09bbb9e
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 28, 2026.

Transparency log

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

Download URL jscpd-5.3.3-py3-none-macosx_11_0_arm64.whl
Size 13.3 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
e0141143add509af1f1ac4b2601bc3dfc3a70205376daefbbb83e93192028075
BLAKE2b-256 checksum
How to use checksums
cc3d9f3a27f8e826ed372a2c7c9c956506f47694d7048ee06a808d38351bd86d
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 28, 2026.

Transparency log

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

Download URL jscpd-5.3.3-py3-none-macosx_10_12_x86_64.whl
Size 13.8 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
260960eef31b616ff5a8b7c6eca5d706a31989aade074943f3483266e1ef1230
BLAKE2b-256 checksum
How to use checksums
f289bdc0dae1525ccf981491de654b2c8ade8c3adf268c8fb3646f4e44691168
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 28, 2026.

Transparency log

Release history Release notifications | RSS feed

5.4.1

8 release files

5.4.0

8 release files

This release

5.3.3 This release

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