Authenticator
raw JSON → 1.1.3 verified Fri May 01 auth: no python
A HOTP/TOTP code generator for the command line, useful for generating two-factor authentication codes from the terminal. Current version: 1.1.3 (as of verification date). Release cadence: irregular.
pip install authenticator Common errors
error ModuleNotFoundError: No module named 'authenticator' ↓
cause Trying to import authenticator in Python code instead of running it as a command.
fix
Run
authenticator from the terminal, not from Python's import statement. error authenticator: error: argument command: invalid choice: 'add' (choose from 'add', 'code', 'list', 'delete', 'rename') ↓
cause Typo or incorrect command name.
fix
Use correct command: authenticator add, authenticator code, authenticator list, authenticator delete, authenticator rename.
Warnings
gotcha This library is a CLI tool, not a Python module. Do not attempt to import authenticator in Python code; it will raise ModuleNotFoundError. ↓
fix Use the command-line tool directly. If you need programmatic TOTP generation, use a library like pyotp.
Imports
- authenticator
import authenticator
Quickstart
# The primary use is command-line. Example:
# authenticator add myaccount --key 'BASE32SECRET'
# authenticator code myaccount