# 使用 Homebrew, apt, MacPorts, Nix 安装 dwdiff

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

## 安装

```sh
sudo av install brew:dwdiff
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install dwdiff
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install dwdiff
```

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

### Linux

- Debian apt (92%):

```sh
sudo apt install dwdiff
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#dwdiff
```

  证据: nixpkgs package indexes: pkgs/by-name/dw/dwdiff/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:dwdiff
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/dwdiff>
- **版本:** 2.1.4
- **来源摘要:** Diff that operates at the word level
- **主页:** <https://os.ghalkes.nl/dwdiff.html>
- **上游文档:** <https://os.ghalkes.nl/dwdiff.html>
- **许可证:** GPL-3.0-only
- **源码归档:** <https://os.ghalkes.nl/dist/dwdiff-2.1.4.tar.bz2>
- **最后更新:** 2026-06-22T14:03:13-07:00
- **已生成:** 2026-07-08T18:08:21+00:00

## 可执行文件

- dwdiff (cli)
- dwfilter (cli)
- dwdiff (别名)
- dwfilter (别名)

## 依赖

- gettext
- icu4c@78

## 构建依赖

- gettext
- pkgconf

## 安装行为

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

## 版本和新鲜度

- 页面生成时间: 2026-07-08
- 管理器版本: 2.1.4
- 管理器更新时间: 2026-06-22
- 本地数据: OK
- 上游仓库: https://os.ghalkes.nl/dwdiff.html
- 信息: Release/tag comparison is only available for GitHub repositories.
## 项目历史与用法

dwdiff is G. P. Halkes' word-level diff utility. The official page positions it against wdiff: mostly command-line compatible, but with user-defined whitespace and delimiter handling so punctuation or other single characters can be treated as words.

### 项目历史

The official copyright notice covers 2006-2018 and 2020, and the official distribution directory carries 1.0 release artifacts. Later 2.1.x news entries show maintenance releases in 2018 and 2020 for ICU/pkg-config and compiler compatibility rather than feature expansion.

### 采用历史

The official download section says several Linux distributions and BSDs shipped packages or ports, naming Fedora, FreeBSD, and OpenBSD, with additional Unix packaging through Sunfreeware, MacPorts, Homebrew, Slackbuilds.org, Slacky.eu, and OpenPKG. The batch input adds Debian, Ubuntu, Nix, MacPorts, and Homebrew entries.

### 使用方式

dwdiff compares text at word granularity and prints the new text annotated with insertion and deletion markers by default. It is useful when line diffs are too coarse, especially prose, documentation, localization, and wrapped text where changed words matter more than changed lines.

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

dwdiff matters because it is a classic small Unix text-processing tool that fills the gap between line-oriented diff and heavier document comparison. Its compatibility with wdiff plus delimiter controls made it packageable as a drop-in word-diff option across many Unix packaging systems.

### 时间线

- 2006: Official copyright range begins and 1.0 release artifacts are present in the official distribution directory.
- 2018: Version 2.1.2 updates ICU handling and replaces icu-config with pkg-config.
- 2020: Versions 2.1.3 and 2.1.4 fix GCC 10 and C99 compiler build issues.

### Related projects

- The official page explicitly compares dwdiff with wdiff. In the broader CLI ecosystem it complements diff, git diff --word-diff, colordiff, and document-oriented compare tools.

### 来源

- <https://os.ghalkes.nl/dwdiff.html>
- <https://os.ghalkes.nl/dist/>


## 安全说明

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:** dwdiff
- **Version Scheme:** 0
- **Revision:** 11
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

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

- Debian apt - dwdiff - 2.1.4-2+b3: normalized package name match | Debian stable package indexes: dwdiff from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | diff program that operates word by word | https://os.ghalkes.nl/dwdiff.html
- Nix - dwdiff: normalized package name match | nixpkgs package indexes: pkgs/by-name/dw/dwdiff/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - dwdiff - 2.1.4-2build2: normalized package name match | Ubuntu 24.04 LTS package indexes: dwdiff from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | diff program that operates word by word | https://os.ghalkes.nl/dwdiff.html
- MacPorts - dwdiff: normalized package name match | MacPorts ports tree: textproc/dwdiff/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## 相关链接

- [Terminal utility packages](https://www.automicvault.com/zh-hans/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/zh-hans/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/zh-hans/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Networking and protocol packages](https://www.automicvault.com/zh-hans/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [gettext](https://www.automicvault.com/zh-hans/pkg/brew/gettext/) - Runtime dependency declared by Homebrew.
- [pkgconf](https://www.automicvault.com/zh-hans/pkg/brew/pkgconf/) - Build dependency declared by Homebrew.
- [diffutils](https://www.automicvault.com/zh-hans/pkg/brew/diffutils/) - Shares av.db curated category or tags: cli, developer-tools, diff, text-processing.
- [colordiff](https://www.automicvault.com/zh-hans/pkg/brew/colordiff/) - Shares av.db curated category or tags: cli, developer-tools, diff.
- [diff-so-fancy](https://www.automicvault.com/zh-hans/pkg/brew/diff-so-fancy/) - Shares av.db curated category or tags: cli, developer-tools, diff.
- [diffnav](https://www.automicvault.com/zh-hans/pkg/brew/diffnav/) - Shares av.db curated category or tags: cli, developer-tools, diff.
- [diffoci](https://www.automicvault.com/zh-hans/pkg/brew/diffoci/) - Shares av.db curated category or tags: cli, developer-tools, diff.
- [diffoscope](https://www.automicvault.com/zh-hans/pkg/brew/diffoscope/) - Shares av.db curated category or tags: cli, developer-tools, diff.
- [diffr](https://www.automicvault.com/zh-hans/pkg/brew/diffr/) - Shares av.db curated category or tags: cli, developer-tools, diff.
- [diffstat](https://www.automicvault.com/zh-hans/pkg/brew/diffstat/) - Shares av.db curated category or tags: cli, developer-tools, diff.
- [wdiff](https://www.automicvault.com/zh-hans/pkg/brew/wdiff/) - Local package facts share a topical domain. Shared terms: cli, developer, developer-tools, diff, gettext.
- [enchant](https://www.automicvault.com/zh-hans/pkg/brew/enchant/) - Local package facts share a topical domain. Shared terms: cli, developer, developer-tools, gettext, processing.

## Combined YAML source

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


## 来源

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
