macOS
brew install hqlocal Homebrew formula metadata
安装
brew install hqlocal Homebrew formula metadata
概览
Jq, but for HTML
历史
hq is a Rust command-line tool for extracting structured JSON from HTML with CSS selectors. Its README summarizes the idea as `jq, but for HTML`.
The project lives in the `orf/html-query` repository as a small Rust workspace with crates for the CLI, AST, extractor, and web UI. The README documents a selector syntax that looks JSON-shaped but uses CSS selectors as values, then emits JSON output.
hq is packaged through Homebrew and published on crates.io as `html-query`. The crates.io metadata records the crate creation in December 2022 and points back to the upstream repository lineage, while the README documents installation through either `brew install hq` or `cargo install html-query`.
Users pass hq a query such as `{posts: .athing | [{title: .titleline > a}]}` to select HTML elements and shape the result as JSON. The documented syntax includes text extraction, attribute extraction, parent selection, sibling selection, and nested arrays or objects.
The common use case is quick shell scraping: fetch or pipe HTML, select useful pieces with CSS selectors, and hand the resulting JSON to other command-line tools.
hq is interesting because it imports the jq mental model into HTML scraping without trying to become a full crawler or browser automation framework. For package nerds, it belongs to the small-tool lineage where each file format gets a composable query command.
It also shows a familiar Rust CLI distribution pattern: a crates.io package for Cargo users, a GitHub repository with a web demo, and a Homebrew formula for users who want a binary package.
安全态势
没有找到 hq 的匹配本地密钥处理 manifest。Nucleus 软件包元数据仍在此发布,以便未来覆盖拥有稳定的软件包 URL。
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
hq | cli | 全局可执行文件 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
https://github.com/orf/html-query
安装元数据
| 软件包键 | brew:hq |
|---|---|
| 版本 | 1.2.2 |
| 软件包管理器 | Homebrew |
| 软件包管理器页面 | https://formulae.brew.sh/formula/hq |
| 主页 | https://orf.github.io/html-query/ |
| 仓库 | https://github.com/orf/html-query |
| 上游文档 | https://github.com/orf/html-query#readme |
| 许可证 | MIT |
| 源码归档 | https://github.com/orf/html-query/archive/refs/tags/html-query-v1.2.2.tar.gz |
| 最后更新 | 2026-06-15T10:20:18-04:00 |
| Pulse | updated |
| 构建依赖 | rust |
| Bottle | 可用 (于 arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, monterey, sonoma, ventura, x86_64_linux) |
| Homebrew post-install | 未定义 |
| 服务 | 未声明 |
注册表事实
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | hq |
| Version Scheme | 0 |
| Revision | 0 |
| Conflicts With |
|
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.