Install ripgrep for faster search
Grep Toolβ
Claude Code has a built-in Grep tool powered by ripgrep for searching code:
- Fast regex search: Full regex pattern support
- Smart filtering: Filter by file type (
type: "js") or glob patterns (glob: "*.ts") - Multiple output modes:
content- shows matching lines with contextfiles_with_matches- shows only file pathscount- shows match counts
- Respects .gitignore: Automatically excludes ignored files
- Context lines: Supports
-A,-B,-Cflags for surrounding context
Performance Tipβ
Installing ripgrep on your system makes the Grep tool significantly faster (5-10x), especially in large codebases. Claude Code will automatically use it if available.
# Verify ripgrep is installed
rg --version
Without ripgrep installed, searches may fall back to slower methods.
Interesting discussion can be found at Quick & easy tip to make claude code find stuff faster (it really works)