# 使用 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
- **版本:** 1.6
- **来源摘要:** Interactive viewer for graphs written in Graphviz's dot language
- **主页:** <https://github.com/jrfonseca/xdot.py>
- **仓库:** <https://github.com/jrfonseca/xdot.py>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- xdot (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 1.6
## 项目历史与用法

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

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

- 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


## 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
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
