Skip to main content

CLI tool to store TOTP secret keys and generate codes

Project description

tokn

Tokn is a CLI-based TOTP (time-based one-time password) code generator that uses encryption to store secret keys. asciicast

Quick Start/Installation

From GitHub

  1. Clone the GitHub repository or download the code (using the green button)
  2. Inside the directory, run the following command (you may need to add python -m or python3 -m before it):
pip install -e .

Features

  • An encrypted vault file used to store keys
  • Secret keys and passwords are never exposed
  • Accounts can be added via QR code screenshots, raw codes, or URIs
  • CLI is designed to be as ergonomic as possible

Advanced

  • The vault is stored in their best location depending on the operating system:

Linux: /home/USER/.local/share/tokn/keys

MacOS: /Users/USER/Library/Application Support/tokn/keys

Windows: C:\Users\USER\AppData\Local\nautrw\tokn/keys

  • Commands are split among several files in tokn/commands, and imported back into tokn/cli.py to be added under the cli command group, allowing for commands like tokn add
  • A pyproject.toml file is used for treating the project as a package, allowing the use of pip install -e . and uploading to PyPI in the future
  • The cli function in tokn/cli.py is what gets run; it is specified in the [project.scripts] section in the file

Technologies/libraries used

  • The pyotp library is used to generate the TOTP codes as specified in RFC 6238
  • The cryptography library, specially fernet, is used to encrypt files
  • Argon2, as implemented by the cryptography library, is used to generate password hashes that are used as keys for fernet
  • The click library to make it a CLI app
  • The zxingcpp and opencv libraries for QR code scanning

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

tokn_nautrw-1.0.0.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

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

tokn_nautrw-1.0.0-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file tokn_nautrw-1.0.0.tar.gz.

File metadata

  • Download URL: tokn_nautrw-1.0.0.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for tokn_nautrw-1.0.0.tar.gz
Algorithm Hash digest
SHA256 33dfa1b68985752c50aa4fa2ad238f03e4ab3a4ede35936d55995f851dbefdb6
MD5 e1f27f1d24ce1d8843df18790c673077
BLAKE2b-256 14a920cc78d67f3629cab40d5aeae3990632c1e787e5ff279bc6c789bf687fb5

See more details on using hashes here.

File details

Details for the file tokn_nautrw-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: tokn_nautrw-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for tokn_nautrw-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f9a18d1c673b11eb5fdeac73e43149781fa1aa792e40c23d5d0310b1d42de88a
MD5 c5de5a9bc9b9c0be5bf6b79f480ac0b3
BLAKE2b-256 2c21f807f1c5337c74ff665c5827d737b1fb9c2201072d93f25040b7697ab353

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