# 使用 Homebrew, apt, Nix, pacman 安装 xdot

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

## 安装

```sh
sudo av install brew:xdot
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install xdot
```

  证据: local Homebrew formula metadata

### Linux

- Debian apt (92%):

```sh
sudo apt install xdot
```

  证据: Debian stable package indexes: xdot from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- Nix (92%):

```sh
nix profile install nixpkgs#xdot
```

  证据: nixpkgs package indexes: xdot from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix

- pacman (92%):

```sh
sudo pacman -S xdot
```

  证据: Arch Linux sync databases: xdot from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

## 软件包事实

- **软件包键:** brew:xdot
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/xdot>
- **版本:** 1.6
- **来源摘要:** Interactive viewer for graphs written in Graphviz's dot language
- **主页:** <https://github.com/jrfonseca/xdot.py>
- **仓库:** <https://github.com/jrfonseca/xdot.py>
- **许可证:** LGPL-3.0-or-later
- **源码归档:** <https://files.pythonhosted.org/packages/32/68/13f80d47bffda03eaf05bd076d1b2ef9a1cf39b461b37e32f303bcf048de/xdot-1.6.tar.gz>
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- xdot (cli)
- xdot (别名)

## 依赖

- adwaita-icon-theme
- graphviz
- gtk+3
- numpy
- py3cairo
- pygobject3
- python@3.14

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 all

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 1.6
- 本地数据: OK
- 上游仓库: https://github.com/jrfonseca/xdot.py
- 信息: No package-manager update timestamp was available.
- 信息: No cached GitHub release or tag data was available.
## 项目历史与用法

xdot.py is an interactive GTK/Cairo viewer for graphs written in Graphviz DOT. It runs Graphviz to produce xdot drawing commands, then renders and navigates the result as a desktop viewer or embeddable Python widget.

### 项目历史

The project started in December 2007 with early commits for click handling, parser cleanup, and separating the graph widget from the window. Its README explains the core design: use Graphviz xdot output as an intermediate format and render it with Python GTK bindings and Cairo.

xdot.py matured through small releases rather than a large rewrite. Tags show 0.4 in 2009, 0.5 in 2013, 1.0 in 2018, and later 1.x releases into the mid-2020s. Git history also records the GTK3 port in 2013, Python 3 enforcement in 2017, automatic PyPI release uploads in 2017, and PyGObject being listed explicitly as a dependency in 2023.

The README status note is unusually candid: the script became more popular than expected, met the original maintainer needs, and needed broader community maintenance or an official fork. That helps explain why xdot.py has persisted as a useful but conservative viewer in the Graphviz ecosystem.

### 采用历史

xdot.py was adopted by developers who generate DOT graphs from compilers, profilers, build systems, static analysis tools, and documentation pipelines and need an interactive viewer rather than a static PNG or PDF. The README highlights zooming, keyboard and mouse navigation, URL events, animated jumps, and highlighting nodes and edges under the mouse.

The project is distributed through PyPI, Linux distribution packages, and Homebrew. Its adoption is bound to Graphviz itself: Graphviz documents xdot as an extended DOT output that carries detailed drawing information, and xdot.py uses that as its rendering substrate.

### 使用方式

From the command line, users run xdot with a DOT file or standard input. By default it filters through Graphviz dot, while -n tells xdot.py to assume input is already in xdot format, such as output from dot -Txdot.

As a library, applications can embed the xdot widget to display generated graphs inside their own Python GTK interfaces. That made it useful for tools that already generate DOT internally and want inspection, zoom, search, or clickable graph nodes.

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

xdot.py is the package index answer to a specific Graphviz pain point: DOT is everywhere, but static image output is awkward for large graphs. It is a small GUI utility whose dependencies explain a lot about desktop Python packaging: Graphviz, GTK, PyGObject, Cairo, and NumPy all have to line up.

For package nerds, it is also a bridge between CLI graph generators and interactive desktop inspection. Installing xdot often means turning a pile of .dot files from other tools into something navigable.

### 时间线

- 2007-12-22: First public commits for the interactive viewer.
- 2009-08-09: 0.4 tag.
- 2013-04-03: GTK3 port appears in Git history.
- 2017-05-16: Python 3 use asserted in Git history.
- 2018-09-12: 1.0 tag.
- 2024-05-14: 1.4 tag.
- 2025-12-08: 1.6 tag.

### Related projects

- Graphviz: layout engine and xdot output producer used by xdot.py.
- Graphviz xdot format: extended DOT drawing-language output consumed by the viewer.
- ZGRViewer: another Graphviz/DOT viewer linked by the README.
- dot2tex: related converter for Graphviz output into TeX drawing formats, linked by the README.

### 来源

- Git history and tags: https://github.com/jrfonseca/xdot.py
- Graphviz DOT/xdot output docs: https://graphviz.org/docs/outputs/canon/#xdot
- Graphviz xdot attribute type docs: https://graphviz.org/docs/attr-types/xdot/
- README, jrfonseca/xdot.py: https://github.com/jrfonseca/xdot.py#readme


## 安全说明

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:** xdot
- **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

## 其他软件包管理器记录

- Debian apt - xdot - 1.4-1: normalized package name match | Debian stable package indexes: xdot from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | interactive viewer for Graphviz dot files | https://github.com/jrfonseca/xdot.py
- Nix - xdot: normalized package name match | nixpkgs package indexes: xdot from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix
- Ubuntu apt - xdot - 1.3-1: normalized package name match | Ubuntu 24.04 LTS package indexes: xdot from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | interactive viewer for Graphviz dot files | https://github.com/jrfonseca/xdot.py
- pacman - xdot - 1.6-1: normalized package name match | Arch Linux sync databases: xdot from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Interactive viewer for graphs written in Graphviz's dot language | https://github.com/jrfonseca/xdot.py


## 相关链接

- [Source-control packages](https://pkg.so/zh-hans/source-control-tools/) - Belongs to a source-control command family.
- [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.
- [python@3.14](https://pkg.so/zh-hans/brew/python-3-14/) - Runtime dependency declared by Homebrew.
- [graphviz](https://pkg.so/zh-hans/brew/graphviz/) - Runtime dependency declared by Homebrew.
- [numpy](https://pkg.so/zh-hans/brew/numpy/) - Runtime dependency declared by Homebrew.
- [gtk+3](https://pkg.so/zh-hans/brew/gtk-3/) - Runtime dependency declared by Homebrew.
- [mdv](https://pkg.so/zh-hans/brew/mdv/) - Shares pkgdb curated category or tags: cli, developer-tools, python, viewer.
- [gprof2dot](https://pkg.so/zh-hans/brew/gprof2dot/) - Shares pkgdb curated category or tags: cli, developer-tools, dot, graphviz.
- [git-big-picture](https://pkg.so/zh-hans/brew/git-big-picture/) - Shares pkgdb curated category or tags: cli, developer-tools, graphviz, python.
- [uv](https://pkg.so/zh-hans/brew/uv/) - Shares pkgdb curated category or tags: cli, developer-tools, python.
- [pipx](https://pkg.so/zh-hans/brew/pipx/) - Shares pkgdb curated category or tags: cli, developer-tools, python.
- [cffi](https://pkg.so/zh-hans/brew/cffi/) - Shares pkgdb curated category or tags: cli, developer-tools, python.
- [ruff](https://pkg.so/zh-hans/brew/ruff/) - Shares pkgdb curated category or tags: cli, developer-tools, python.
- [poetry](https://pkg.so/zh-hans/brew/poetry/) - Shares pkgdb curated category or tags: cli, developer-tools, python.
- [graphviz2drawio](https://pkg.so/zh-hans/brew/graphviz2drawio/) - Both packages touch the same language runtime or ecosystem. Shared terms: cli, developer, developer-tools, dot, graphviz.

## Combined YAML source

View the package source record on GitHub. [combined/xdot.yml](https://github.com/mxcl/pkgdb/blob/main/combined/xdot.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
- external package-manager database matches
- cross-ecosystem install command graph
