← Back to registry

ripgrep search

Blazingly fast recursive search tool

ripgrep (rg) is a line-oriented search tool that recursively searches directories for a regex pattern. It is significantly faster than grep and respects .gitignore rules by default.

Features

Install

brew: brew install ripgrep
apt: sudo apt install ripgrep
cargo: cargo install ripgrep

Commands

CommandSyntaxDescription
rg rg <pattern> [path] Search for a regex pattern in files
rg -t rg -t <type> <pattern> Search only in files of a specific type
rg -l rg -l <pattern> List only filenames containing matches
rg --json rg --json <pattern> Output results in JSON format for programmatic use

Links

Agent Usage Example

Use cases:

Example workflow:

rg --json 'TODO|FIXME' --type py | jq '.data.lines.text'