ripgrep
agent-ready json output non-interactive
An extremely fast recursive text search tool. Searches directories for regex patterns with smart filtering, making it ideal for codebase exploration.
How to install ripgrep
brew install ripgrep When to use ripgrep
- When searching for a specific regex pattern across a large codebase quickly, especially with gitignore-aware filtering.
- When needing to extract structured results (e.g., file paths, line numbers) for further processing, using JSON output.
- When searching within specific file types (e.g., only .py or .js files) to narrow down results in a project.
When not to use ripgrep
- When the task requires complex pattern matching beyond regex capabilities (e.g., context-sensitive parsing) or structural code queries.
- When performing interactive, incremental search where tools like fzf or fuzzy finders are more appropriate.
ripgrep features
- · Respects .gitignore
- · Regex search
- · JSON output with --json
- · Multi-threaded
- · File type filtering
Want your agent to find this automatically?
Add the MCP server to your agent config and it will discover tools like ripgrep on its own.
Set up MCP →