# 使用 Homebrew, Nix 安装 onlykey-agent

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

## 安装

```sh
sudo av install brew:onlykey-agent
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install onlykey-agent
```

  证据: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#onlykey-agent
```

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

## 软件包事实

- **软件包键:** brew:onlykey-agent
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/onlykey-agent>
- **版本:** 1.1.15
- **来源摘要:** Middleware that lets you use OnlyKey as a hardware SSH/GPG device
- **主页:** <https://docs.crp.to/onlykey-agent.html>
- **上游文档:** <https://docs.crp.to/onlykey-agent.html>
- **许可证:** LGPL-3.0-only
- **源码归档:** <https://files.pythonhosted.org/packages/68/80/e89b6c3680bedb1e14e99f0539ac805bddc7d8dd87c58805c64484966b7c/onlykey-agent-1.1.15.tar.gz>
- **最后更新:** 2026-05-14T10:23:53Z
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- onlykey-agent (cli)
- onlykey-gpg (cli)
- onlykey-gpg-agent (cli)
- onlykey_agent.py (cli)
- onlykey-agent (别名)
- onlykey-gpg (别名)
- onlykey-gpg-agent (别名)
- onlykey_agent.py (别名)

## 依赖

- certifi
- cryptography
- gnupg
- hidapi
- libsodium
- libusb
- python@3.14

## 构建依赖

- pkgconf

## 安装行为

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

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 1.1.15
- 管理器更新时间: 2026-05-14
- 本地数据: OK
- 上游仓库: https://docs.crp.to/onlykey-agent.html
- 信息: Release/tag comparison is only available for GitHub repositories.
## 项目历史与用法

onlykey-agent is middleware that lets an OnlyKey hardware token act as an SSH and GPG agent. It bridges standard developer/admin workflows such as SSH login, Git over SSH, GPG signing, and password-store decryption to keys generated or stored on the hardware device.

### 项目历史

The project is maintained by CryptoTrust/trustcrypto and described upstream as an SSH agent for OnlyKey. PyPI's release history starts with 0.0.2 on March 11, 2018, reaches 1.0.0 on November 14, 2019, and lists 1.1.15 on July 21, 2023.

OnlyKey's documentation positions the agent as a way to keep SSH and OpenPGP private keys off the computer while still using ordinary SSH and GnuPG workflows. The agent uses OnlyKey button presses or challenge codes to authorize signing and decrypt operations.

### 采用历史

onlykey-agent is available from PyPI and Homebrew, and Homebrew's formula exposes its native dependencies on GnuPG, hidapi, libusb, libsodium, and Python. Its audience is narrower than general FIDO/U2F tooling because it specifically serves OnlyKey users who want SSH-agent and gpg-agent style integration.

### 使用方式

For SSH, users generate or expose a public key with onlykey-agent, add it to authorized_keys or a Git hosting account, and run commands inside an agent-backed shell or command wrapper. For GPG, users initialize a dedicated GNUPGHOME such as ~/.gnupg/onlykey and use onlykey-gpg for signing, encryption, and Git commit/tag signing.

The documentation distinguishes derived keys from stored keys. Derived keys are generated from identity@host-style inputs, while stored keys use key material loaded into OnlyKey slots, including ECC and RSA slots for SSH/GPG operations.

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

The package is interesting because it turns a hardware-security product into normal Unix developer plumbing. The package exposes multiple executables, slots into SSH_AUTH_SOCK and GNUPGHOME conventions, and depends on USB/HID and cryptographic libraries rather than inventing a separate workflow.

### 时间线

- 2018-03-11: PyPI lists onlykey-agent 0.0.2.
- 2019-11-14: PyPI lists onlykey-agent 1.0.0.
- 2021-08-27: CryptoTrust published guidance for using OnlyKey with OpenPGP and SSH workflows.
- 2023-07-21: PyPI lists onlykey-agent 1.1.15.

### Related projects

- Related projects and technologies include OnlyKey firmware and desktop software, OpenSSH, GnuPG, pass, gopass, hidapi, libusb, and hardware-backed SSH/GPG agents.

### 来源

- <https://crp.to/2021/08/27/a-more-seamless-openpgp-and-ssh-experience-with-onlykey/>
- <https://docs.onlykey.io/onlykey-agent/>
- <https://formulae.brew.sh/formula/onlykey-agent>
- <https://github.com/trustcrypto/onlykey-agent>
- <https://pypi.org/project/onlykey-agent/>


## 安全说明

没有找到 onlykey-agent 的匹配本地密钥处理 manifest。软件包元数据仍在此发布，以便未来覆盖拥有稳定的软件包 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: ~/.ssh/config, ~/.gnupg/onlykey
## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** onlykey-agent
- **Version Scheme:** 0
- **Revision:** 13
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

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

- Nix - onlykey-agent: normalized package name match | nixpkgs package indexes: pkgs/by-name/on/onlykey-agent/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1


## 相关链接

- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Language runtime packages](https://pkg.so/zh-hans/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Security and crypto packages](https://pkg.so/zh-hans/security-crypto-tools/) - Matched security, identity, cryptography, password, signing, or certificate metadata.
- [python@3.14](https://pkg.so/zh-hans/brew/python-3-14/) - Runtime dependency declared by Homebrew.
- [gnupg](https://pkg.so/zh-hans/brew/gnupg/) - Runtime dependency declared by Homebrew.
- [hidapi](https://pkg.so/zh-hans/brew/hidapi/) - Runtime dependency declared by Homebrew.
- [pkgconf](https://pkg.so/zh-hans/brew/pkgconf/) - Build dependency declared by Homebrew.
- [krb5](https://pkg.so/zh-hans/brew/krb5/) - Shares pkgdb curated category or tags: authentication, cli, security.
- [cyrus-sasl](https://pkg.so/zh-hans/brew/cyrus-sasl/) - Shares pkgdb curated category or tags: authentication, cli, security.
- [linux-pam](https://pkg.so/zh-hans/brew/linux-pam/) - Shares pkgdb curated category or tags: authentication, cli, security.
- [oath-toolkit](https://pkg.so/zh-hans/brew/oath-toolkit/) - Shares pkgdb curated category or tags: authentication, cli, security.
- [keychain](https://pkg.so/zh-hans/brew/keychain/) - Shares pkgdb curated category or tags: authentication, cli, gpg-agent, security, ssh-agent.
- [libjwt](https://pkg.so/zh-hans/brew/libjwt/) - Shares pkgdb curated category or tags: authentication, cli, security.
- [oauth2_proxy](https://pkg.so/zh-hans/brew/oauth2-proxy/) - Shares pkgdb curated category or tags: authentication, cli, security.
- [libyubikey](https://pkg.so/zh-hans/brew/libyubikey/) - Shares pkgdb curated category or tags: authentication, cli, security.
- [trezor-agent](https://pkg.so/zh-hans/brew/trezor-agent/) - Both packages touch the same language runtime or ecosystem. Shared terms: agent, certifi, cli, cryptography, gpg.
- [keepkey-agent](https://pkg.so/zh-hans/brew/keepkey-agent/) - Both packages touch the same language runtime or ecosystem. Shared terms: agent, cli, cryptography, gpg, hardware.

## Combined YAML source

View the package source record on GitHub. [combined/onlykey-agent.yml](https://github.com/mxcl/pkgdb/blob/main/combined/onlykey-agent.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
