# 使用 Homebrew, apk 安装 jscpd

查看 jscpd 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:jscpd
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install jscpd
```

  证据: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add cpd
```

  证据: Alpine Linux edge package indexes: cpd from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

## 软件包事实

- **软件包键:** brew:jscpd
- **软件包管理器:** Homebrew
- **版本:** 5.0.14
- **来源摘要:** Copy/paste detector for programming source code
- **主页:** <https://jscpd.dev/>
- **仓库:** <https://github.com/kucherenko/jscpd>
- **最后更新:** 2026-07-27T12:42:02Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- cpd (别名)
- jscpd (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 5.0.14
## 项目历史与用法

jscpd is a copy/paste detector for source code. It scans files for duplicated token sequences, reports clones in multiple formats, and is used as a code-quality gate in local development and CI.

### 项目历史

The GitHub repository was created in May 2013, and the npm package history begins in June 2013. The name originally stood for JavaScript Copy/Paste Detector, but the project expanded well beyond JavaScript into a broad multi-language duplicate-code scanner.

The README describes the detection engine as Rabin-Karp based. By 2026 the project documentation described support for more than 220 formats, multiple reporters, GitHub Action integration, an MCP server, AI-oriented reporter output, and a Rust-powered v5 engine.

### 采用历史

jscpd gained adoption as a lightweight alternative to heavier static-analysis suites for teams that wanted to fail builds or generate reports when duplication crossed a threshold. The npm package had a long 0.x to 4.x TypeScript/Node.js history before the 5.x Rust-native release line appeared in June 2026.

Homebrew packages jscpd as a CLI, npm distributes it for JavaScript toolchains, and the project site promotes curl, npm, cargo, brew, and nix installation paths. That multi-channel distribution matches its role as a language-agnostic source-code utility.

### 使用方式

Developers run jscpd against a repository or source directory, tune thresholds and ignore patterns through configuration such as .jscpd.json, and consume terminal, JSON, HTML, badge, CI, or AI-oriented reports.

### 为什么软件包爱好者会关心

jscpd is notable because duplicate-code detection sits between linting, static analysis, and build policy. The 2026 Rust rewrite also makes it a packaging case study: a Node-era CLI kept its ecosystem-facing package names while shifting core performance-sensitive work into a native binary.

### 时间线

- 2013: GitHub repository and npm package history began.
- 2018: jscpd 1.0.0 was published after years of 0.x releases.
- 2020: jscpd 3.x releases continued the Node.js/TypeScript era.
- 2024: jscpd 4.0.0 was published on npm.
- 2026: jscpd 4.2.x and 5.0.x releases appeared, with project docs presenting v5 as a Rust-powered rewrite.

### Related projects

- Related projects include PMD CPD, Simian, SonarQube duplication detection, MegaLinter's jscpd integration, and jscpd's own GitHub Action and MCP server packages.

### 来源

- <https://formulae.brew.sh/formula/jscpd>
- <https://github.com/kucherenko/jscpd>
- <https://github.com/kucherenko/jscpd/releases>
- <https://jscpd.dev/>
- <https://registry.npmjs.org/jscpd>
- <https://www.npmjs.com/package/jscpd>


## 安全说明

没有找到 jscpd 的匹配本地密钥处理 manifest。Nucleus 软件包元数据仍在此发布，以便未来覆盖拥有稳定的软件包 URL。



## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: .jscpd.json
## 其他软件包管理器记录

- apk - cpd - 0.5.5-r1: installed executable or alias match | Alpine Linux edge package indexes: cpd from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | C++ implementation of the Coherent Point Drift point set registration algorithm. | https://github.com/gadomski/cpd
- apk - cpd-dev - 0.5.5-r1: installed executable or alias match | Alpine Linux edge package indexes: cpd-dev from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | C++ implementation of the Coherent Point Drift point set registration algorithm. (development files) | https://github.com/gadomski/cpd


## Combined YAML source

View the package source record on GitHub. [combined/jscpd.yml](https://github.com/mxcl/pkgdb/blob/main/combined/jscpd.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
