A command tool for Google Authenticator
npm install 2fa-cmdGoogle Authenticator or other OTP application in command.
``bash`
npm i 2fa-cmd -g
`bash`
$ git clone git@github.com:x-ray-s/2fa-cmd.git
$ cd 2fa-cmd
$ npm i && npm run build && npm link
`
$ 2fa --help
Usage
$ 2fa
Input
add - Add a new secret
remove - Remove a secret
verify - verify a token
import - Import a secret from url
rename - Rename
get - get one otp
Options
--name
--secret
--token
--url
Examples
$ 2fa
$ 2fa add --name
$ 2fa remove --name
$ 2fa verify --name
$ 2fa import --url 'otpauth://totp/...'
$ 2fa rename
$ 2fa get --name
$ 2fa --name
`
- [x] npm publish
- [x] rename
- [ ] password
- [ ] encrypto
- [ ] custom storage path
#### How to import Google Authenticator in command?
1. Open the Authenticator, Click Menu on left top;
2. Transform account and export accounts;
3. You will get a qrcode image;
4. Decode the qrcode. eg. [https://cli.im/deqr]()
5. You will get a schema URL like _otpauth-migration://offline?data=_
6. 2fa import --url '