Rust Crates.io License License

totpgen

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.

Installation

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

``` 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 Token

Insert or update a token in your configuration

The formatting option allows you to specify a string where the following variables will be replaced:

``` USAGE: totpgen insert-token [OPTIONS] --id --secret --digits --timestep

FLAGS: -h, --help Prints help information -V, --version Prints version information

OPTIONS: -d, --digits The length to generate for this TOTP token -f, --format An optional formatting rule for the output of this token -i, --id A unique ID for this token -s, --secret The secret to be used for this TOTP token -t, --timestep The timestep for this TOTP token ```

Generate Token

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 Token

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 Tokens

List all configured tokens

``` USAGE: totpgen list-tokens

FLAGS: -h, --help Prints help information -V, --version Prints version information ```