# 使用 Homebrew, Nix, scoop 安装 hunk

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

## 安装

```sh
sudo av install brew:hunk
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install hunk
```

  证据: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#hunk
```

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

### Windows

- Scoop (92%):

```sh
scoop install main/hunk
```

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

## 软件包事实

- **软件包键:** brew:hunk
- **软件包管理器:** Homebrew
- **版本:** 0.17.7
- **来源摘要:** Review-first terminal diff viewer for agent-authored changesets
- **主页:** <https://hunk.dev/>
- **仓库:** <https://github.com/modem-dev/hunk>
- **最后更新:** 2026-07-29T03:10:02Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- hunk (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

hunk is a review-first terminal diff viewer for agent-authored changesets. It sits in the developer-tools package niche around Git diffs, terminal UIs, code review, and AI-agent review workflows.

### 项目历史

The official GitHub repository was created on 2026-03-17, and its README describes Hunk as a review-first terminal diff viewer built on OpenTUI and Pierre diffs.

The README documents multi-file review navigation, inline AI and agent annotations, split and stacked layouts, watch mode, keyboard and mouse support, pager support, Git difftool support, Jujutsu and Sapling integration, and an OpenTUI component export.

### 采用历史

Hunk's official homepage positions it as a diff viewer for humans and agents, with install paths through npm, Homebrew, and Nix.

The changelog shows rapid early adoption of package-manager concerns in spring 2026: Homebrew tap automation, prebuilt Windows support, npm packaging fixes, Nix outputs, release benchmarks, and performance work for large reviews.

### 使用方式

The README documents hunk diff for current repository changes, hunk show for commits, hunk patch for patch input, hunk pager for Git pager integration, and hunk session commands for live agent review workflows.

Preferences can be persisted in ~/.config/hunk/config.toml or .hunk/config.toml, including theme, layout mode, VCS override, watch behavior, line numbers, wrapping, menu bar, agent notes, and transparent background.

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

hunk is package-nerd significant because it packages a modern terminal review UI across npm, Homebrew, and Nix while also publishing prebuilt artifacts and an embeddable OpenTUI component.

Its focus on agent-authored changesets makes it part of the 2020s shift from plain diff pagers toward review tools that can display machine-written context beside code.

### 时间线

- 2026-03-17: The official GitHub repository was created.
- 2026-03-20: The changelog lists the 0.1.0 release.
- 2026-05-12: Version 0.12.0 added Homebrew tap release automation, Windows support, Nix outputs, and npm packaging improvements.
- 2026-06-19: GitHub releases list v0.16.0.

### Related projects

- The README compares Hunk with lumen, difftastic, delta, diff-so-fancy, and GNU diff.
- The project is built on OpenTUI and Pierre diffs and integrates with Git, Jujutsu, and Sapling.

### 来源

- <https://api.github.com/repos/modem-dev/hunk>
- <https://api.github.com/repos/modem-dev/hunk/releases?per_page=10>
- <https://github.com/modem-dev/hunk>
- <https://hunk.dev/>
- <https://raw.githubusercontent.com/modem-dev/hunk/main/CHANGELOG.md>
- <https://raw.githubusercontent.com/modem-dev/hunk/main/README.md>


## 安全说明

没有找到 hunk 的匹配本地密钥处理 manifest。Nucleus 软件包元数据仍在此发布，以便未来覆盖拥有稳定的软件包 URL。



## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: ~/.config/hunk/config.toml, .hunk/config.toml
## 其他软件包管理器记录

- Nix - hunk: normalized package name match | nixpkgs package indexes: pkgs/by-name/hu/hunk/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Scoop - main/hunk: normalized package name match | Scoop official bucket manifest trees: bucket/hunk.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/hunk.yml](https://github.com/mxcl/pkgdb/blob/main/combined/hunk.yml)


## 来源

- pkg.so package database
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
