No Description

German Lashevich 38a560681a Obey clippy 6 months ago
.github 4a6a528885 Create rust.yml 6 months ago
ci d0e36702a4 👷 Integrate japaric/trust template for CI 2 years ago
src 38a560681a Obey clippy 6 months ago
.gitignore 8a8383cee3 Initial version 2 years ago
.travis.yml 3728d78b8a 💚 CI build only for nightly channel 2 years ago
Cargo.lock 43422db885 Further update some deps 6 months ago
Cargo.toml 43422db885 Further update some deps 6 months ago
LICENSE 7a051922d7 Prepared for release + release 2 years ago
README.md 6c1a52b7f1 Update dependencies 9 months ago
TODO be3b84b184 📝 Update TODO 2 years ago
appveyor.yml 19834ac8db 👷 CI build only for nightly channel (AppVeyor) 2 years ago

README.md

🐴 RusTOTPony

Build Status Build status

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

Installation

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

From crates.io

$ 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 compilation

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

Usage

$ totp help
🐴  RusTOTPony 0.2.3
German Lashevich <german.lashevich@gmail.com>
CLI manager of one-time password generators aka Google Authenticator

USAGE:
    totp [SUBCOMMAND]

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

SUBCOMMANDS:
    add          Add a new generator
    dash         Show realtime dashboard with all generators
    delete       Delete generator
    eradicate    Delete all generators
    help         Prints this message or the help of the given subcommand(s)
    list         List all generators
    rename       Rename generator

Try `totp help [SUBCOMMAND]` to see help for the given subcommand

Choose your password wisely

At the very first run totp asks for a password for a new database. It's located at $HOME/.rustotpony/db.json (don't be confused by json extension, actually, it's a binary file). If you forget the password or want to change it, you have to remove $HOME/.rustotpony directory. It's not convenient, but I'm going to improve usablity and an option for changing password.

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
    

    If it's not the first run, you'll be asked for password twice: for opening database and for saving it.

  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 realtime 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 cleanup the dashboard

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

TODO

  • command completion
  • database password caching
  • tests
  • binaries for main platforms
  • refactor show and show-all commands

License

Licensed under the MIT License.