ripgrep
by Andrew Gallant (BurntSushi) · linked, not rehosted
Search your whole repo in milliseconds — and the tool your agent quietly greps with.
Add it to your project
Give your agent this prompt — it sets the repo up for you:
Set up ripgrep (rg) on my machine and in this project. Install it (brew install ripgrep, or the right way for my OS), then show me 3 example searches across my codebase and how to ignore build folders.
Open source (MIT OR Unlicense) · all rights to Andrew Gallant (BurntSushi).
What it's for & howRead it ↓Collapse ↑
What it is
ripgrep (rg) is a line-search tool that walks your whole project and finds
matches almost instantly, while respecting .gitignore by default. It's the
fastest way to answer "where is this used?" — and it's the search your coding
agent leans on under the hood.
When to reach for it
- You (or your agent) need to find every place a function, string, or TODO lives.
grepfeels slow or noisy on a big repo.- You want search that already skips
node_modules,dist, and friends.
Set it up
Install it once, then it just works from any terminal:
brew install ripgrep # macOS
# or: cargo install ripgrep, apt install ripgrep, choco install ripgrep
Then, for example: rg "useAuth" finds every usage; rg -t ts "TODO" limits to
TypeScript. Give your agent the prompt above and it'll wire this up for you.