htmlq
« Back to VersTracker
Description:
Uses CSS selectors to extract bits content from HTML files
Type: Formula  |  Tracked Since: Dec 28, 2025
Links: Homepage  |  formulae.brew.sh
Category: Developer tools
Tags: html scraping cli parsing css
Install: brew install htmlq
About:
htmlq is a command-line utility that applies CSS selectors to HTML documents to extract and filter content. It functions like jq for HTML, parsing markup and allowing precise data extraction without writing complex parsing scripts. This makes it ideal for processing web pages and scraping structured data directly from the terminal.
Key Features:
  • Uses familiar CSS selectors for querying
  • Parses malformed HTML gracefully using the html5ever library
  • Pipes input and output for shell scripting workflows
  • Filters and extracts text or HTML attributes
Use Cases:
  • Scraping specific data points from web pages for CLI processing
  • Extracting text content from HTML reports or logs
  • Filtering HTML output from other command-line tools
Alternatives:
  • pup – Similar functionality written in Go; htmlq is often preferred for its robust html5ever parser.
  • grep/sed – Standard text processing tools, but lack structural awareness of HTML tags and attributes.
Version History
Detected Version Rev Change Commit
Sep 12, 2025 10:37am 0 VERSION_BUMP 707cb085
Dec 3, 2024 7:52pm 0 VERSION_BUMP 3a393d3f
Sep 13, 2024 10:00pm 0 VERSION_BUMP c62bf9ef