Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

The Silver Searcher

$ ag Community Low Risk
Geoff Greer (OSS) · Files & Search · Apache-2.0 · macos / linux / windows

The 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.

FCRS-1.0 Score
84 /100
Good
Medium Confidence
Zero-Friction Install
brew install the_silver_searcher
CLI vs MCP Decision CLI Preferred vs MCP

Direct local execution via ag avoids RPC latency and works out of the box in standard shells.

Agent-Readiness Checklist

— JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
✓ Read-Only Mode
✓ NO_COLOR Clean
— Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 19 / 25

Supports --nocolor, -l, and --vimgrep for scriptable parsing, but lacks structured --json output.

  • --vimgrep and --nocolor provide predictable line-oriented output
Trust & Safety 24 / 25

Purely read-only local file scanning with .gitignore exclusions.

  • Zero write or network side effects
Setup & Portability 13 / 15

Widely packaged via brew, apt, and dnf, though Windows support relies on third-party ports.

  • Available in Homebrew and standard Linux repositories
Utility & Efficiency 13 / 15

Fast C implementation for medium codebases, though slower and less feature-rich than rg.

  • Skips .gitignore and binary files automatically
Maintenance & Lineage 7 / 10

Mature project largely in maintenance mode with infrequent upstream releases.

  • Stable legacy OSS codebase under Apache-2.0
Docs & Verifiability 8 / 10

Standard man page and --help cover core search flags clearly.

  • Built-in man page and concise --help

Security, Auth & Guardrails

Auth Modes
No Auth
Credential Storage

None required; reads local files only.

Side Effects
Read-Only
Cost & Quotas

100% free, offline, and open-source (Apache-2.0).

Copyable Guardrail for CLAUDE.md / AGENTS.md
# 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

List file paths matching pattern
ag -l --nocolor "FIXME" src/

Returns only matching filenames with ANSI color disabled.

Emit machine-friendly line-column matches
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 .gitignore filtering and --vimgrep output.
  • + Commonly available on legacy Linux environments where rg is absent.

Caveats & Pitfalls

  • ! No --json output format; prefer rg when both are installed.
  • ! Upstream development is largely inactive compared to modern Rust search tools.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI