jscpd
jscpd
Copy-paste detector for JavaScript, TypeScript, and many other languages.
Quick Start
# With ignore patterns
bunx jscpd --ignore "**/node_modules/**,**/dist/**" <path>
Common Options
| Option | Description |
|---|---|
--min-tokens N |
Minimum tokens for duplicate detection |
--min-lines N |
Minimum lines for duplicate detection |
--threshold N |
Fail if duplication % exceeds threshold |
--ignore "glob" |
Ignore patterns (comma-separated) |
--reporters type |
Output format: console, json, html |
--output path |
Output directory for reports |
--silent |
Suppress console output |
Workflow
- Run jscpd to find duplicates
- Review the reported duplicates
- Refactor to eliminate duplication
- Re-run to verify cleanup
Related Skills
- maintenance: Refactoring and technical debt management
- design: DRY principle violations
- ast-grep: Structural refactoring of duplicated patterns
More from knoopx/pi
podman
Manages containers, builds images, configures pods and networks with Podman. Use when running containers, creating Containerfiles, grouping services in pods, or managing container resources.
123jujutsu
Manages version control with Jujutsu (jj), including rebasing, conflict resolution, and Git interop. Use when tracking changes, navigating history, squashing/splitting commits, or pushing to Git remotes.
117nix-flakes
Creates reproducible builds, manages flake inputs, defines devShells, and builds packages with flake.nix. Use when initializing Nix projects, locking dependencies, or running nix build/develop commands.
54scraping
Fetches web pages, parses HTML with CSS selectors, calls REST APIs, and scrapes dynamic content. Use when extracting data from websites, querying JSON APIs, or automating browser interactions.
48yt-dlp
Downloads videos from YouTube and other sites using yt-dlp. Use when downloading videos, extracting metadata, or batch downloading multiple files.
42nix
Runs packages temporarily, creates isolated shell environments, and evaluates Nix expressions. Use when executing tools without installing, debugging derivations, or working with nixpkgs.
42