replydev / cotp

Trustworthy, encrypted, command-line TOTP/HOTP authenticator app with import functionality.
GNU General Public License v3.0
255 stars 24 forks source link

Read master password from an env var #487

Closed dodalovicgran closed 2 months ago

dodalovicgran commented 2 months ago

Hi, I was thinking - I'm lazy to type the password each time I run the app. Maybe the app could read some env var, if there's one?

Kind regards Dusan

replydev commented 2 months ago

Hello, this program supports the --password-stdin argument.

Example usage: echo "mySecretPassword" | cotp --password-stdin

Of course you can use any password manager to get your passcode, so you could create an alias to your.zshrc (or whetever you use) like this example:

alias cotp="pass personal/cotp | cotp --password-stdin"

replydev commented 2 months ago

Closing this issue. Feel free to reopen if the solution does not work.

dodalovicgran commented 2 months ago

Thank you, it works with the alias, I can live with it :)