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-0.1.0.tar.gz (8.2 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-0.1.0-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for tokn_nautrw-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f30c29f3c05dd97d904e6fbe938f4cc3f59d7b7b7b3d782270f22398ab0b36b6
MD5 3c9d942bbd24e2a8fb73560253a736a9
BLAKE2b-256 e40f84e058049d008d35fb5b3bd40da519ebd39b7cc5b13376d95260c5841d71

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tokn_nautrw-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.1 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-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e436b310713e0c99c821f3e878498420020beab479bd6a5e805c51efbcae2206
MD5 d0898d60cc5e2ff47dc8a303f337a78c
BLAKE2b-256 969184a736a4c6ef64111cd77fc5764690479093b119952f87cb8b86aeb3063b

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