speakeasyjs / speakeasy

**NOT MAINTAINED** Two-factor authentication for Node.js. One-time passcode generator (HOTP/TOTP) with support for Google Authenticator.
MIT License
2.68k stars 229 forks source link

command line interface (CLI) #129

Open zeke opened 4 years ago

zeke commented 4 years ago

Hello there 👋

It appears this package does not have a command-line interface. It would be handy to have one that could be used like this:

npx speakeasy totp --secret abc123

Is there a particular reason this is not supported? Would you be open to a pull request to support this behavior?

zeke commented 4 years ago

This is how our team is currently faking a CLI:

alias 2fa="node -pe \"require('/usr/local/lib/node_modules/speakeasy').totp({secret:'xyz123', encoding:'base32'})\""