0.0.6 • Published 11 days ago

2fa-cmd v0.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
11 days ago

2fa-cmd

Google Authenticator or other OTP application in command.

screenshot

Install

npm i 2fa-cmd -g

Contribute

$ git clone git@github.com:x-ray-s/2fa-cmd.git
$ cd 2fa-cmd
$ npm i && npm run build && npm link

CLI

$ 2fa --help

	Usage
	  $ 2fa <input>

	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 <The name of the secret>
		--secret <Your secret>
		--token <Your token>
		--url <The URL parsed by QR code exported from Google Authenticator>

	Examples
	  $ 2fa
	  $ 2fa add --name <name> --secret FCRJQZSGFD3VMZDE
	  $ 2fa remove --name <name>
	  $ 2fa verify --name <name> --token 643223
	  $ 2fa import --url 'otpauth://totp/...'
	  $ 2fa rename <old> --name <new>
	  $ 2fa get --name <name>
	  $ 2fa --name <name> // same as get

TODO

  • npm publish
  • rename
  • password
  • encrypto
  • custom storage path

HOW

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 '<your url>' > notice the quotation mark
0.0.6

11 days ago

0.0.3

13 days ago

0.0.5

13 days ago

0.0.4

13 days ago

0.0.2

16 days ago

0.0.1

16 days ago