gitmyhub

ripgrep

Rust ★ 65k updated 16d ago

ripgrep recursively searches directories for a regex pattern while respecting your gitignore

ripgrep (rg) is a blazing-fast command-line search tool that finds text patterns across files in your project, automatically skipping generated files, hidden folders, and binaries that grep would waste time on.

Rustsetup: easycomplexity 1/5

ripgrep (also called rg) is a command-line tool for searching the contents of files on your computer for a text pattern. It is similar to the classic Unix grep tool but is much faster and more developer-friendly. The problem it solves is that searching a large codebase with traditional grep can be slow and requires extra flags to behave well in software projects — for example, you usually do not want to search inside the .git folder, generated build files, or binary files. ripgrep handles all of this automatically.

By default, ripgrep respects your .gitignore file (the file that tells git which files to ignore), skips hidden files and directories, and skips binary files — meaning it only searches the source code you actually care about. It uses a high-performance regex engine built in Rust that is particularly fast at searching large files. The README includes benchmarks showing it is consistently faster than alternatives like The Silver Searcher, GNU grep, and ack across a range of search scenarios. You can search specific file types with flags like -tpy for Python files only, search multiple patterns at once, show surrounding context lines, and use colors to highlight matches. ripgrep works on Windows, macOS, and Linux. You would reach for it whenever you need to find where something appears in a project — looking for all usages of a function, finding which file defines a variable, or locating a specific error message. The tech stack is Rust, distributed as precompiled binaries or installable via package managers like brew, apt, or cargo.

Where it fits