# 使用 Homebrew 安装 xmq

查看 xmq 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:xmq
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install xmq
```

  证据: local Homebrew formula metadata

## 软件包事实

- **软件包键:** brew:xmq
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/xmq>
- **版本:** 4.2.0
- **来源摘要:** Tool and language to work with xml/html/json
- **主页:** <https://libxmq.org>
- **仓库:** <https://github.com/libxmq/xmq>
- **上游文档:** <https://libxmq.org>
- **许可证:** MIT
- **源码归档:** <https://github.com/libxmq/xmq/archive/refs/tags/4.2.0.tar.gz>
- **最后更新:** 2026-05-24T18:54:31Z
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- xmq (cli)
- xmq (别名)

## 构建依赖

- pkgconf

## macOS 提供的库

- libxml2
- libxslt

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 4.2.0
- 管理器更新时间: 2026-05-24
- 本地数据: OK
- 上游仓库: https://github.com/libxmq/xmq
- 检测到的最新版本: 4.2.0 (当前)
## 项目历史与用法

XMQ is both a command-line tool and a compact markup syntax for working with XML, HTML, JSON, and related transforms. Its niche is making tree-shaped markup readable, editable, pretty-printable, and pipe-friendly without giving up round-tripping back to XML/HTML or JSON.

### 项目历史

The GitHub repository was created in 2019 and describes XMQ as a converter between XML/HTML and a more human-readable XMQ/HTMQ form, with JSON support, syntax highlighting, pretty printing, a pager, HTML and TeX rendering, and Invisible XML grammar support.

The project documentation and 2025 PDF by Fredrik Ohrstrom frame the design as a response to XML's editing pain: closing tags, significant whitespace, comments, attributes, entities, and transforms are represented in a syntax intended to remain visibly structured and always pretty-printable.

### 采用历史

XMQ is a modern niche tool rather than a broad standard. Its public adoption signal is mostly package-manager availability, GitHub activity, and command-line discussion among users who want XML/HTML/JSON inspection to feel more like jq-era terminal work.

The tool's practical appeal grew as it added more than one format conversion. The homepage examples show pretty-printing XML, HTML, and JSON; using an internal pager; deleting nodes with XPath; converting between xmq/xml/htmq/html/json; applying XSLT/XSLQ-style transforms; rendering to HTML or TeX; and parsing arbitrary input with ixml grammars.

### 使用方式

Typical xmq usage starts as a pretty-printer: run xmq pom.xml, xmq data.json, cat rss.xml | xmq, or pipe a web page through deletion and pager commands to inspect the structure. The same executable can convert back out with commands such as to-xml, to-html, and to-json.

Its more package-nerd use is as a bridge between tree formats and Unix text workflows. XMQ's compact form and clines-style output make it easier to grep, diff, store, or log structured markup while still keeping enough structure to reconstruct the original document.

### 为什么软件包爱好者会关心

XMQ is interesting because it treats XML not as obsolete, but as a powerful tree model with bad ergonomics. The package gives terminal users a reversible shorthand plus tools around XPath, transforms, paging, and rendering.

It also sits near a family of command-line format shims such as jq, yq, xq, xmlstarlet, and pup, but takes a different route: instead of only querying a source format, it introduces an alternate readable surface syntax for markup.

### 时间线

- 2019-09-02: The libxmq/xmq GitHub repository is created.
- 2020s: The tool expands around XML, HTML, JSON, syntax highlighting, paging, conversion, XSLT/XSLQ transforms, and ixml parsing.
- 2025-08-04: The XMQ/HTMQ PDF presents the rationale and compact specification for the syntax.
- 2026: The project is packaged in Homebrew and documented at libxmq.org as a standalone xmq tool plus embeddable C source.

### Related projects

- jq is the obvious JSON-side comparison for command-line structured-data inspection.
- xmlstarlet and xq are adjacent XML command-line tools, though they query or transform existing formats rather than introducing XMQ as a reversible syntax.
- Invisible XML is supported by xmq for parsing non-XML input through grammars.
- libxml2 and libxslt are related XML infrastructure used throughout the broader XML tooling ecosystem.

### 来源

- <https://api.github.com/repos/libxmq/xmq>
- <https://github.com/libxmq/xmq>
- <https://libxmq.org/>
- <https://libxmq.org/xmq.pdf>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

## 源数据库详情

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


## 相关链接

- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/zh-hans/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://pkg.so/zh-hans/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Language runtime packages](https://pkg.so/zh-hans/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [pkgconf](https://pkg.so/zh-hans/brew/pkgconf/) - Build dependency declared by Homebrew.
- [html-xml-utils](https://pkg.so/zh-hans/brew/html-xml-utils/) - Shares pkgdb curated category or tags: cli, developer-tools, html, markup, xml.
- [libxo](https://pkg.so/zh-hans/brew/libxo/) - Shares pkgdb curated category or tags: cli, developer-tools, html, json, xml.
- [yq](https://pkg.so/zh-hans/brew/yq/) - Shares pkgdb curated category or tags: cli, developer-tools, json, xml.
- [libxml2](https://pkg.so/zh-hans/brew/libxml2/) - Shares pkgdb curated category or tags: cli, developer-tools, html, xml.
- [pandoc](https://pkg.so/zh-hans/brew/pandoc/) - Shares pkgdb curated category or tags: cli, developer-tools, html, markup.
- [python-yq](https://pkg.so/zh-hans/brew/python-yq/) - Shares pkgdb curated category or tags: cli, developer-tools, json, xml.
- [dasel](https://pkg.so/zh-hans/brew/dasel/) - Shares pkgdb curated category or tags: cli, developer-tools, json, xml.
- [minify](https://pkg.so/zh-hans/brew/minify/) - Shares pkgdb curated category or tags: cli, developer-tools, html, json.
- [hjson](https://pkg.so/zh-hans/brew/hjson/) - Both packages work with overlapping file formats or content types. Shared terms: cli, configuration, data, data-format, developer.
- [json5](https://pkg.so/zh-hans/brew/json5/) - Both packages work with overlapping file formats or content types. Shared terms: cli, configuration, data, data-format, developer.
- [jsonnet](https://pkg.so/zh-hans/brew/jsonnet/) - Both packages work with overlapping file formats or content types. Shared terms: cli, configuration, configuration-language, data, developer.

## Combined YAML source

View the package source record on GitHub. [combined/xmq.yml](https://github.com/mxcl/pkgdb/blob/main/combined/xmq.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- cross-ecosystem install command graph
