# hq を Homebrew でインストール

hq のインストール経路、実行ファイル、メタデータ、AI エージェント向けセキュリティノートを確認します。

## インストール

```sh
sudo av install brew:hq
```

追加のインストールコマンド:

### macOS

- Homebrew (100%):

```sh
brew install hq
```

  証拠: local Homebrew formula metadata

## パッケージ情報

- **パッケージキー:** brew:hq
- **パッケージマネージャ:** Homebrew
- **パッケージマネージャページ:** <https://formulae.brew.sh/formula/hq>
- **バージョン:** 1.2.2
- **ソース概要:** Jq, but for HTML
- **ホームページ:** <https://orf.github.io/html-query/>
- **リポジトリ:** <https://github.com/orf/html-query>
- **上流ドキュメント:** <https://github.com/orf/html-query#readme>
- **ライセンス:** MIT
- **ソースアーカイブ:** <https://github.com/orf/html-query/archive/refs/tags/html-query-v1.2.2.tar.gz>
- **最終更新:** 2026-06-15T10:20:18-04:00
- **生成日時:** 2026-07-25T07:20:51+00:00

## 実行可能ファイル

- hq (cli)
- hq (エイリアス)

## ビルド依存関係

- rust

## インストール挙動

- post-install フック: 未定義
- Bottle: 利用可能 対象 arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, monterey, sonoma, ventura, x86_64_linux

## バージョンと鮮度

- ページ生成日: 2026-07-25
- マネージャ版: 1.2.2
- マネージャ更新日: 2026-06-15
- ローカルデータ: OK
- 上流リポジトリ: https://github.com/orf/html-query
- 情報: No cached GitHub release or tag data was available.
## プロジェクトの歴史と使われ方

hq is a Rust command-line tool for extracting structured JSON from HTML with CSS selectors. Its README summarizes the idea as `jq, but for HTML`.

### プロジェクトの歴史

The project lives in the `orf/html-query` repository as a small Rust workspace with crates for the CLI, AST, extractor, and web UI. The README documents a selector syntax that looks JSON-shaped but uses CSS selectors as values, then emits JSON output.

### 採用の歴史

hq is packaged through Homebrew and published on crates.io as `html-query`. The crates.io metadata records the crate creation in December 2022 and points back to the upstream repository lineage, while the README documents installation through either `brew install hq` or `cargo install html-query`.

### 使われ方

Users pass hq a query such as `{posts: .athing | [{title: .titleline > a}]}` to select HTML elements and shape the result as JSON. The documented syntax includes text extraction, attribute extraction, parent selection, sibling selection, and nested arrays or objects.

The common use case is quick shell scraping: fetch or pipe HTML, select useful pieces with CSS selectors, and hand the resulting JSON to other command-line tools.

### パッケージ好きにとっての重要性

hq is interesting because it imports the jq mental model into HTML scraping without trying to become a full crawler or browser automation framework. For package nerds, it belongs to the small-tool lineage where each file format gets a composable query command.

It also shows a familiar Rust CLI distribution pattern: a crates.io package for Cargo users, a GitHub repository with a web demo, and a Homebrew formula for users who want a binary package.

### タイムライン

- 2022: crates.io records the `html-query` crate creation.
- 2023: crates.io records version 1.2.2 of `html-query`.
- 1.2.2: Homebrew packages hq from the upstream `html-query-v1.2.2` GitHub archive.

### Related projects

- jq is the direct conceptual comparison used in the hq README.
- CSS selector engines and Rust HTML parsing crates provide the underlying interaction model.
- htmlq is a related but separate CLI in the broader `jq for HTML` family.

### ソース

- <https://crates.io/crates/html-query>
- <https://formulae.brew.sh/formula/hq>
- <https://github.com/orf/html-query>
- <https://orf.github.io/html-query>


## セキュリティノート

hq に一致するローカルシークレット処理マニフェストは見つかりませんでした。将来の対応で安定したパッケージ URL を使えるよう、Nucleus パッケージメタデータはここに公開されています。


## ソースデータベース詳細

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** hq
- **Version Scheme:** 0
- **Revision:** 0
- **Conflicts With:** proxygen
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable


## 関連リンク

- [Source-control packages](https://www.automicvault.com/ja/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://www.automicvault.com/ja/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/ja/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/ja/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [rust](https://www.automicvault.com/ja/pkg/brew/rust/) - Build dependency declared by Homebrew.
- [htmlq](https://www.automicvault.com/ja/pkg/brew/htmlq/) - Shares av.db curated category or tags: cli, css-selectors, developer-tools, html, scraping.
- [cascadia](https://www.automicvault.com/ja/pkg/brew/cascadia/) - Shares av.db curated category or tags: cli, css-selectors, developer-tools, html.
- [htmlcleaner](https://www.automicvault.com/ja/pkg/brew/htmlcleaner/) - Shares av.db curated category or tags: cli, developer-tools, html, parser.
- [htmlcxx](https://www.automicvault.com/ja/pkg/brew/htmlcxx/) - Shares av.db curated category or tags: cli, developer-tools, html, parser.
- [jshon](https://www.automicvault.com/ja/pkg/brew/jshon/) - Shares av.db curated category or tags: cli, developer-tools, json, parser.
- [jsonlint](https://www.automicvault.com/ja/pkg/brew/jsonlint/) - Shares av.db curated category or tags: cli, developer-tools, json, parser.
- [libfyaml](https://www.automicvault.com/ja/pkg/brew/libfyaml/) - Shares av.db curated category or tags: cli, developer-tools, json, parser.
- [libxml2](https://www.automicvault.com/ja/pkg/brew/libxml2/) - Shares av.db curated category or tags: cli, developer-tools, html, parser.
- [minify](https://www.automicvault.com/ja/pkg/brew/minify/) - Both packages work with overlapping file formats or content types. Shared terms: cli, css, developer, developer-tools, html.

## Combined YAML source

View the package source record on GitHub. [combined/hq.yml](https://github.com/automic-vault/db/blob/main/combined/hq.yml)


## ソース

- Nucleus package database
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- cross-ecosystem install command graph
