ripgrep

ripgrep is a line-oriented search tool that recursively searches your current directory for a regex pattern. By default, rg will respect your .gitignore and automatically skip hidden files/directories and binary files. ripgrep has first class support on Windows, macOS and Linux, with binary downloads available for every release. ripgrep is similar to other popular search tools like ack and ag.

ripgrep searching a codebase
ripgrep searching a codebase

Basic usage

rg pattern
rg -t py pattern        # search only Python files
rg -l pattern           # list only matching filenames
rg --no-ignore pattern  # ignore .gitignore rules
rg -i pattern           # case-insensitive search