macOS
brew install hqlocal Homebrew formula metadata
brew
Jq, but for HTML. Version 1.2.2 via Homebrew; verified 2026-06-15.
install
brew install hqlocal Homebrew formula metadata
overview
Jq, but for HTML
history
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.
security posture
No matching local secret-handling manifest was found for hq. Nucleus package metadata is still published here so future coverage has a stable package URL.
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 |
|---|---|---|---|
hq | 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/orf/html-query
install metadata
| Package key | brew:hq |
|---|---|
| Version | 1.2.2 |
| Package manager | Homebrew |
| Package manager page | https://formulae.brew.sh/formula/hq |
| Homepage | https://orf.github.io/html-query/ |
| Repository | https://github.com/orf/html-query |
| Upstream docs | https://github.com/orf/html-query#readme |
| License | MIT |
| Source archive | https://github.com/orf/html-query/archive/refs/tags/html-query-v1.2.2.tar.gz |
| Last updated | 2026-06-15T10:20:18-04:00 |
| Pulse | updated |
| Build dependencies | rust |
| Bottle | available (on arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, monterey, sonoma, ventura, x86_64_linux) |
| Homebrew post-install | not defined |
| Service | none declared |
registry facts
| 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 |
|
source 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.