xq
« Back to VersTracker
Description:
Command-line XML and HTML beautifier and content extractor
Type: Formula  |  Tracked Since: Dec 28, 2025
Links: Homepage  |  formulae.brew.sh
Category: Developer tools
Tags: xml html cli formatter dev-tools
Install: brew install xq
About:
Xq is a command-line utility that formats and indents XML or HTML documents for improved readability. It can also extract specific text content from within the document structure using simplified query syntax. This tool is particularly useful for debugging API responses or parsing complex web pages directly from the terminal.
Key Features:
  • Pretty-prints XML/HTML with colorized output
  • Extracts text content using simplified query syntax
  • Processes input from files, standard input, or URLs
  • Zero-dependency binary for fast execution
Use Cases:
  • Formatting raw, minified HTML from curl requests for readability
  • Extracting specific data points from XML configuration files
  • Debugging web scraping selectors
Alternatives:
  • xmllint – xmllint is more comprehensive but often requires complex XPath syntax
  • pup – pup is HTML-focused and uses CSS selectors, whereas xq handles both XML and HTML natively
Version History
Detected Version Rev Change Commit