Command-line TOTP/HOTP authenticator with encrypted database and interactive dashboard for two-factor authentication codes
cotp is a command-line two-factor authentication code generator that supports both TOTP (Time-based One-Time Password) and HOTP (HMAC-based One-Time Password) codes, compliant with RFC6238 and RFC4226 specifications. The tool provides an interactive terminal dashboard where users can navigate codes with arrow keys and copy them to the clipboard with enter, making it accessible even over SSH connections.
The application stores authentication secrets in an encrypted database file using XChaCha20Poly1305 authenticated encryption with Argon2id key derivation. Users can customize HMAC algorithms, digit counts, and other parameters to maintain compatibility with various authentication systems. cotp also supports specialized code formats including Steam, Yandex, and MOTP codes.
cotp includes comprehensive migration support from popular authenticator apps including Aegis, andOTP, Authy, Google Authenticator, Microsoft Authenticator, and FreeOTP. The tool can import both plain and encrypted backup files, with Python conversion scripts provided for apps that require preprocessing. Users can manage codes through subcommands for adding, editing, listing, and extracting specific entries, with options for JSON output and clipboard integration.
# via Homebrew
brew install cotp
# via Cargo
cargo install cotp
