# 使用 Homebrew, MacPorts, Nix, pacman 安装 age-plugin-yubikey

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

## 安装

```sh
sudo av install brew:age-plugin-yubikey
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install age-plugin-yubikey
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install age-plugin-yubikey
```

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

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#age-plugin-yubikey
```

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

- pacman (92%):

```sh
sudo pacman -S age-plugin-yubikey
```

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

## 软件包事实

- **软件包键:** brew:age-plugin-yubikey
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/age-plugin-yubikey>
- **版本:** 0.5.1
- **来源摘要:** Plugin for encrypting files with age and PIV tokens such as YubiKeys
- **主页:** <https://github.com/str4d/age-plugin-yubikey>
- **仓库:** <https://github.com/str4d/age-plugin-yubikey>
- **许可证:** Apache-2.0 OR MIT
- **源码归档:** <https://github.com/str4d/age-plugin-yubikey/archive/refs/tags/v0.5.1.tar.gz>
- **最后更新:** 2026-07-10T16:49:54-04:00
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- age-plugin-yubikey (cli)
- age-plugin-yubikey (别名)

## 构建依赖

- pkgconf
- rust

## macOS 提供的库

- pcsc-lite

## 安装行为

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

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 0.5.1
- 管理器更新时间: 2026-07-10
- 本地数据: OK
- 上游仓库: https://github.com/str4d/age-plugin-yubikey
- 检测到的最新版本: v0.5.1 (当前)
## 项目历史与用法

age-plugin-yubikey is the YubiKey/PIV hardware-token plugin for age clients, storing key material on supported YubiKeys while giving age and rage a normal identity-file interface.

### 项目历史

The project was created by str4d in August 2020, during the early period of the age ecosystem. Its first stable public release, v0.1.0, was published in May 2021, before age 1.0. The README presents it as a plugin for age clients such as age and rage, enabling files to be encrypted to age identities stored on YubiKeys.

The plugin matured alongside age's plugin support. age 1.1.0 was released in December 2022 with plugin and YubiKey support, while age-plugin-yubikey had already reached the 0.3.x series. Later releases continued through 0.5.x, with official packages and prebuilt binaries making it less of a from-source Rust tool and more of a normal installable CLI.

### 采用历史

The upstream README lists Cargo, Homebrew, Arch Linux, Debian packages from releases, NixOS, Ubuntu, OpenBSD, and prebuilt binaries for Windows, Linux, and macOS. The supplied package metadata additionally records Homebrew, MacPorts, Nix, and pacman coverage. This is a wider packaging footprint than many age plugins because hardware-token support is a common operational need.

### 使用方式

Users configure a YubiKey identity either interactively by running `age-plugin-yubikey` or programmatically with `--generate`, then save the resulting age identity text to a file. Encryption uses recipients printed by `--list`; decryption works by ensuring the plugin is on `PATH` and passing the identity file to an age client with `-i`.

The README documents platform dependencies such as `pcscd` and `pcsc-lite`, WSL usage, PIN-cache behavior, supported YubiKey 4 and 5 variants, PIV slot details, and security management for default PIN and management-key handling.

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

This package matters in the age ecosystem because it turns the plugin protocol into real hardware-backed daily use. It also shows the messy package-manager side of security tooling: Rust binary distribution, PC/SC middleware, distro packages, and USB-token platform support all have to line up before the simple age CLI flow feels simple.

### 时间线

- 2020: GitHub repository created.
- 2021: v0.1.0 released.
- 2022: v0.3.0 released; age v1.1.0 added plugin and YubiKey support.
- 2024: v0.5.0 released.
- 2026: v0.5.1 released.

### Related projects

- age is the reference age client and file encryption tool.
- rage is the Rust age client named by the README as a supported client.
- yubikey-agent is mentioned by the README as a possible integration point for future agent-style decryption support.

### 来源

- age official releases API
- official GitHub releases API
- official GitHub repository metadata
- source_facts.package-manager
- upstream README


## 安全说明

broad file, network, media, or database tool signal.

- **Geiger 风险:** blue / 中
- broad file, network, media, or database tool signal

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** age-plugin-yubikey
- **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

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

- Nix - age-plugin-yubikey: normalized package name match | nixpkgs package indexes: pkgs/by-name/ag/age-plugin-yubikey/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- pacman - age-plugin-yubikey - 0.5.1-1: normalized package name match | Arch Linux sync databases: age-plugin-yubikey from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Yubikey plugin for age | https://github.com/str4d/age-plugin-yubikey
- MacPorts - age-plugin-yubikey: normalized package name match | MacPorts ports tree: security/age-plugin-yubikey/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## 相关链接

- [Source-control packages](https://pkg.so/zh-hans/source-control-tools/) - Belongs to a source-control command family.
- [Secret-risk packages](https://pkg.so/zh-hans/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [pkgconf](https://pkg.so/zh-hans/brew/pkgconf/) - Build dependency declared by Homebrew.
- [rust](https://pkg.so/zh-hans/brew/rust/) - Build dependency declared by Homebrew.
- [yubico-piv-tool](https://pkg.so/zh-hans/brew/yubico-piv-tool/) - Shares pkgdb curated category or tags: cli, piv, security, yubikey.
- [yubikey-agent](https://pkg.so/zh-hans/brew/yubikey-agent/) - Shares pkgdb curated category or tags: cli, piv, security, yubikey.
- [age-plugin-se](https://pkg.so/zh-hans/brew/age-plugin-se/) - Shares pkgdb curated category or tags: age, cli, encryption, security.
- [pivit](https://pkg.so/zh-hans/brew/pivit/) - Shares pkgdb curated category or tags: cli, piv, security, yubikey.
- [gnupg](https://pkg.so/zh-hans/brew/gnupg/) - Shares pkgdb curated category or tags: cli, encryption, security.
- [nettle](https://pkg.so/zh-hans/brew/nettle/) - Shares pkgdb curated category or tags: cli, encryption, security.
- [sops](https://pkg.so/zh-hans/brew/sops/) - Shares pkgdb curated category or tags: cli, encryption, security.
- [git-crypt](https://pkg.so/zh-hans/brew/git-crypt/) - Shares pkgdb curated category or tags: cli, encryption, security.
- [age](https://pkg.so/zh-hans/brew/age/) - Security-sensitive metadata or terminology overlaps. Shared terms: age, cli, encryption, security.

## Combined YAML source

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