# 使用 Homebrew, dnf, MacPorts, Nix, pacman, zypper, scoop 安装 diff-so-fancy

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

## 安装

```sh
sudo av install brew:diff-so-fancy
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install diff-so-fancy
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install diff-so-fancy
```

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

### Linux

- dnf (92%):

```sh
sudo dnf install diff-so-fancy
```

  证据: Fedora Rawhide package metadata: diff-so-fancy from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#diff-so-fancy
```

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

- pacman (92%):

```sh
sudo pacman -S diff-so-fancy
```

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

- zypper (92%):

```sh
sudo zypper install diff-so-fancy
```

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

### Windows

- Scoop (92%):

```sh
scoop install main/diff-so-fancy
```

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

## 软件包事实

- **软件包键:** brew:diff-so-fancy
- **软件包管理器:** Homebrew
- **版本:** 1.4.12
- **来源摘要:** Good-lookin' diffs with diff-highlight and more
- **主页:** <https://github.com/so-fancy/diff-so-fancy>
- **仓库:** <https://github.com/so-fancy/diff-so-fancy>
- **最后更新:** 2026-07-15T20:53:38Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- diff-so-fancy (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

diff-so-fancy is a terminal filter that reformats unified diffs into a more human-readable display. It is commonly wired into Git as a pager or interactive diff filter.

### 项目历史

The official history document says diff-so-fancy began as a commit in Paul Irish's dotfiles, grew into a standalone script, and was later moved into the so-fancy repository by Steve Mao. The GitHub repository was created in 2016.

The README presents the project as a tool for making diffs human readable to improve code quality and defect spotting. Its options are mostly Git configuration keys that control hunk headers, leading symbols, rulers, empty lines, and display width.

### 采用历史

diff-so-fancy spread through developer tooling because it required little ceremony: place the script on PATH and point Git's pager or interactive.diffFilter at it. The README lists official project-noted availability through GitHub releases, npm, Homebrew, Fedora, Arch, and Debian/Ubuntu packaging.

### 使用方式

The normal Git setup is core.pager set to pipe through diff-so-fancy and less, plus interactive.diffFilter for patch mode. It can also consume ordinary unified diff output from diff -u or recursive diff.

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

For package nerds, diff-so-fancy is a classic single-purpose developer package: a small script, broad editor-terminal appeal, and visible overlap between dotfiles culture, Git ergonomics, and distro packaging.

### 时间线

- 2016: The so-fancy/diff-so-fancy GitHub repository is created.
- 2021: Version 1.4.0 is published.
- 2026: Version 1.4.10 is published.

### Related projects

- Git, diff-highlight, delta, Lazygit, and difftastic are the main neighboring tools named by upstream.

### 来源

- <https://github.com/so-fancy/diff-so-fancy>
- <https://api.github.com/repos/so-fancy/diff-so-fancy>
- <https://raw.githubusercontent.com/so-fancy/diff-so-fancy/master/README.md>
- <https://raw.githubusercontent.com/so-fancy/diff-so-fancy/master/docs/history.md>
- <https://api.github.com/repos/so-fancy/diff-so-fancy/releases>


## 安全说明

narrow executable package without higher-risk signals.

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

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

- Nix - diff-so-fancy: normalized package name match | nixpkgs package indexes: pkgs/by-name/di/diff-so-fancy/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- dnf - diff-so-fancy - 1.4.4-10.fc45: normalized package name match | Fedora Rawhide package metadata: diff-so-fancy from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Good-lookin' diffs | https://github.com/so-fancy/diff-so-fancy
- pacman - diff-so-fancy - 1.4.12-1: normalized package name match | Arch Linux sync databases: diff-so-fancy from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Good-looking diffs with diff-highlight and more | https://github.com/so-fancy/diff-so-fancy
- zypper - diff-so-fancy - 1.4.10-2.2: normalized package name match | openSUSE Tumbleweed package metadata: diff-so-fancy from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Strives to make your diffs human readable | https://github.com/so-fancy/diff-so-fancy
- MacPorts - diff-so-fancy: normalized package name match | MacPorts ports tree: textproc/diff-so-fancy/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Scoop - main/diff-so-fancy: normalized package name match | Scoop official bucket manifest trees: bucket/diff-so-fancy.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1


## Combined YAML source

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