# vendor/ripgrep

ripgrep（`rg`）二进制 —— Grep 工具的底层引擎。
6 个平台共约 30MB；commit 进 git 让 `clone` 即可跑，无需用户额外装。

## 目录结构

```
vendor/ripgrep/
├── arm64-darwin/rg       # Apple Silicon Mac
├── arm64-linux/rg        # ARM Linux (树莓派、aarch64 服务器)
├── arm64-win32/rg.exe    # ARM Windows
├── x64-darwin/rg         # Intel Mac
├── x64-linux/rg          # x86_64 Linux
├── x64-win32/rg.exe      # x86_64 Windows
└── COPYING               # 双重许可证 MIT / Unlicense
```

`src/tools/rgPath.ts` 按 `${process.arch}-${process.platform}` 自动挑对应平台的二进制。

## 来源

复制自 `@anthropic-ai/claude-code` 全局 npm 包的 `vendor/ripgrep/`，
即 Claude Code CLI 用的同一份原料。版本 ripgrep 14.x。

## 许可证

ripgrep 双重许可：MIT 或 Unlicense（详见 `COPYING`），可自由分发。

## 升级

把新版 rg 二进制按相同目录结构覆盖即可。可以从：
- 官方 release: https://github.com/BurntSushi/ripgrep/releases
- 或重新拷贝最新版 `@anthropic-ai/claude-code/vendor/ripgrep/`
