totpgen is a tool for managing and generating TOTP tokens on the command line quickly. You can configure your tokens with the CLI interface or directly in your config directory.
To install, you can either use
cargo install totpgen
or build the project yourself
$ git clone https://github.com/K-JBoon/totpgen
$ cd totpgen
$ cargo build --release
$ sudo mv /usr/bin/ ./target/release/totpgen
```
USAGE:
totpgen
FLAGS: -h, --help Prints help information -V, --version Prints version information
SUBCOMMANDS: delete-token Delete the token with the given ID generate-token Generates a token for the given ID and current time help Prints this message or the help of the given subcommand(s) insert-token Insert or update a token in your configuration list-tokens List all configured tokens ```
Insert or update a token in your configuration
The formatting option allows you to specify a string where the following variables will be replaced:
{digits}
: The configured length of the token{id}
: The ID of the token{secret}
: The configured secret of the token{timestep}
: The configured timestep of the token{token}
: The generated token```
USAGE:
totpgen insert-token [OPTIONS] --id
FLAGS: -h, --help Prints help information -V, --version Prints version information
OPTIONS:
-d, --digits
Generate a TOTP token for the given ID and current time
``` USAGE: totpgen generate-token [FLAGS]
ARGS:
<input> The ID of the token to generate
FLAGS:
-h, --help Prints help information
-i, --ignore-formatting Ignore the specified formatting for the token in the output
-V, --version Prints version information
```
Delete the token with the given ID
```
USAGE:
totpgen delete-token --id
FLAGS: -h, --help Prints help information -V, --version Prints version information
OPTIONS:
-i, --id
List all configured tokens
``` USAGE: totpgen list-tokens
FLAGS: -h, --help Prints help information -V, --version Prints version information ```