# 使用 Homebrew, apk, apt, Nix, pacman 安装 cotp

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

## 安装

```sh
sudo av install brew:cotp
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install cotp
```

  证据: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add cotp
```

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

- Debian apt (92%):

```sh
sudo apt install cotp
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#cotp
```

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

- pacman (92%):

```sh
sudo pacman -S cotp
```

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

## 软件包事实

- **软件包键:** brew:cotp
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/cotp>
- **版本:** 1.10.0
- **来源摘要:** TOTP/HOTP authenticator app with import functionality
- **主页:** <https://github.com/replydev/cotp>
- **仓库:** <https://github.com/replydev/cotp>
- **许可证:** GPL-3.0-only
- **源码归档:** <https://github.com/replydev/cotp/archive/refs/tags/v1.10.0.tar.gz>
- **最后更新:** 2026-07-23T01:10:16Z
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- cotp (cli)
- cotp (别名)

## 构建依赖

- rust

## 安装行为

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

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 1.10.0
- 管理器更新时间: 2026-07-23
- 本地数据: OK
- 上游仓库: https://github.com/replydev/cotp
- 检测到的最新版本: v1.10.0 (当前)
## 项目历史与用法

cotp is a command-line TOTP/HOTP authenticator aimed at users who want two-factor codes in a terminal-accessible, encrypted local database. Its niche is the intersection of password-manager-like local storage and Unix-style CLI workflows.

### 项目历史

The replydev/cotp repository was created in December 2020 and published its first GitHub release later that month. The README says the author created cotp to have minimalist, secure, desktop-accessible software for managing two-factor authentication codes.

### 采用历史

The project has remained a smaller security utility rather than a large platform. Its README notes distribution in Linux distro repositories and gives Homebrew, Cargo, and manual source installation paths, which is typical for Rust command-line tools that serve both desktop and shell users.

### 使用方式

cotp initializes an encrypted database on first run, displays OTP codes in an interactive dashboard, can add TOTP and HOTP entries, lists records as JSON, imports encrypted Aegis backups, exports its database, and can copy selected codes to the clipboard.

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

For package nerds, cotp is notable because it packages sensitive local credential material without depending on a cloud account. The distribution concern is less about daemons or services and more about preserving a stable CLI, encryption format, clipboard integration, and migration/import behavior.

### 时间线

- 2020: replydev/cotp repository created and first release published.
- 2020: README documented encrypted database storage and import/migration from other authenticator apps.
- 2026: Project continued publishing releases.

### Related projects

- Aegis, andOTP, Authy migration tooling, RFC 6238 TOTP, RFC 4226 HOTP.

### 来源

- <https://github.com/replydev/cotp>
- <https://api.github.com/repos/replydev/cotp>
- <https://api.github.com/repos/replydev/cotp/releases?per_page=100>


## 安全说明

narrow executable package without higher-risk signals.

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


## 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.


## Credential files

- Unix: ~/.cotp/db.cotp
## 源数据库详情

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

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

- Debian apt - cotp - 1.9.2-1+b3: normalized package name match | Debian stable package indexes: cotp from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Trustworthy, encrypted, command-line TOTP/HOTP authenticator app with import functionality. | https://github.com/replydev/cotp
- Nix - cotp: normalized package name match | nixpkgs package indexes: pkgs/by-name/co/cotp/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - cotp - 1.9.7-r0: normalized package name match | Alpine Linux edge package indexes: cotp from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Trustworthy, encrypted, command-line TOTP/HOTP authenticator app with import functionality | https://github.com/replydev/cotp
- pacman - cotp - 1.10.0-1: normalized package name match | Arch Linux sync databases: cotp from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Trustworthy, encrypted, command-line TOTP/HOTP authenticator app with import functionality | https://github.com/replydev/cotp


## 相关链接

- [Source-control packages](https://pkg.so/zh-hans/source-control-tools/) - Belongs to a source-control command family.
- [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.
- [Security and crypto packages](https://pkg.so/zh-hans/security-crypto-tools/) - Matched security, identity, cryptography, password, signing, or certificate metadata.
- [rust](https://pkg.so/zh-hans/brew/rust/) - Build dependency declared by Homebrew.
- [oath-toolkit](https://pkg.so/zh-hans/brew/oath-toolkit/) - Shares pkgdb curated category or tags: authentication, cli, hotp, security, totp.
- [rsc_2fa](https://pkg.so/zh-hans/brew/rsc-2fa/) - Shares pkgdb curated category or tags: authentication, cli, security, totp, two-factor-authentication.
- [totp-cli](https://pkg.so/zh-hans/brew/totp-cli/) - Shares pkgdb curated category or tags: authentication, cli, security, totp.
- [duo_unix](https://pkg.so/zh-hans/brew/duo-unix/) - Shares pkgdb curated category or tags: authentication, cli, security, two-factor-authentication.
- [krb5](https://pkg.so/zh-hans/brew/krb5/) - Shares pkgdb curated category or tags: authentication, cli, security.
- [pinentry](https://pkg.so/zh-hans/brew/pinentry/) - 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.
- [libfido2](https://pkg.so/zh-hans/brew/libfido2/) - Shares pkgdb curated category or tags: authentication, cli, security.
- [gauth](https://pkg.so/zh-hans/brew/gauth/) - Security-sensitive metadata or terminology overlaps. Shared terms: authentication, authenticator, cli, factor, security.
- [google-authenticator-libpam](https://pkg.so/zh-hans/brew/google-authenticator-libpam/) - Security-sensitive metadata or terminology overlaps. Shared terms: authentication, authenticator, cli, factor, security.

## Combined YAML source

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