Catalog npm
PACKAGE EXPLORERView in registry

2fa-cmd

npm

A command tool for Google Authenticator

2fagoogle authenticatorotpotplib
Versions collected6
Direct dependencies19From release 0.0.6
Last observed20 Oct, 19:12 UTC

README

Current package documentation

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

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 6

Collected releases
VersionPublishedDirect dependenciesOpen version
0.0.6Registry latest16 May 202419
0.0.514 May 202419
0.0.414 May 202419
0.0.314 May 202419
0.0.210 May 202419
0.0.110 May 202419

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
x-ray-s/2fa-cmd

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 19:12 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:7dac8a7312d5c69f5ac70e2a4bbd9244bd00e847d071417c8c5e6f496dcca3f7