1.0.3
Support for Standard I/O
The code generation (ex. totp secretname
) and totp config list
commands now support loading a collection of secrets with standard input. The totp config update
, totp config delete
, and totp config rename
commands supporting loading a collection of secrets with standard input and sending the modified collection of secrets to standard output. Use the --stdio
option to specify this.
See the README for more details, but the highlights are below.
This gives you the ability to roll your own encryption if you don't like storing your secrets in cleartext.
A contrived example for doing this with GnuPG follows.
Create an encrypted collection
totp config add --stdio secretname myvalue < /dev/null | \
gpg --batch --yes --passphrase mypassphrase --output totp-collection.gpg --symmetric
View the collection
gpg --quiet --batch --passphrase mypassphrase --decrypt totp-collection.gpg | \
totp config list --stdio
Add another secret
gpg --quiet --batch --passphrase mypassphrase --decrypt totp-collection.gpg | \
totp config add --stdio newname newvalue | \
gpg --batch --yes --passphrase mypassphrase --output totp-collection.gpg --symmetric
View the modified collection
gpg --quiet --batch --passphrase mypassphrase --decrypt totp-collection.gpg | \
totp config list --stdio
Generate a TOTP code
gpg --quiet --batch --passphrase mypassphrase --decrypt totp-collection.gpg | totp --stdio secretname