Command-line tool
htmlq
brew/htmlq
Checked 25 Oct 2026, 21:09 UTC · Listing refreshed from Homebrew, winget, npm, Scoop and cargo; npm packages checked against OSV.dev
Uses CSS selectors to extract bits content from HTML files
At a glance
- Type
- Command-line tool
- Install on
- Windows, macOS, Linux
- Last checked
- 25 Oct 2026, 21:09 UTC
Install it
Windows
scoop install htmlq cargo install htmlq
macOS
brew install htmlq cargo install htmlq
Linux
brew install htmlq cargo install htmlq
Return all elements of class `card`
cat path/to/file.html | htmlq '.card'
Get the text content of the first paragraph
cat path/to/file.html | htmlq -t 'p:first-of-type'
Find all the links in a page
cat path/to/file.html | htmlq -a href 'a'
Related command-line tools
- xidel
XPath/XQuery 3.0, JSONiq interpreter to extract data from HTML/XML/JSON - ripmime
Extract attachments out of MIME encoded email packages - hivex
Library and tools for extracting the contents of Windows Registry hive files - asar
SNES assembler for applying patches to ROM images or building ROMs - unzip
Extraction utility for .zip compressed archives - unar
Command-line unarchiving tools supporting multiple formats - trafilatura
Discovery, extraction and processing for Web text - osmium-tool
Libosmium-based command-line tool for processing OpenStreetMap data
Listing text is written by the maker; AptLynx lists tools and does not vouch for them. Find another tool · Browse by topic · For agents