Catalog npm
Back to packageRELEASE DETAILS

0.0.1

npm

2fa-cmd

A command tool for Google Authenticator

2fagoogle authenticatorotpotplib
Published10 May 2024
Direct dependencies19
Transitive dependenciesNot calculated

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.

Declared dependencies 19

Native requirements
19 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
ink
Environment
{
  "local_name": "ink",
  "alias": false,
  "peer_metadata": null
}
^4.1.0runtime
lowdb
Environment
{
  "local_name": "lowdb",
  "alias": false,
  "peer_metadata": null
}
^7.0.1runtime
meow
Environment
{
  "local_name": "meow",
  "alias": false,
  "peer_metadata": null
}
^11.0.0runtime
otplib
Environment
{
  "local_name": "otplib",
  "alias": false,
  "peer_metadata": null
}
^12.0.1runtime
protobufjs
Environment
{
  "local_name": "protobufjs",
  "alias": false,
  "peer_metadata": null
}
^7.2.6runtime
react
Environment
{
  "local_name": "react",
  "alias": false,
  "peer_metadata": null
}
^18.2.0runtime
@sindresorhus/tsconfig
Environment
{
  "local_name": "@sindresorhus/tsconfig",
  "alias": false,
  "peer_metadata": null
}
^3.0.1development
@types/react
Environment
{
  "local_name": "@types/react",
  "alias": false,
  "peer_metadata": null
}
^18.0.32development
@vdemedes/prettier-config
Environment
{
  "local_name": "@vdemedes/prettier-config",
  "alias": false,
  "peer_metadata": null
}
^2.0.1development
ava
Environment
{
  "local_name": "ava",
  "alias": false,
  "peer_metadata": null
}
^5.2.0development
chalk
Environment
{
  "local_name": "chalk",
  "alias": false,
  "peer_metadata": null
}
^5.3.0development
eslint-config-xo-react
Environment
{
  "local_name": "eslint-config-xo-react",
  "alias": false,
  "peer_metadata": null
}
^0.27.0development
eslint-plugin-react
Environment
{
  "local_name": "eslint-plugin-react",
  "alias": false,
  "peer_metadata": null
}
^7.32.2development
eslint-plugin-react-hooks
Environment
{
  "local_name": "eslint-plugin-react-hooks",
  "alias": false,
  "peer_metadata": null
}
^4.6.0development
ink-progress-bar
Environment
{
  "local_name": "ink-progress-bar",
  "alias": false,
  "peer_metadata": null
}
^3.0.0development
ink-testing-library
Environment
{
  "local_name": "ink-testing-library",
  "alias": false,
  "peer_metadata": null
}
^3.0.0development
prettier
Environment
{
  "local_name": "prettier",
  "alias": false,
  "peer_metadata": null
}
^2.8.7development
typescript
Environment
{
  "local_name": "typescript",
  "alias": false,
  "peer_metadata": null
}
^5.0.3development
xo
Environment
{
  "local_name": "xo",
  "alias": false,
  "peer_metadata": null
}
^0.53.1development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "integrity": "sha512-7l19PFFUajxHeVoCnGmjcHDj5hV5zUph5NaKro2xl8AfRSqdRpSWGv4A9nJX0/qWGEkTJMhO3gQLS24eoGUorg==",
  "shasum": "fd29b8b5b00e21ecbb44d8487d87f5f8630ec7ae",
  "tarball": "https://registry.npmjs.org/2fa-cmd/-/2fa-cmd-0.0.1.tgz",
  "fileCount": 2,
  "unpackedSize": 2630,
  "attestations": {
    "url": "https://registry.npmjs.org/-/npm/v1/attestations/2fa-cmd@0.0.1",
    "provenance": {
      "predicateType": "https://slsa.dev/provenance/v1"
    }
  },
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEQCIBX4AN8VSVdts0bYHxC9eFczGR6oJAhrPZKVIM0AVU64AiBC8OoeIUW24ok7ibdnfNaPkTlqnWJmoeiAtaRSxG/CPw=="
    }
  ]
}

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_version:43f051baa6fa6c3b9cfd9ddd36b095752a8ae2d0d2fc53e2dbc2c8d123ef83e2

Other collected versions

0.0.616 May0.0.514 May0.0.414 May0.0.314 May0.0.210 MayView all collected versions →