Skip to main content

A cli based TOTP app.

Project description

version on pypi licence

totp-cli is a simple command line application to generate OTP tokens for two factor authentication using RFC6238.

These are compatible with many popular services such as Facebook, GitHub, Google, eve-online, battle.net, etc.

totp-cli fetches your shared key (aka: code) from pass, generates the token, outputs it to stdout and copies it to your CLIPBOARD X selection. Default X selection can be overridden with the PASSWORD_STORE_X_SELECTION environment variable.

Shared keys should be stored in your pass storage under 2fa/SERVICE/code, for example 2fa/github/code. The add command can be used to add this less painfully

Usage

Usage:

totp SERVICE

For example:

$ totp github
621787

You don’t need to run totp from the command line if you just want to paste the code; you can run if from dmenu, or whatever your application launcher is.

About pass entries

Pass entries are expected to have the TOTP secret in their first line (as provided by the third party). The amount of digits token must have (for example, battle.net uses 8), must be provided in a separate line, with a format like:

Digits: 8

For the moment, only customizing the token length is possible.

Requirements

There are also some platform-specific requirements for copying code into the clipboard:

  • xclip for Xorg (Linux/BSD).

Installation

Installation is quite simple:

$ pip install totp

There is also an AUR package available for ArchLinux users.

You can also configure shell completion for totp-cli:

License

totp-cli is distrbuted under the terms of the ISC license. See LICENSE for details.

Copyright (c) 2014-2017 Hugo Osvaldo Barrera <hugo@barrera.io>

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

totp-1.1.0.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

totp-1.1.0-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file totp-1.1.0.tar.gz.

File metadata

  • Download URL: totp-1.1.0.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for totp-1.1.0.tar.gz
Algorithm Hash digest
SHA256 365370e142ac514737580bf0823be2072bc36dddb4ff0066a8a3acba5fb21025
MD5 e8ee5375a130c1341788cb54127c78ae
BLAKE2b-256 e5be985bd28148198b030126a31009f749f911019867854c8000b3af65c3056e

See more details on using hashes here.

File details

Details for the file totp-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: totp-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for totp-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0cc1e3a20aed0ef47c8c869a065384938ccca08cf0380a8a5ef8b5694769170a
MD5 20f41cb7326cccfac622ba25f8377e79
BLAKE2b-256 145cccf77ba6a43d42126c0ee6cbe019fb39755ee15b6c0ff61f6da70450e0e3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page