# 使用 Homebrew, apt, dnf, winget, MacPorts, pacman, zypper, scoop 安装 tidy-html5

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

## 安装

```sh
sudo av install brew:tidy-html5
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install tidy-html5
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install tidy
```

  证据: MacPorts ports tree: www/tidy/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Debian apt (92%):

```sh
sudo apt install libtidy-dev
```

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

- dnf (92%):

```sh
sudo dnf install tidy
```

  证据: Fedora Rawhide package metadata: tidy from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst

- pacman (92%):

```sh
sudo pacman -S tidy
```

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

- zypper (92%):

```sh
sudo zypper install tidy
```

  证据: openSUSE Tumbleweed package metadata: tidy from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

### Windows

- winget (92%):

```sh
winget install --id HTACG.tidy -e
```

  证据: Windows Package Manager source index: HTACG.tidy from https://cdn.winget.microsoft.com/cache/source.msix

- Scoop (92%):

```sh
scoop install main/tidy
```

  证据: Scoop official bucket manifest trees: bucket/tidy.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:tidy-html5
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/tidy-html5>
- **版本:** 5.8.0
- **来源摘要:** Granddaddy of HTML tools, with support for modern standards
- **主页:** <https://www.html-tidy.org/>
- **仓库:** <https://github.com/htacg/tidy-html5>
- **上游文档:** <https://www.html-tidy.org/>
- **许可证:** Zlib
- **源码归档:** <https://github.com/htacg/tidy-html5/archive/refs/tags/5.8.0.tar.gz>
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- tidy (cli)
- tidy (别名)

## 构建依赖

- cmake

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_big_sur, arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, big_sur, catalina, monterey, sonoma, ventura

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 5.8.0
- 本地数据: OK
- 上游仓库: https://github.com/htacg/tidy-html5
- 检测到的最新版本: 5.8.0 (当前)
- 信息: No package-manager update timestamp was available.
## 项目历史与用法

HTML Tidy is a long-running command-line and library project for cleaning, diagnosing, and pretty-printing HTML, now maintained by the HTACG Tidy HTML Project with HTML5 support.

### 项目历史

The official HTML Tidy site traces the project to Dave Raggett of the W3C in the early Web era. Raggett's original W3C page describes Tidy as a free utility for automatically fixing common HTML mistakes, cleaning up hard-to-read output from editors and converters, and identifying accessibility issues that need author attention.

After Raggett's original work, maintenance moved to volunteers at tidy.sourceforge.net, where the project became a C library and kept pace with evolving standards. The official history says W3C members renewed interest in 2011 and forked the project to GitHub with HTML5 compatibility, then in 2015 HTACG formed to revitalize Tidy after a non-maintained period.

HTACG's repository carries the modern `tidy-html5` source and describes the project as the granddaddy of HTML tools with support for modern standards. The repository metadata shows the GitHub project dating to 2011, matching the official history's GitHub-era transition.

### 采用历史

HTML Tidy has unusually broad package-manager and platform history for a web utility. The official site says many operating systems already ship a `tidy` command, though often too old for HTML5, and lists package-manager installs for macOS through Fink, Homebrew, and MacPorts plus Windows through Chocolatey.

The input package facts show a wider current packaging footprint across Homebrew, Debian/Ubuntu, Fedora, Arch, MacPorts, Scoop, winget, and openSUSE-family packages, reflecting Tidy's role as both a CLI utility and `libtidy` development dependency.

### 使用方式

Users run `tidy` to clean malformed or messy HTML, format output, flag errors and warnings with line and column information, and modernize documents produced by WYSIWYG editors or office exporters. Developers can also embed `libtidy`, whose official site describes APIs for parsing HTML into a DOM-like tree, cleaning and diagnostics, traversing nodes, and pretty-print output.

The original W3C page also documents Tidy's Unix-tool-style appeal: it can be used locally as a binary, as source code, and historically through online services, making it useful in editors, build scripts, validation workflows, and conversion pipelines.

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

For package nerds, tidy-html5 is a good example of an old web utility whose name, fork history, and packaging split matter: users may see `tidy`, `tidy-html5`, `libtidy`, or development packages depending on the platform.

It is also historically important because it bridges early W3C-era authoring tools and modern HTML5-oriented command-line workflows. The package remains useful precisely because it is boring, scriptable, and available almost everywhere.

### 时间线

- 1998: HTML Tidy copyright history begins in the project license files.
- 2000: Raggett's W3C page had already handed maintenance to SourceForge volunteers.
- 2011: W3C members forked Tidy to GitHub for renewed work and HTML5 compatibility.
- 2015: HTACG formed to revitalize the project and received W3C project ownership.
- 2024: HTACG tidy-html5 repository metadata shows continued GitHub activity.

### Related projects

- Related project surfaces include Dave Raggett's original W3C Tidy page, the SourceForge-era tidy project, the W3C GitHub fork, the HTACG tidy-html5 repository, and downstream packages named `tidy`, `tidy-html5`, or `libtidy`.

### 来源

- <https://api.github.com/repos/htacg/tidy-html5>
- <https://api.html-tidy.org/tidy/tidylib_api_5.1.25/history.html>
- <https://github.com/htacg/tidy-html5>
- <https://github.com/htacg/tidy-html5/blob/next/README/LICENSE.md>
- <https://www.html-tidy.org/>
- <https://www.w3.org/People/Raggett/tidy/>
- input source_facts.package-manager


## 安全说明

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:** tidy-html5
- **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 - libtidy-dev - 2:5.8.0-2: normalized package name match | Debian stable package indexes: libtidy-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | HTML/XML syntax checker and reformatter - development | https://www.html-tidy.org/
- Debian apt - libtidy58 - 2:5.8.0-2: normalized package name match | Debian stable package indexes: libtidy58 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | HTML/XML syntax checker and reformatter - shared library | https://www.html-tidy.org/
- Debian apt - tidy - 2:5.8.0-2: normalized package name match | Debian stable package indexes: tidy from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | HTML/XML syntax checker and reformatter | https://www.html-tidy.org/
- Ubuntu apt - libtidy-dev - 2:5.6.0-11ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: libtidy-dev from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | HTML/XML syntax checker and reformatter - development | https://www.html-tidy.org/
- Ubuntu apt - libtidy5deb1 - 2:5.6.0-11ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: libtidy5deb1 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | HTML/XML syntax checker and reformatter - shared library | https://www.html-tidy.org/
- Ubuntu apt - tidy - 2:5.6.0-11ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: tidy from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | HTML/XML syntax checker and reformatter | https://www.html-tidy.org/
- dnf - tidy - 5.8.0-14.fc45: normalized package name match | Fedora Rawhide package metadata: tidy from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Utility to clean up and pretty print HTML/XHTML/XML | http://www.html-tidy.org/
- winget - HTACG.tidy: normalized package name match | Windows Package Manager source index: HTACG.tidy from https://cdn.winget.microsoft.com/cache/source.msix
- MacPorts - tidy: installed executable or alias match | MacPorts ports tree: www/tidy/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- dnf - libtidy - 5.8.0-14.fc45: installed executable or alias match | Fedora Rawhide package metadata: libtidy from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Runtime library for tidy | http://www.html-tidy.org/
- dnf - libtidy-devel - 5.8.0-14.fc45: installed executable or alias match | Fedora Rawhide package metadata: libtidy-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Development files for tidy | http://www.html-tidy.org/
- pacman - tidy - 5.8.0-3: installed executable or alias match | Arch Linux sync databases: tidy from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | A tool to tidy down your HTML code to a clean style | https://www.html-tidy.org/
- zypper - libtidy-devel - 5.8.0-2.5: installed executable or alias match | openSUSE Tumbleweed package metadata: libtidy-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Development files for libtidy | https://github.com/htacg/tidy-html5
- zypper - libtidy58 - 5.8.0-2.5: installed executable or alias match | openSUSE Tumbleweed package metadata: libtidy58 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Library to Clean Up and Pretty-print HTML, XHTML or XML Markup | https://github.com/htacg/tidy-html5
- zypper - tidy - 5.8.0-2.5: installed executable or alias match | openSUSE Tumbleweed package metadata: tidy from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Utility to Clean Up and Pretty-print HTML, XHTML or XML Markup | https://github.com/htacg/tidy-html5
- zypper - tidy-doc - 5.8.0-2.5: installed executable or alias match | openSUSE Tumbleweed package metadata: tidy-doc from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Documentation for tidy and libtidy | https://github.com/htacg/tidy-html5


## 相关链接

- [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.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [cmake](https://pkg.so/zh-hans/brew/cmake/) - Build dependency declared by Homebrew.
- [php](https://pkg.so/zh-hans/brew/php/) - Popular package that depends on this formula.
- [php@8.3](https://pkg.so/zh-hans/brew/php-8-3/) - Popular package that depends on this formula.
- [php@8.2](https://pkg.so/zh-hans/brew/php-8-2/) - Popular package that depends on this formula.
- [php@8.4](https://pkg.so/zh-hans/brew/php-8-4/) - Popular package that depends on this formula.
- [php@8.1](https://pkg.so/zh-hans/brew/php-8-1/) - Popular package that depends on this formula.
- [tracy](https://pkg.so/zh-hans/brew/tracy/) - Popular package that depends on this formula.
- [lgogdownloader](https://pkg.so/zh-hans/brew/lgogdownloader/) - Popular package that depends on this formula.
- [superhtml](https://pkg.so/zh-hans/brew/superhtml/) - Shares pkgdb curated category or tags: cli, developer-tools, formatter, html, validator.
- [taplo](https://pkg.so/zh-hans/brew/taplo/) - Shares pkgdb curated category or tags: cli, developer-tools, formatter, validator.
- [jsonlint](https://pkg.so/zh-hans/brew/jsonlint/) - Shares pkgdb curated category or tags: cli, developer-tools, formatter, validator.
- [djlint](https://pkg.so/zh-hans/brew/djlint/) - Shares pkgdb curated category or tags: cli, developer-tools, formatter, html.
- [js-beautify](https://pkg.so/zh-hans/brew/js-beautify/) - Shares pkgdb curated category or tags: cli, developer-tools, formatter, html.
- [djhtml](https://pkg.so/zh-hans/brew/djhtml/) - Shares pkgdb curated category or tags: cli, developer-tools, formatter, html.
- [xcbeautify](https://pkg.so/zh-hans/brew/xcbeautify/) - Shares pkgdb curated category or tags: cli, developer-tools, formatter.
- [libxml2](https://pkg.so/zh-hans/brew/libxml2/) - Shares pkgdb curated category or tags: cli, developer-tools, html.

## Combined YAML source

View the package source record on GitHub. [combined/tidy-html5.yml](https://github.com/mxcl/pkgdb/blob/main/combined/tidy-html5.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
