macOS
brew install htmlqlocal Homebrew formula metadata
sudo port install htmlqMacPorts ports tree · www/htmlq/Portfile · source: api.github.com
brew
Uses CSS selectors to extract bits content from HTML files. Version 0.4.0 via Homebrew; verified from local package data.
install
brew install htmlqlocal Homebrew formula metadata
sudo port install htmlqMacPorts ports tree · www/htmlq/Portfile · source: api.github.com
sudo apk add htmlqAlpine Linux edge package indexes · htmlq · source: dl-cdn.alpinelinux.org
nix profile install nixpkgs#htmlqnixpkgs package indexes · pkgs/by-name/ht/htmlq/package.nix · source: api.github.com
sudo pacman -S htmlqArch Linux sync databases · htmlq · source: geo.mirror.pkgbuild.com
scoop install main/htmlqScoop official bucket manifest trees · bucket/htmlq.json · source: api.github.com
overview
Uses CSS selectors to extract bits content from HTML files
history
htmlq is a Rust command-line tool that applies CSS selectors to HTML input, deliberately positioning itself as 'like jq, but for HTML.' Its package-manager appeal is direct: it gives shell users a compact selector-based extractor for scraping, inspection, and pipeline work.
The upstream README describes htmlq as a tool that extracts pieces of HTML files with CSS selectors. Michael Maclean's project post says it grew out of web-scraping work where Python and BeautifulSoup were workable but slow to start repeatedly inside shell-oriented loops.
The public release stream is small and concentrated: tags show v0.2.0 and v0.3.0 in September 2021 and v0.4.0 in January 2022. That pattern matches a focused utility whose interface stabilized around selector extraction, text output, attribute extraction, and shell installation paths.
The README lists Cargo, FreeBSD pkg, Homebrew, and Scoop installation paths, while the input package facts also record Alpine, MacPorts, Nix, Arch, and Scoop packaging. That spread is notable for a small Rust CLI because it shows adoption by users who want jq-like HTML querying without writing per-task scripts.
htmlq is used in pipelines that fetch or read HTML and then select elements with CSS selectors. It is adjacent to `jq` workflows, but chooses web-native selectors instead of JSON paths, making it useful for one-off scraping, documentation checks, and command-line extraction from generated HTML.
For package nerds, htmlq is a neat example of the Rust single-binary CLI wave: a narrowly scoped tool, easy to install through Cargo or OS package managers, with a name and interface that map an existing Unix mental model from JSON to HTML.
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 |
|---|---|---|---|
htmlq | 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.
install metadata
| Package key | brew:htmlq |
|---|---|
| Version | 0.4.0 |
| Package manager | Homebrew |
| Package manager page | https://formulae.brew.sh/formula/htmlq |
| Homepage | https://github.com/mgdm/htmlq |
| Repository | https://github.com/mgdm/htmlq |
| Upstream docs | https://github.com/mgdm/htmlq |
| License | MIT |
| Source archive | https://github.com/mgdm/htmlq/archive/refs/tags/v0.4.0.tar.gz |
| Build dependencies | rust |
| Bottle | available (on arm64_big_sur, arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, big_sur, catalina, 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 | htmlq |
| 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.
htmlq
nix profile install nixpkgs#htmlqhtmlq 0.4.0-r1
Like jq, but for HTML
sudo apk add htmlqhtmlq 0.4.0-3
Like jq, but for HTML
sudo pacman -S htmlqhtmlq
sudo port install htmlqmain/htmlq
scoop install main/htmlqsource 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.