Update README.md

master
German Lashevich 5 years ago committed by GitHub
parent 64ab6f441b
commit 4507e078f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -4,12 +4,19 @@
[![Build status](https://ci.appveyor.com/api/projects/status/rx68dv1kjepslelh/branch/master?svg=true)](https://ci.appveyor.com/project/Zebradil/rustotpony/branch/master)
CLI manager of one-time password generators aka Google Authenticator.
Actually, it's simple in-file database which stores TOTP secret keys
without any encryption (will be added in the future).
CLI manager of [time-based one-time password](https://en.wikipedia.org/wiki/Time-based_One-time_Password_algorithm) generators.
It is a desktop alternative for Google Authenticator.
## Installation
Make sure you have `$HOME/.cargo/bin` in your `$PATH`.
### From crates.io
```sh
$ cargo install rustotpony
```
### From source
1. Clone this repo
@ -21,6 +28,11 @@ Probably, you need `gcc` (Linux) or `clang` (Mac OS) to compile dependencies.
## Usage
```text
$ 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]
@ -40,11 +52,55 @@ SUBCOMMANDS:
Try `totp help [SUBCOMMAND]` to see help for the given subcommand
```
Steps:
1. Retrieve your secret key from TOTP provider (it must be base32 encoded)
1. Add new generator with `totp add GENNAME` (you will be asked for your secret)
1. Check new generator by `totp list` or just display dashboard with one-time passwords with `totp dash`
### 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=`)
```sh
$ # Creating a fake secret key for demo purposes
$ echo 123321555 | base32
GEZDGMZSGE2TKNIK
```
1. Add new generator with `totp add <NAME>` (you will be asked for a secret and a password)
```sh
$ # 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.
1. Use `totp list` to check your secrets
```sh
$ # Listing all secrets in the database
$ totp list
Enter your database pass:
+------+------------------+----------+
| name | key | username |
+------+------------------+----------+
| demo | GEZDGMZSGE2TKNIK | |
+------+------------------+----------+
```
1. Use `totp dash` or just `totp` for realtime dashboard
```sh
$ # Display real-time dashboard with all generators
$ totp
Enter your database pass:
Welcome to RusTOTPony realtime dashboard! Press ^C to quit.
[============================================= ]
009216 demo
```
1. After hitting ^C it'll cleanup the dashboard
```sh
$ totp
Enter your database pass:
I won't tell anyone about this 🤫
```
## TODO
@ -58,4 +114,4 @@ Steps:
Licensed under [the MIT License][MIT License].
[MIT License]: https://github.com/zebradil/rustotpony/blob/master/LICENSE
[MIT License]: https://github.com/zebradil/rustotpony/blob/master/LICENSE

Loading…
Cancel
Save