🍺 BREW Explorer

← all formulae

htmlq

brew install htmlq v0.4.0 MIT

Uses CSS selectors to extract bits content from HTML files

124
30-day installs · #3183
365
90-day · #3268
1.7k
365-day · #3013
7.5k
★ GitHub stars · updated 2mo ago

Build dependencies

Links

Raw metadata
{
  "aliases": [],
  "alternatives": [],
  "build_dependencies": [
    "rust"
  ],
  "categories": [],
  "caveats": null,
  "conflicts_with": [],
  "dependencies": [],
  "deprecated": 0,
  "deprecation_reason": null,
  "desc": "Uses CSS selectors to extract bits content from HTML files",
  "disable_reason": null,
  "disabled": 0,
  "enrichment_fetched_at": "2026-06-20T23:38:41+00:00",
  "first_seen": "2026-06-20T23:34:18+00:00",
  "full_name": "htmlq",
  "github_default_branch": "master",
  "github_last_commit_at": "2026-05-27T21:47:02Z",
  "github_readme_excerpt": "# htmlq\nLike [`jq`](https://stedolan.github.io/jq/), but for HTML. Uses [CSS selectors](https://developer.mozilla.org/en-US/docs/Learn/CSS/Introduction_to_CSS/Selectors) to extract bits of content from HTML files.\n\n## Installation\n\n### [Cargo](https://crates.io/crates/htmlq)\n\n```sh\ncargo install htmlq\n```\n\n### [FreeBSD pkg](https://www.freshports.org/textproc/htmlq)\n\n```sh\npkg install htmlq\n```\n\n### [Homebrew](https://formulae.brew.sh/formula/htmlq)\n\n```sh\nbrew install htmlq\n```\n\n### [Scoop](https://scoop.sh/)\n\n```sh\nscoop install htmlq\n```\n\n## Usage\n\n```console\n$ htmlq -h\nhtmlq 0.4.0\nMichael Maclean \u003cmichael@mgdm.net\u003e\nRuns CSS selectors on HTML\n\nUSAGE:\n    htmlq [FLAGS] [OPTIONS] [--] [selector]...\n\nFLAGS:\n    -B, --detect-base          Try to detect the base URL from the \u003cbase\u003e tag in the document. If not found, default to\n                               the value of --base, if supplied\n    -h, --help                 Prints help information\n    -w, --ignore-whitespace    When printing text nodes, ignore those that consist entirely of whitespace\n    -p, --pretty               Pretty-print the serialised output\n    -t, --text                 Output only the contents of text nodes inside selected elements\n    -V, --version              Prints version information\n\nOPTIONS:\n    -a, --attribute \u003cattribute\u003e         Only return this attribute (if present) from selected elements\n    -b, --base \u003cbase\u003e                   Use this URL as the base for links\n    -f, --filename \u003cFILE\u003e               The input file. Defaults to stdin\n    -o, --output \u003cFILE\u003e                 The output file. Defaults to stdout\n    -r, --remove-nodes \u003cSELECTOR\u003e...    Remove nodes matching this expression before output. May be specified multiple\n                                        times\n\nARGS:\n    \u003cselector\u003e...    The CSS expression to select [default: html]\n$\n```\n\n## Examples\n\n### Using with cURL to find part of a page by ID\n\n```console\n$ curl --silent https://www.rust-lang.org/ | htmlq \u0027#get-help\u0027",
  "github_repo": "mgdm/htmlq",
  "github_stars": 7550,
  "github_topics": [],
  "homepage": "https://github.com/mgdm/htmlq",
  "homepage_og_description": null,
  "homepage_og_image": null,
  "homepage_title": null,
  "installs_30d": 124,
  "installs_365d": 1740,
  "installs_90d": 365,
  "keg_only": 0,
  "keg_only_reason": null,
  "last_seen": "2026-06-20T23:34:18+00:00",
  "license": "MIT",
  "llm_generated_at": null,
  "llm_model": null,
  "name": "htmlq",
  "oldnames": [],
  "one_liner": null,
  "optional_dependencies": [],
  "rank_30d": 3183,
  "rank_365d": 3013,
  "rank_90d": 3268,
  "raw_hash": "240ef5c17127e87f",
  "recommended_dependencies": [],
  "revision": 0,
  "ruby_source_path": "Formula/h/htmlq.rb",
  "tap": "homebrew/core",
  "test_dependencies": [],
  "uses_from_macos": [],
  "version_head": "HEAD",
  "version_stable": "0.4.0",
  "versioned_formulae": [],
  "why_use_this": null
}