pkg.soopen package index

brew / 排名 7450

使用 Homebrew, MacPorts, Nix 安装 hgrep

查看 hgrep 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

安装

其他安装命令

macOS

Homebrew已验证 · 100%
brew install hgrep

local Homebrew formula metadata

MacPorts已验证 · 94%
sudo port install hgrep

MacPorts ports tree · textproc/hgrep/Portfile · 来源: api.github.com

Linux

Nix已验证 · 92%
nix profile install nixpkgs#hgrep

nixpkgs package indexes · pkgs/by-name/hg/hgrep/package.nix · 来源: api.github.com

概览

软件包摘要

Grep with human-friendly search results

命令和别名

  • hgrep

历史

项目历史与用法

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.

时间线

  • 2021: v0.1.x public tags establish the Rust CLI release line.
  • 2021: v0.2.0 follows within weeks, continuing rapid terminal-search iteration.
  • 2023: v0.3.0 updates syntect and bat integration and adds manual-page generation.
  • 2024: v0.3.7 adds broader text-encoding support, including BOM-based detection.
  • 2025: v0.3.9 adds Arm Windows release artifacts and additional language/theme support.

Related projects

  • ripgrep is the closest search-engine relative: hgrep can embed a subset of ripgrep or consume `rg -nH` output.
  • bat and syntect are presentation relatives: hgrep uses them as alternative syntax-highlighted output paths.
  • Traditional grep remains part of the workflow because hgrep can read `grep -nH` output from standard input.

来源

  • Changelog: https://github.com/rhysd/hgrep/blob/master/CHANGELOG.md
  • README: https://github.com/rhysd/hgrep#readme
  • Repository tags: https://github.com/rhysd/hgrep/tags

安全态势

风险级别:绿色

narrow executable package without higher-risk signals.

风险分类器

绿色 风险 · 低 置信度 · appliance

原因

  • narrow executable package without higher-risk signals

信号

  • metadata:no-higher-risk-signals

安装行为

  • 未记录 Homebrew bottle 元数据。

建议审查

在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。

可执行文件

已安装的可执行文件

命令类型暴露范围备注
hgrep可执行文件已索引可执行文件从本地可执行文件索引发现。

新鲜度

版本和新鲜度

这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。

页面生成时间2026-08-03
管理器版本0.3.9
管理器更新时间
本地数据未知
上游不可用
检测到的最新版本未检测到
  • OK没有生成新鲜度警告。

安装元数据

软件包元数据

软件包键brew:hgrep
版本0.3.9
软件包管理器Homebrew
主页https://github.com/rhysd/hgrep
仓库https://github.com/rhysd/hgrep
Bottle未记录
服务未声明

源数据库匹配

其他软件包管理器记录

匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。

Nix95%

hgrep

nix profile install nixpkgs#hgrep
  • normalized package name match
  • 匹配方式:Hgrep
nixpkgs package indexes · api.github.com · nixpkgs package indexes: pkgs/by-name/hg/hgrep/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
MacPorts95%

hgrep

sudo port install hgrep
  • normalized package name match
  • 匹配方式:Hgrep
MacPorts ports tree · api.github.com · MacPorts ports tree: textproc/hgrep/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

来源线索

由仓库数据生成

此页面由 av-webscripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。

使用的来源

  • Geiger risk classifier
  • cross-ecosystem install command graph
  • curated package history
  • external package-manager database matches
  • pkg.so package database
  • pkgdb category and tag curation