# 使用 Homebrew, apk, apt, dnf, MacPorts, Nix, pacman, winget, zypper 安装 yank

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

## 安装

```sh
sudo av install brew:yank
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install yank
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install yank
```

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

### Linux

- apk (92%):

```sh
sudo apk add yank
```

  证据: Alpine Linux edge package indexes: yank from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install yank
```

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

- dnf (92%):

```sh
sudo dnf install yank
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#yank
```

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

- pacman (92%):

```sh
sudo pacman -S yank
```

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

- zypper (92%):

```sh
sudo zypper install yank
```

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

### Windows

- winget (92%):

```sh
winget install --id nasiridrishi.Yank -e
```

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

## 软件包事实

- **软件包键:** brew:yank
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/yank>
- **版本:** 1.3.0
- **来源摘要:** Copy terminal output to clipboard
- **主页:** <https://github.com/mptre/yank>
- **仓库:** <https://github.com/mptre/yank>
- **上游文档:** <https://github.com/mptre/yank#readme>
- **许可证:** MIT
- **源码归档:** <https://github.com/mptre/yank/archive/refs/tags/v1.3.0.tar.gz>
- **已生成:** 2026-07-08T18:08:21+00:00

## 可执行文件

- yank (cli)
- yank (别名)

## 安装行为

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

## 版本和新鲜度

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

yank is a small C terminal utility for selecting fields from command output and copying the selection to a clipboard command. It reads from stdin, presents a keyboard-driven selection interface, and writes the chosen field to a yank command such as xsel or pbcopy.

### 项目历史

The GitHub repository was created on 2015-08-24. The README frames the project around a terminal-user frustration: copying output with the mouse feels like a cache miss, while terminal multiplexer copy modes are not always available or desired.

The design stayed terminal-agnostic. yank recognizes fields either by regular expression with `-g` or by delimiter with `-d`, supports line selection with `-l`, and lets users replace the default clipboard command by passing a command after `--`.

### 采用历史

yank has the kind of packaging spread typical of beloved Unix conveniences. The README documents installation through Arch Linux, Debian, Fedora, Nix/NixOS, openSUSE, Homebrew, MacPorts, FreeBSD, OpenBSD, and source builds. The supplied package data also shows broad distribution coverage.

Some Linux distributions install the binary as `yank-cli` because of a naming conflict, an adoption detail that matters to users searching for the command after installing the package.

### 使用方式

Common examples include `env | yank -d =` to select an environment variable key or value, `yank -d ", <file.csv` for CSV fields, `make 2>&1 | yank -l` for whole-line selection, and `ps ux | yank -g [0-9]+ | xargs kill` when stdout is not a terminal.

On X11 the default command is xsel. macOS users can build with `YANKCMD=pbcopy`, and the README also mentions shcopy for copying over SSH or from headless environments.

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

yank is package-nerd significant because it solves a tiny but common shell workflow problem in the Unix way: compose stdin, regex/delimiter selection, stdout fallback, and pluggable clipboard commands.

It also demonstrates why package names and binary names matter: the same tool may be installed as `yank` or `yank-cli` depending on distribution conflicts, which is exactly the sort of detail package catalogs help users untangle.

### 时间线

- 2015-08-24: GitHub repository created.
- 2015: README copyright period begins and motivation centered on terminal clipboard selection without a mouse or multiplexer.
- 2010s: README documented distribution across Linux, BSD, and macOS package systems.
- 2020s: Project continued as a compact C utility with source builds and configurable clipboard command support.

### Related projects

- Related tools include xsel, pbcopy, shcopy, terminal multiplexers, xargs, shell pipelines, package-manager variants that install yank-cli, and clipboard-oriented terminal utilities.

### 来源

- <https://api.github.com/repos/mptre/yank>
- <https://github.com/mptre/yank>
- <https://raw.githubusercontent.com/mptre/yank/master/README.md>
- <https://www.basename.se/yank/>
- 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:** yank
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

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

- Debian apt - yank - 1.3.0-1: normalized package name match | Debian stable package indexes: yank from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | interactively select and yank terminal output to stdout or xsel | https://github.com/mptre/yank
- Nix - yank: normalized package name match | nixpkgs package indexes: pkgs/by-name/ya/yank/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - yank - 1.3.0-1: normalized package name match | Ubuntu 24.04 LTS package indexes: yank from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | interactively select and yank terminal output to stdout or xsel | https://github.com/mptre/yank
- apk - yank - 1.3.0-r0: normalized package name match | Alpine Linux edge package indexes: yank from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Yank terminal output to clipboard | https://github.com/mptre/yank
- apk - yank-doc - 1.3.0-r0: normalized package name match | Alpine Linux edge package indexes: yank-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Yank terminal output to clipboard (documentation) | https://github.com/mptre/yank
- dnf - yank - 1.3.0-9.fc44: normalized package name match | Fedora Rawhide package metadata: yank from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Tool for selecting and copying text from stdin without a mouse | https://github.com/mptre/yank
- pacman - yank - 1.3.0-2: normalized package name match | Arch Linux sync databases: yank from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Copy terminal output to clipboard | https://github.com/mptre/yank
- zypper - yank - 1.3.0-1.10: normalized package name match | openSUSE Tumbleweed package metadata: yank from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Tool for selecting and copying text from stdin without a mouse | https://github.com/mptre/yank
- MacPorts - yank: normalized package name match | MacPorts ports tree: sysutils/yank/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- winget - nasiridrishi.Yank: normalized package name match | Windows Package Manager source index: nasiridrishi.Yank from https://cdn.winget.microsoft.com/cache/source.msix


## 相关链接

- [Source-control packages](https://www.automicvault.com/zh-hans/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://www.automicvault.com/zh-hans/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://www.automicvault.com/zh-hans/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Homebrew utility packages](https://www.automicvault.com/zh-hans/pkg/brew-utility-packages/) - Matched Homebrew package provider.
- [xsel](https://www.automicvault.com/zh-hans/pkg/brew/xsel/) - Shares av.db curated category or tags: cli, clipboard, selection, system, terminal.
- [xclip](https://www.automicvault.com/zh-hans/pkg/brew/xclip/) - Shares av.db curated category or tags: cli, clipboard, system.
- [xcv](https://www.automicvault.com/zh-hans/pkg/brew/xcv/) - Shares av.db curated category or tags: cli, clipboard, system.
- [abduco](https://www.automicvault.com/zh-hans/pkg/brew/abduco/) - Shares av.db curated category or tags: cli, system, terminal.
- [ansiweather](https://www.automicvault.com/zh-hans/pkg/brew/ansiweather/) - Shares av.db curated category or tags: cli, system, terminal.
- [bashish](https://www.automicvault.com/zh-hans/pkg/brew/bashish/) - Shares av.db curated category or tags: cli, system, terminal.
- [bottom](https://www.automicvault.com/zh-hans/pkg/brew/bottom/) - Shares av.db curated category or tags: cli, system, terminal.
- [clifm](https://www.automicvault.com/zh-hans/pkg/brew/clifm/) - Shares av.db curated category or tags: cli, system, terminal.
- [colortail](https://www.automicvault.com/zh-hans/pkg/brew/colortail/) - Local package facts share a topical domain. Shared terms: cli, output, system, terminal.

## Combined YAML source

View the package source record on GitHub. [combined/yank.yml](https://github.com/automic-vault/db/blob/main/combined/yank.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
