>_ CLI Index
← Back

ripgrep

Recommended v14.1.1

Blazingly fast recursive search tool that respects gitignore rules

Agent Support
4/5
Platforms
macoslinuxwindows

Agent Usage Example

shell
rg -l 'TODO|FIXME|HACK' --type ts src/

Installation

brew install ripgrep

ripgrep (rg) is a line-oriented search tool that recursively searches directories for a regex pattern. Built in Rust, it is significantly faster than traditional grep and automatically respects .gitignore rules, skipping irrelevant files like node_modules and build artifacts.

AI coding agents use ripgrep as their primary code search tool. Its speed makes it practical to search entire codebases in milliseconds, finding function definitions, tracking down imports, locating configuration values, and identifying patterns across thousands of files. The --type flag allows filtering by language, while --json output enables structured result processing.

ripgrep supports Unicode, compressed file searching, and multiline patterns. Its sensible defaults — smart case sensitivity, hidden file skipping, and binary file detection — mean it produces useful results without extensive flag configuration, making it ideal for automated workflows.

Related Tools