# mgdm/htmlq

Like jq, but for HTML.

Repository: https://github.com/mgdm/htmlq
Canonical: https://ross.abutalabs.com/products/htmlq
Language: Rust
License: MIT
License Family: permissive
Last push: 2026-05-27T21:47:02+00:00

## Health v2 (maintenance only)
Score: 61/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 84, release rhythm 8, longevity 100
- inputs: {"age_days": 2675, "days_push": 98, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 7576, forks 136 (observed 2026-08-28T04:10:01.730424+00:00)

## What it is
htmlq is a command-line tool, like jq but for HTML, that extracts content from HTML documents using CSS selectors. Written in Rust, it reads from files or stdin and outputs selected elements, attributes, or text.

## Use cases
- extract elements from html using css selectors from the command line
- get all links from a web page with curl piped into a filter
- pull specific attributes like href out of an html file
- pretty-print or extract text content from html in shell scripts
- scrape bits of a page by id without writing a parser

## When to choose
- you want jq-style ad-hoc HTML querying in shell pipelines
- you need a fast, dependency-free CLI for extracting HTML content
- you're scripting page scraping with curl and CSS selectors

## When to avoid
- you need full browser rendering or JavaScript execution
- you need robust scraping of malformed pages at scale
- you want a programmatic HTML parsing library rather than a CLI

## Facets
- artifact type: cli-tool
- maturity: stable
- function: parser, web-scraping, cli, developer-tools
- domain: developer-tools, web-development, crawlers
- platform: cli, windows, rust, cross-platform
- tags: html-parsing, css-selectors, jq-like, text-processing, unix-tools, command-line, linux, macos

## Member repositories
- mgdm/htmlq (main) score 61

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:01.730424+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:36:55.252320+00:00, confidence not recorded.
  - readme: https://github.com/mgdm/htmlq (fetched 2026-08-28T04:10:01.730424+00:00, sha 79c914f19039)
  - registry_crates: https://crates.io/api/v1/crates/htmlq (fetched 2026-08-29T08:32:15.908663+00:00, sha 3fc1c87d6535)
- Data as of 2026-08-30T08:39:29.467469+00:00.
