The Silver Searcher
$ ag Community Low RiskThe Silver Searcher (ag) is a lightweight C-based code search tool that skips .gitignore and binary files automatically. While superseded in speed and JSON support by rg, it remains pre-installed on many developer images and CI boxes.
brew install the_silver_searcher Direct local execution via ag avoids RPC latency and works out of the box in standard shells.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Supports --nocolor, -l, and --vimgrep for scriptable parsing, but lacks structured --json output.
--vimgrepand--nocolorprovide predictable line-oriented output
Purely read-only local file scanning with .gitignore exclusions.
- Zero write or network side effects
Widely packaged via brew, apt, and dnf, though Windows support relies on third-party ports.
- Available in Homebrew and standard Linux repositories
Fast C implementation for medium codebases, though slower and less feature-rich than rg.
- Skips
.gitignoreand binary files automatically
Mature project largely in maintenance mode with infrequent upstream releases.
- Stable legacy OSS codebase under Apache-2.0
Standard man page and --help cover core search flags clearly.
- Built-in man page and concise
--help
Security, Auth & Guardrails
None required; reads local files only.
100% free, offline, and open-source (Apache-2.0).
# ag (The Silver Searcher) Agent Rules - Prefer `rg` when available; when using `ag`, pass `--nocolor` and `-l` or `--vimgrep` for clean parsing. - Treat exit code `1` as zero matches rather than an execution error.
Agent-Ready Command Recipes
Safe Read-Only Queries
ag -l --nocolor "FIXME" src/
Returns only matching filenames with ANSI color disabled.
ag --vimgrep --nocolor "createClient" src/
Prints path:line:col:text lines that agents can parse without JSON.
Strengths for Agents
- + Strictly read-only with automatic
.gitignorefiltering and--vimgrepoutput. - + Commonly available on legacy Linux environments where
rgis absent.
Caveats & Pitfalls
- ! No
--jsonoutput format; preferrgwhen both are installed. - ! Upstream development is largely inactive compared to modern Rust search tools.