8 stable releases

Uses new Rust 2024

new 5.0.8 Jun 12, 2026
5.0.7 Jun 11, 2026

#97 in Value formatting

MIT license

430KB
12K SLoC

jscpd (cpd)

Copy/paste detector — fast Rust-based CLI for code duplication detection.

A high-performance reimplementation of jscpd in Rust, providing near-identical CLI compatibility with 50x+ speed improvement.

Installation

cargo install jscpd

Usage

# Scan current directory
cpd .

# Scan specific paths
cpd src/ lib/

# Set minimum tokens, lines, and output format
cpd --min-tokens 50 --min-lines 5 --reporters json,console .

# List supported formats
cpd --list

# Enable git blame
cpd --blame .

Output Formats

console, json, xml, csv, html, markdown, sarif, xcode, badge, silent, ai, threshold

npm Distribution

Also available on npm as cpd with prebuilt binaries for Linux, macOS, and Windows.

License

MIT

Dependencies

~25MB
~427K SLoC