BurntSushi /ripgrep
ripgrep recursively searches directories for a regex pattern while respecting your gitignore
★ 69,953⑂ 3,480👁 327⑃ 1,204● 1,840▤ 75◈ 433
69,953
stars
+28
3,480
forks
327
watchers
1,204
prs
1,840
issues
75
releases
433
discussions
README
ripgrep (rg) ------------ ripgrep is a line-oriented search tool that recursively searches the current directory for a regex pattern. By default, ripgrep will respect gitignore rules and automatically skip hidden files/directories and binary files. (To disable all automatic filtering by default, use rg -uuu.) 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 The Silver Searcher, ack and grep. Dual-licensed under MIT or the UNLICENSE. CHANGELOG Please see the CHANGELOG for a release history. Documentation quick links Installation User Guide Frequently Asked Questions Regex syntax Configuration files Shell completions Building Translations Screenshot of search results Quick examples comparing tools This example searches the entire Linux kernel source tree (after running make defconfig && make -j8) for [A-Z]+_SUSPEND, where all matches must be words. Timings were collected on a system with an Intel i9-12900K 5.2 GHz. Please remember that a single benchmark is never enough! See my blog post on ripgrep for a very detailed comparison with more benchmarks and analysis. | Tool | Command | Line count | Time | | ---- | ------- | ---------- | ---- | | ripgrep (Unicode) | rg -n -w '[A-Z]+_SUSPEND' | 536 | 0.082s (1.00x) | | hypergrep | hgrep -n -w '[A-Z]+_SUSPEND' | 536 | 0.167s (2.04x) | | git grep | git grep -P -n -w '[A-Z]+_SUSPEND' | 536 | 0.273s (3.34x) | | The Silver Searcher | ag -w '[A-Z]+_SUSPEND' | 534 | 0.443s (5.43x) | | ugrep | ugrep -r --ignore-files --no-hidden -I -w '[A-Z]+_SUSPEND' | 536 | 0.639s (7.82x) | | git grep | LC_ALL=C git grep -E -n -w '[A-Z]+_SUSPEND' | 536 | 0.727s (8.91x) | | git grep (Unicode) | LC_ALL=en_US.UTF-8 git grep -E -n -w '[A-Z]+_SUSPEND' | 536 | 2.670s (32.70x) | | ack | ack -w '[A-Z]+_SUSPEND' | 2677 | 2.935s (35.94x) | Here's another benchmark on the same corpus as above that disregards gitignore files and searches with a whitelist instead. The corpus is the same as in the previous benchmark, and the flags passed to each command ensure that they are doing equivalent work: | Tool | Command | Line count | Time | | ---- | ------- | ---------- | ---- | | ripgrep | rg -uuu -tc -n -w '[A-Z]+_SUSPEND' | 447 | 0.063s (1.00x) | | ugrep | ugrep -r -n --include='.c' --include='.h' -w '[A-Z]+_SUSPEND' | 447 | 0.607s (9.62x) | | GNU grep | grep -E -r -n --include='.c' --include='.h' -w '[A-Z]+_SUSPEND' | 447 | 0.674s (10.69x) | Now we'll move to searching on single large file. Here is a straight-up comparison between ripgrep, ugrep and GNU grep on a file cached in memory (~13GB, OpenSubtitles.raw.en.gz, decompressed): | Tool | Command | Line count | Time | | ---- | ------- | ---------- | ---- | | ripgrep (Unicode) | rg -w 'Sherlock [A-Z]\w+' | 7882 | 1.042s (1.00x) | | ugrep | ugrep -w 'Sherlock [A-Z]\w+' | 7882 | 1.339s (1.28x) | | GNU grep (Unicode) | LC_ALL=en_US.UTF-8 egrep -
Top issues
#875support more sophisticated boolean matching operations69 comments · 2018-04-03#1497RFC: add ngram indexing support to ripgrep48 comments · 2020-02-22#234Expand glob paths on Windows39 comments · 2016-11-13#273Implement such `--files-from` option32 comments · 2016-12-07#1719support default config paths when RIPGREP_CONFIG_PATH isn't set18 comments · 2020-10-30#1518ngram indexing implementation details17 comments · 2020-03-16#1112Consider supporting tar file15 comments · 2018-11-17#809add --include/--exclude flags, with correct precedence15 comments · 2018-02-16
Discussions
#3588Report a Security Advisory1 comments · 2026-11-02#3587Do the globs supported by `--type-add` support full-path matching, or only file-path matching? If the latter, why are `/`s accepted?1 comments · 2026-11-02#3575Is there any way to ignore unreadable files?1 comments · 2026-10-25#3443Can you try out my lewrep2 tool?0 comments · 2026-06-19#3441How do I enable hyperlinks on hidden paths in Konsole?2 comments · 2026-06-11#3411Best practices for scanning large numbers of small binary+text files — Nginx cache use case2 comments · 2026-05-21#3404Custom delimiter workaround2 comments · 2026-05-16#3392Embed Agent Friendly Code Score Badge0 comments · 2026-05-04
Latest release
15.2.0 15.2.0 2026-07-15Sponsorship is appreciated! This release fixes a number of bugs related to gitignore matching as well as some performance improvements in directory tree traversal. In case you haven't heard of it before, ripgrep is a line-oriented search tool that recursively searches the current directory for a regex pattern. By default, ripgrep will respect gitignore rules and automatically skip hidden files/directories and binary files. Platform support: aarch64-unknown-linux-musl is now included in the release binaries for ripgrep. Performance improvements: PERF 3293: Impr