A fast, user-friendly command-line alternative to the Unix find command for locating files and directories by name.
BurntSushi/ripgrep
A line-oriented regex search tool (rg) that recursively searches directories while respecting .gitignore rules by default.
- Stars
- 69,284
- Forks
- 5,410
- Open issues
- 220
- Last commit
- 3 months ago
What is it?
ripgrep is a command-line tool that recursively searches the current directory for a regex pattern. By default it skips files ignored by .gitignore, .ignore and .rgignore rules, as well as hidden and binary files, which suits code search. Automatic filtering can be turned off with rg -uuu.
The tool supports file type filters such as -tpy and -Tjs, context lines, multiple patterns, colored output and full Unicode matching. It can optionally switch to PCRE2 for look-around and backreferences, search text in encodings such as UTF-16, latin-1, GBK and Shift_JIS, and read compressed files in formats like gzip, xz and zstandard. Custom preprocessors and a configuration file are also supported.
ripgrep runs on Windows, macOS and Linux, with prebuilt binaries and packages available for many distributions, Homebrew, Chocolatey and others. It is written in Rust and can be built with cargo.
Key features
- 01Recursive regex search that respects .gitignore, .ignore and .rgignore by default.
- 02Skips hidden and binary files automatically, with an option to disable filtering.
- 03File type filters to include or exclude specific languages and formats.
- 04Optional PCRE2 engine for look-around and backreferences.
- 05Searches non-UTF-8 encodings and compressed archives.
- 06Runs on Windows, macOS and Linux.
Use cases
- Searching a large codebase for a function name or pattern while ignoring build output and vendored dependencies.
- Finding text across Python or JavaScript files using language type filters.
- Searching compressed logs or legacy-encoded text files directly from the command line.
Quick start
- 1
Install ripgrep with Homebrew
brew install ripgrep - 2
Search the current directory for a pattern (binary is named rg)
rg PATTERN
Things to know
- Not POSIX or ubiquitous, so grep remains the portable choice.
- By default it skips hidden, binary and gitignored files, which can surprise users expecting grep behavior.
Topics
FAQ
- What is ripgrep?
- A line-oriented regex search tool (rg) that recursively searches directories while respecting .gitignore rules by default. ripgrep is a command-line tool that recursively searches the current directory for a regex pattern. By default it skips files ignored by .gitignore, .ignore and .rgignore rules, as well as hidden and binary files, which suits code search. Automatic filtering can be turned off with rg -uuu.
- Is ripgrep free to use? What license does it have?
- ripgrep is open source under the Unlicense license. Check the license terms before using it in commercial products.
- Is ripgrep still maintained?
- Updated within 6 months. The last commit to ripgrep was on Aug 4, 2026.
- What can I use ripgrep for?
- Searching a large codebase for a function name or pattern while ignoring build output and vendored dependencies. Finding text across Python or JavaScript files using language type filters. Searching compressed logs or legacy-encoded text files directly from the command line.
- How do I install ripgrep?
- Install ripgrep with Homebrew: brew install ripgrep Search the current directory for a pattern (binary is named rg): rg PATTERN
- Where can I get ripgrep?
- The source code and installation instructions are on GitHub: https://github.com/BurntSushi/ripgrep
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A smarter cd command that learns your most-used directories and lets you jump to them with a few keystrokes, across all major shells.
A fast, multi-threaded command-line string search tool that is grep-compatible, with SIMD acceleration and regex support.
CLI proxy that filters and compresses shell command output before it reaches an AI coding agent's context, cutting token use.
A cat(1) clone for the terminal with syntax highlighting, Git change markers, and automatic paging.
A terminal directory navigator that shows trees with unlisted content collapsed, with fuzzy search, file operations, previews and git status.