A jscpd release is one Rust workspace published under several names. Everything lives under rust/; rust/scripts/sync-version.mjs keeps the versions below in step (the engine version comes from rust/package.json).
Path: rust/crates/cpd
crates.io: jscpd
Version: 5.4.1
The CLI. cargo install jscpd installs two identical binaries, jscpd and cpd. Its library target is internal (test helpers only); depend on the crates below for programmatic use. See Rust docs.
Path: rust/crates/cpd-core
crates.io: cpd-core
Version: 0.1.21
Core data models and the Rabin-Karp rolling hash implementation.
Path: rust/crates/cpd-tokenizer
crates.io: cpd-tokenizer
Version: 0.1.20
Source code tokenizer (224 formats, listed in FORMATS.md). Uses oxc_parser for JavaScript/TypeScript/JSX, and per-block tokenization for Vue SFC, Svelte, Astro, and Markdown. Pure — no filesystem or network access (enforced in CI).
Path: rust/crates/cpd-similarity
crates.io: cpd-similarity
Version: 0.1.0
Structural similarity, the pass of --similarity: the functions of JavaScript, TypeScript, Python, Java, Kotlin, Scala, C#, Go, Rust, C, C++, PHP, Ruby, Swift and Clojure from tree-sitter grammars and a Clojure reader, the normalized tree of each and the fingerprints of its subtrees, and the exact search for pairs whose fingerprint sets reach the threshold. Pure, with no filesystem or network access (enforced in CI).
Path: rust/crates/cpd-finder
crates.io: cpd-finder
Version: 0.1.21
File walking, orchestration, baseline handling, and git blame. Uses rayon for parallelism, ignore + globset for file matching. The entry point for the Rust API.
Path: rust/crates/cpd-reporter
crates.io: cpd-reporter
Version: 0.1.22
Output format rendering for the 15 reporters.
Path: rust/crates/cpd-semantic
crates.io: cpd-semantic
Version: 0.1.2
Semantic clones (--semantic, experimental): function extraction (oxc for JavaScript and TypeScript, the ruff parser for Python, a scanner for Rust, and tree-sitter grammars for C, C++, C#, Go, Java, Kotlin, PHP, Ruby, Scala and Swift), code embeddings from CodeRankEmbed or jina-embeddings-v2-base-code run in-process with candle or taken from an OpenAI-compatible API, the thresholds calibrated for nine models, a vector cache, and the pairing rule. It plugs into the finder as a clone pass (cpd_finder::pass::ClonePass), so the other crates build without its dependencies. Unlike the crates above, it reads and writes the user cache directory and makes network calls: the model download and the embeddings API.
All npm packages share the engine version (5.4.1). None of them needs a Node.js runtime to run jscpd — Node.js is only the delivery mechanism.
Path: rust/jscpd
npm: jscpd
Installs the jscpd command. A thin launcher that resolves the platform package below for the current OS/CPU and executes the binary.
Path: rust
npm: cpd
Installs the cpd command. Same launcher, same binary, shorter name.
Path: rust/npm/<package>
Each contains one prebuilt binary and is pulled in as an optional dependency of jscpd and cpd; npm installs only the one matching the host.
| Package | Rust target |
|---|---|
jscpd-darwin-arm64 |
aarch64-apple-darwin |
jscpd-darwin-x64 |
x86_64-apple-darwin |
jscpd-linux-arm64-gnu |
aarch64-unknown-linux-gnu |
jscpd-linux-arm64-musl |
aarch64-unknown-linux-musl |
jscpd-linux-x64-gnu |
x86_64-unknown-linux-gnu |
jscpd-linux-x64-musl |
x86_64-unknown-linux-musl |
jscpd-windows-arm64-msvc |
aarch64-pc-windows-msvc |
jscpd-windows-x64-msvc |
x86_64-pc-windows-msvc |
The same binaries are attached to every GitHub Release as jscpd-<platform>.tar.gz with checksums, Sigstore signatures and SLSA provenance, and packaged into the ghcr.io/kucherenko/jscpd Docker image.
| Channel | Source |
|---|---|
GitHub Action kucherenko/jscpd@v5 |
action.yml |
Docker ghcr.io/kucherenko/jscpd |
Dockerfile |
Nix github:kucherenko/jscpd |
flake.nix |
Homebrew brew install jscpd |
homebrew-core formula |
install.sh / install.ps1 |
https://jscpd.dev |
The TypeScript packages (jscpd@4, jscpd-server, @jscpd/core, @jscpd/finder, @jscpd/tokenizer, @jscpd/html-reporter, @jscpd/badge-reporter, jscpd-sarif-reporter, @jscpd/leveldb-store, @jscpd/redis-store) are maintained on the master-v4 branch.