| Crates.io | gk-authenticator |
| lib.rs | gk-authenticator |
| version | 0.0.1 |
| created_at | 2025-10-20 17:20:33.045207+00 |
| updated_at | 2025-10-20 17:20:33.045207+00 |
| description | A command line OTP authenticator app |
| homepage | https://github.com/gausk/gk-authenticator-rs |
| repository | https://github.com/gausk/gk-authenticator-rs |
| max_upload_size | |
| id | 1892353 |
| size | 35,957 |
A Command Line OTP authenticator app written in Rust that generates time and counter based OTP codes.
gk-authenticator is built with Rust and is available via the Cargo package manager.
You must have the Rust toolchain installed to use Cargo.
Run the following command in your terminal:
cargo install gk-authenticator
Once installed, you can use gk-authenticator with the following commands:
Add a new authenticator account with a secret key:
# Add a TOTP account (default)
gk-authenticator add --account "GitHub" --key "JBSWY3DPEHPK3PXP"
# Add an HOTP account
gk-authenticator add --account "MyService" --key "JBSWY3DPEHPK3PXP" --hotp
# Add with custom algorithm
gk-authenticator add --account "MyApp" --key "JBSWY3DPEHPK3PXP" --algorithm sha256
Options:
--account: Name of the account (required)--key, -k: Secret key in Base32 encoding (required)--totp: Use Time-based OTP (default, conflicts with --hotp)--hotp: Use Counter-based OTP (conflicts with --totp)--algorithm, -a: Hash algorithm (sha1, sha256, sha384, sha512) - default: sha1Generate and display the OTP code for a particular account:
# View OTP with default 6-digit length
gk-authenticator view --account "GitHub"
# View OTP with custom length
gk-authenticator view --account "GitHub" --length 8
Options:
--account: Name of the account (required)--length, -l: Length of the OTP code (default: 6)Display OTP codes for all stored accounts:
# List all with default 6-digit length
gk-authenticator list
# List all with custom length
gk-authenticator list --length 8
Options:
--length, -l: Length of the OTP code (default: 6)Remove an account from storage:
gk-authenticator delete --account "GitHub"
Options:
--account: Name of the account to delete (required)Get help for any command:
# General help
gk-authenticator --help
# Help for specific command
gk-authenticator add --help
gk-authenticator stores all account data locally on your system in a JSON file:
~/.gk-authenticator/account.jsonThe data includes account names, secret keys, algorithm preferences, and HOTP counter values (if applicable). The application automatically creates the storage directory and file on first use.