13 releases

0.5.4 Oct 28, 2024
0.5.2 Sep 26, 2024
0.4.5 Feb 26, 2024
0.4.4 Dec 6, 2023
0.2.3 Jun 15, 2018

#814 in Command line utilities

Download history 53/week @ 2024-07-29 338/week @ 2024-09-23 93/week @ 2024-09-30 4/week @ 2024-10-07 1/week @ 2024-10-14 169/week @ 2024-10-21 136/week @ 2024-10-28

306 downloads per month

MIT license

1.5MB
628 lines

Contains (ELF exe/lib, 1.5MB) artifacts/ubuntu-latest/totp, (Mach-o exe, 1MB) artifacts/macos-latest/totp, (DOS exe, 1MB) artifacts/windows-latest/totp.exe

🐴 RusTOTPony

crates.io build

CLI manager of time-based one-time password generators. It is a desktop alternative to Google Authenticator.

Installation

Arch Linux

Packages, available in AUR:

Other

Grab an appropriate binary from the latest release and put it in a place of your choice. If you're on the *nix system, don't forget to set proper permissions: chmod +x totp.

Build manually

From crates.io

Make sure you have $HOME/.cargo/bin in your $PATH.

cargo install rustotpony

From source

  1. Clone this repo
  2. Run cargo install from the inside of the repo directory
  3. Keep calm and wait for the compilation

Probably, you will need gcc (Linux) or clang (Mac OS) to compile dependencies.

Usage

$ totp help
🐴 RusTOTPony 0.3.2

Manager of one-time password generators

Usage: totp [COMMAND]
Commands:
  dash       Show realtime dashboard with all generators
  list       List all generators
  add        Add a new generator
  delete     Delete a generator
  rename     Rename a generator
  eradicate  Delete all generators
  help       Print this message or the help of the given subcommand(s)

Options:
  -h, --help     Print help information
  -V, --version  Print version information

Choose your password wisely

On the first run, totp will prompt you to create a password for a new database, which is stored at $HOME/.rustotpony/totp.safe. This database is encrypted using the password you provide with age-encryption.

If you forget the password or wish to change it, you will need to delete the database file. While this process is currently a bit inconvenient, I'm working on improving usability and will be adding a command to facilitate password changes in the future.

Basic scenario

  1. Retrieve a secret key from your TOTP provider (it must be encoded with base32, for example, GEZDGMZSGE2TKCQ=)

    $ # Creating a fake secret key for demo purposes
    $ echo 123321555 | base32
    GEZDGMZSGE2TKNIK
    
  2. Add new generator with totp add <NAME> (you will be asked for a secret and a password)

    $ # Adding a new TOTP generator
    $ totp add demo
    Enter your secret code:
    Enter your database pass:
    New application created: demo
    
  3. Use totp list to check your secrets

    $ # Listing all secrets in the database
    $ totp list
    Enter your database pass:
    +------+------------------+----------+
    | name | key              | username |
    +------+------------------+----------+
    | demo | GEZDGMZSGE2TKNIK |          |
    +------+------------------+----------+
    
  4. Use totp dash or just totp for real-time dashboard

    $ # Display real-time dashboard with all generators
    $ totp
    Enter your database pass:
    Welcome to RusTOTPony realtime dashboard! Press ^C to quit.
    [=============================================               ]
    009216 demo
    
  5. After hitting ^C it'll clean up the dashboard

    $ totp
    Enter your database pass:
    I won't tell anyone about this 🤫
    

TODO

./TODO.md

License

Licensed under the MIT License.

Dependencies

~20–31MB
~440K SLoC