5 unstable releases
Uses old Rust 2015
0.4.1 | Feb 25, 2023 |
---|---|
0.3.2 | Oct 23, 2022 |
0.2.6 | Dec 1, 2019 |
0.2.4 | Sep 4, 2019 |
0.2.3 | Jun 15, 2018 |
#525 in Command line utilities
47 downloads per month
27KB
540 lines
🐴 RusTOTPony
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
- Clone this repo
- Run
cargo install
from the inside of the repo directory - 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
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 it's a binary file in fact).
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 usability and add a command for changing the password.
Basic scenario
-
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
-
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 a password twice: for opening the database and for saving it.
-
Use
totp list
to check your secrets$ # Listing all secrets in the database $ totp list Enter your database pass: +------+------------------+----------+ | name | key | username | +------+------------------+----------+ | demo | GEZDGMZSGE2TKNIK | | +------+------------------+----------+
-
Use
totp dash
or justtotp
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
-
After hitting ^C it'll clean up the dashboard
$ totp Enter your database pass: I won't tell anyone about this 🤫
TODO
- command completion
- database password caching
- tests
- refactor
show
andshow-all
commands
License
Licensed under the MIT License.
Dependencies
~4–11MB
~192K SLoC