macOS
brew install hgreplocal Homebrew formula metadata
sudo port install hgrepMacPorts ports tree · textproc/hgrep/Portfile · source: api.github.com
brew
Grep with human-friendly search results. Version 0.3.9 via Homebrew; verified from local package data.
install
brew install hgreplocal Homebrew formula metadata
sudo port install hgrepMacPorts ports tree · textproc/hgrep/Portfile · source: api.github.com
nix profile install nixpkgs#hgrepnixpkgs package indexes · pkgs/by-name/hg/hgrep/package.nix · source: api.github.com
overview
Grep with human-friendly search results
history
hgrep is a Rust command-line search presenter that aims to make local grep results look more like code-search output: matched regions are shown as syntax-highlighted snippets with useful surrounding context.
Its niche is deliberately narrow. Rather than replacing grep or ripgrep outright, it wraps a built-in subset of ripgrep or reads `grep -nH` and `rg -nH` output from standard input, then formats results with syntect or bat-backed printers.
The public release line begins with v0.1.x tags in October 2021. The README describes the original product idea as combining ripgrep-style search with bat-style highlighted display, while keeping a pipe-friendly mode for existing grep workflows.
The 0.2 and 0.3 series show the project tightening around terminal ergonomics: generated shell completions and man pages, binary release archives, static Linux builds, macOS and Windows support, and improved handling of color capability and encodings.
The official README documents installation through release binaries, Homebrew, MacPorts, NetBSD pkgsrc/pkgin, Debian-style `.deb` packages, and Cargo. That packaging spread matches hgrep's role as a small terminal utility rather than a library platform.
The project also exposes feature flags so users can keep the built-in ripgrep search, the syntect printer, or the bat printer, which made it practical for package maintainers and source builders to tune dependency weight.
Typical use is either `hgrep pattern path` for its built-in ripgrep subset or `rg -nH pattern path | hgrep` when the user wants full ripgrep behavior and hgrep only as the display stage.
hgrep is most useful when raw grep output has too little context: it groups nearby matches, chooses context around blank lines, applies syntax highlighting, and can generate shell completions or a manual page for packaged installs.
For package-manager users, hgrep is an example of the Rust CLI ecosystem's composable-search style: ripgrep supplies fast traversal and matching, bat/syntect supply readable code presentation, and the final binary stays scriptable.
It is also interesting as a dependency-shaping package. Builders can choose feature combinations to trade install time, binary size, and formatting behavior instead of carrying every optional printer path.
security posture
narrow executable package without higher-risk signals.
green risk · low confidence · appliance
Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.
executables
| Command | Kind | Exposure | Note |
|---|---|---|---|
hgrep | cli | global executable |
freshness
These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.
https://github.com/rhysd/hgrep
install metadata
| Package key | brew:hgrep |
|---|---|
| Version | 0.3.9 |
| Package manager | Homebrew |
| Package manager page | https://formulae.brew.sh/formula/hgrep |
| Homepage | https://github.com/rhysd/hgrep |
| Repository | https://github.com/rhysd/hgrep |
| Upstream docs | https://github.com/rhysd/hgrep#readme |
| License | MIT |
| Source archive | https://github.com/rhysd/hgrep/archive/refs/tags/v0.3.9.tar.gz |
| Build dependencies | rust |
| Bottle | available (on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | not defined |
| Service | none declared |
registry facts
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | hgrep |
| Version Scheme | 0 |
| Revision | 0 |
| Head Version | HEAD |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
source database matches
Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.
hgrep
nix profile install nixpkgs#hgrephgrep
sudo port install hgrepsource trail
This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.
View the package source record on GitHub.