# 使用 Homebrew, pacman 安装 cgrep

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

## 安装

```sh
sudo av install brew:cgrep
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install cgrep
```

  证据: local Homebrew formula metadata

### Linux

- pacman (92%):

```sh
sudo pacman -S cgrep
```

  证据: Arch Linux sync databases: cgrep from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

## 软件包事实

- **软件包键:** brew:cgrep
- **软件包管理器:** Homebrew
- **版本:** 9.2.3
- **来源摘要:** Context-aware grep for source code
- **主页:** <https://awgn.github.io/cgrep/>
- **仓库:** <https://github.com/awgn/cgrep>
- **最后更新:** 2026-07-22T03:24:51Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- cgrep (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

CGrep is a Haskell context-aware grep for source code that searches by code, comment, literal, token kind, file type, and semantic patterns.

### 项目历史

The official documentation frames CGrep as an extension of traditional grep for source code, adding language-aware context filters and semantic matching.

### 采用历史

The project is distributed through Hackage and from source on GitHub. Official docs document cabal, stack, and source installation paths.

### 使用方式

CGrep is used to search source trees while limiting matches to code, comments, string literals, identifiers, native types, keywords, numbers, operators, file kinds, languages, or test/non-test code.

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

CGrep is interesting to package maintainers because it sits in the family of grep replacements but uses language parsing and Haskell packaging rather than plain byte or regex scanning alone.

### 时间线

- v8.0.0: Changelog notes performance improvements and expanded language/configuration support.
- v9.2: Official docs describe faster token and semantic search, UTF-8 support, and semantic test filtering.
- v9.2.2: Official homepage documents this release line.

### Related projects

- The official README links CGrep to Hackage for package distribution and GitHub for source development.

### 来源

- <https://api.github.com/repos/awgn/cgrep>
- <https://github.com/awgn/cgrep>
- <https://awgn.github.io/cgrep/>
- <https://awgn.github.io/cgrep>
- <https://github.com/awgn/cgrep#readme>
- <https://formulae.brew.sh/api/formula/cgrep.json>
- <https://github.com/awgn/cgrep/blob/master/CHANGELOG.md>
- <https://github.com/awgn/cgrep/blob/master/README.md>


## 安全说明

没有找到 cgrep 的匹配本地密钥处理 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: ./.cgreprc, ~/.cgreprc, /etc/cgreprc
## 其他软件包管理器记录

- pacman - cgrep - 8.1.0-152: normalized package name match | Arch Linux sync databases: cgrep from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | A context-aware grep for source codes | https://awgn.github.io/cgrep/


## Combined YAML source

View the package source record on GitHub. [combined/cgrep.yml](https://github.com/mxcl/pkgdb/blob/main/combined/cgrep.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
