ugrep
A grep-compatible file searcher with an interactive TUI, archive search and Boolean queries.
What is ugrep?
ugrep is a file searcher written in C++ that accepts GNU grep's options and regex syntax, so it can stand in for grep in existing commands. On top of that it adds an interactive query TUI (ug -Q), Boolean AND/OR/NOT patterns, fuzzy matching, search inside zip, tar and compressed files, and document search through filter tools. It comes as two commands: ugrep for batch use, and ug, which also reads a .ugrep config file.
Robert van Engelen of Genivia Inc. wrote it and maintains it under the BSD-3-Clause licence. There is no paid edition or support plan.
The current release is 7.8.5 (15 September 2026). It skips hidden files by default but, unlike ripgrep, applies .gitignore only when you pass --ignore-files. Its README calls it typically faster than ripgrep and GNU grep, citing the project's own benchmark repository. Ubuntu 24.04 still packages 5.0.0.
Our review
4.0The best pick if you want grep's interface with modern extras: your existing grep commands keep working, and you gain a search TUI, archive search and Boolean queries. It was about 4.5x faster than GNU grep across the Linux kernel in our run, but ripgrep was still about 20% faster, and ugrep doesn't skip gitignored files unless asked.
Pros
- + Accepts GNU grep's options and regex syntax, so it drops into existing commands and scripts
- + Interactive -Q TUI, Boolean queries, fuzzy matching and search inside archives and compressed files
- + About 4.5x faster than GNU grep on recursive kernel searches in our run, with identical results
Cons
- − Behind ripgrep on both of our kernel searches, despite the README's 'typically faster' claim
- − An open regex bug drops line-start matches in some alternation groups without a warning (#573, open as of 2026-11-15)
Reviewed by SeekDeploy Editorial · updated 2026-11-15. Reviews are independent — we don’t accept payment for coverage or ratings.
Should you use ugrep?
A good fit if you're…
- People who want grep's options and regex syntax, so existing commands keep working, with Unicode and recursion on top
- Searching inside archives, compressed logs and documents (-z, --filter) without unpacking them first
- Exploring an unfamiliar codebase with the -Q TUI instead of re-running searches by hand
Probably not for you if you're…
- Developers who expect build output and vendored files to be skipped by default: that takes --ignore-files or a .ugrep config
- Scripts that rely on `^` inside alternation groups, until #573 is fixed (open as of 2026-11-15)
Pick something else if…
- you mostly search code repos and want .gitignore honoured out of the box; it was about 20% faster than ugrep on both of our Linux kernel searches → ripgrep
- you need what's already installed everywhere; ugrep was about 4.5x faster on the same recursive kernel searches, with identical output → GNU grep
Gotchas to know before you commit
- `ug` loads a .ugrep config from the working or home directory and `ugrep` doesn't, so the same search can behave differently depending on which you typed
- .gitignore is not applied unless you pass --ignore-files; hidden files are skipped by default and -. includes them
- A `^` anchor inside an alternation group, as in `(^|[^0-9])N`, can silently fail to match where GNU grep matches (#573, reported against 7.8.4 and 7.8.5, open as of 2026-11-15)
- Ubuntu 24.04's apt package is 5.0.0; Homebrew has the current 7.8.5
ugrep pricing
ugrep is free open-source software with no paid edition, hosted service or support plan from its maintainers. It never gets expensive; the only cost is your time configuring it.
- ugrep, ug and the ugrep-indexer
- Query TUI, archive and document search
What it costs in practice
| Solo developer | $0 No licence fee, account or subscription. |
|---|---|
| Team of 50 | $0 Same licence for every seat: BSD-3-Clause. |
Estimates in USD from list prices. Your bill depends on usage, region, and discounts.
Health & activity
From Genivia/ugrep. Counts cover the last 90 days unless noted.
Downloads
- Homebrew ·
ugrep4.2k installs, last 30 days
Benchmarks
Literal search, Linux kernel
We ran thisWall-clock time to recursively search the Linux kernel tree for the literal PM_RESUME and print every matching line with line numbers · ms, lower is better
- ripgrep 15.2.0227 ms
- ugrep 7.8.5290.5 ms
- git grep (git 2.43.0)404.8 ms
- GNU grep 3.111,315.6 ms
How this was measured
WAIT_QUIET=1 benchmarks/ripgrep/run.sh CORPUS. Commands: `rg -n -e 'PM_RESUME'`, `ugrep -rn -e 'PM_RESUME'`, `grep -rnE --exclude-dir=.git -e 'PM_RESUME' .` and `git grep -nE -e 'PM_RESUME'`. hyperfine --output=pipe, because GNU grep stops at the first match when stdout is /dev/null. Interleaved: 6 rounds of hyperfine (1 warmup + 2 timed runs per command per round, command order reversed every other round), pooled to n=12 per command; mean reported (stddev: rg 14.5, ugrep 26.1, git grep 18.2, GNU grep 35.0 ms). The script refuses to start at 1-minute load 1.5 or above, and WAIT_QUIET=1 holds each round until load is below 1.5 again. All four found 38 matching lines; ugrep's output was line-for-line identical to ripgrep's. Corpus: Linux kernel shallow clone, commit aebb7274 (7.4-rc3, 15 Nov 2026), 97,371 tracked files, warm page cache. LC_ALL=C.UTF-8. This run replaces the 15 Nov morning figures, which were on a different host (2.10 GHz Xeon) and kernel commit.
Environment: 4 vCPU Intel Xeon @ 2.30GHz (x86_64), 15 GB RAM, Ubuntu 24.04.5 container on Linux 6.18.44, shared host. Run 23:02-23:04 UTC. Rounds started at 1-minute load 0.63-1.43. A process snapshot every 15 s showed nothing else above 2% CPU; the peaks between rounds came from the searches' own threads.
Versions: ripgrep 15.2.0, ugrep 7.8.5 (conda-forge build), GNU grep 3.11, git 2.43.0, hyperfine 2.0.0
Run Nov 15, 2026
Regex search, Linux kernel
We ran thisWall-clock time to recursively search the Linux kernel tree for the regex [A-Z]+_SUSPEND and print every matching line with line numbers · ms, lower is better
- ripgrep 15.2.0235.2 ms
- ugrep 7.8.5289.7 ms
- GNU grep 3.111,285.9 ms
- git grep (git 2.43.0)8,464.3 ms
How this was measured
WAIT_QUIET=1 benchmarks/ripgrep/run.sh CORPUS. Commands: `rg -n -e '[A-Z]+_SUSPEND'`, `ugrep -rn -e '[A-Z]+_SUSPEND'`, `grep -rnE --exclude-dir=.git -e '[A-Z]+_SUSPEND' .` and `git grep -nE -e '[A-Z]+_SUSPEND'`. hyperfine --output=pipe, because GNU grep stops at the first match when stdout is /dev/null. Interleaved: 6 rounds of hyperfine (1 warmup + 2 timed runs per command per round, command order reversed every other round), pooled to n=12 per command; mean reported (stddev: rg 7.3, ugrep 17.3, GNU grep 25.1, git grep 647.8 ms). The script refuses to start at 1-minute load 1.5 or above, and WAIT_QUIET=1 holds each round until load is below 1.5 again. All four found 5,955 matching lines; ugrep's output was line-for-line identical to ripgrep's. Corpus: Linux kernel shallow clone, commit aebb7274 (7.4-rc3, 15 Nov 2026), 97,371 tracked files, warm page cache. LC_ALL=C.UTF-8. This run replaces the 15 Nov morning figures, which were on a different host (2.10 GHz Xeon) and kernel commit.
Environment: 4 vCPU Intel Xeon @ 2.30GHz (x86_64), 15 GB RAM, Ubuntu 24.04.5 container on Linux 6.18.44, shared host. Run 23:04-23:09 UTC. Rounds started at 1-minute load 1.39-1.47 and load peaked at 2.40 between rounds, all of it from git grep's 4-thread, 8-second searches and GNU grep (process snapshots every 15 s showed nothing else above 2% CPU). git grep's figure is the one most exposed to that.
Versions: ripgrep 15.2.0, ugrep 7.8.5 (conda-forge build), GNU grep 3.11, git 2.43.0, hyperfine 2.0.0
Run Nov 15, 2026
What the community says
There wasn’t enough discussion in the last 90 days to summarise fairly. Here’s what there was.
Most-reacted new GitHub issues · 10 opened in the window
- `^` in an alternation group silently fails to match (e.g. `(a|b|^)x`, `(^|[^0-9])x`), while GNU grep matches1 reactions · 2 comments · Oct 11, 2026
- Exponential memory growth with bounded repetition on both sides of a literal (`X{0,n}lit Y{0,n}`)0 reactions · 2 comments · Aug 18, 2026
- perl-regexp not being respected in config0 reactions · 7 comments · Aug 20, 2026
- Better fuzzy search for OCRed documents0 reactions · 6 comments · Aug 23, 2026
- Encoding conversion bug causes false "binary file" detection and premature abort0 reactions · 5 comments · Sep 12, 2026
Alternatives to ugrep
Spotted something wrong or out of date? Flag a correction on GitHub. Health and community data refresh on the 1st and 15th of every month.