This is a fairly thin wrapper around oathtool and gpg. It stores the secret keys in an encrypted file and you can then get your OTP passcodes from a shell.
Install the dependencies:
sudo dnf install oathtool gnupg2 # Fedora
or
sudo apt install oathtool gnupg2 # Debian/Ubuntu
TL;DR:
sudo make install
Alternatively:
Put otp
somewhere in your $PATH, and add an line to source otp-completion.bash
in your .bashrc
.
Add a new key:
otp add <name> <secret>
Get a OTP:
otp get <name>
List available keys:
otp list
Delete a key:
otp rm <name>
- Improve bash completion
- Anything else I think of
Pull requests and issues are welcome with one caveat:
I use this literally every day, if you change the way anything works it needs to have a really good reason.