--- id: oathtool version: "2.4.0" license: MIT license_treatment: permissive maintenance: active --- # oathtool — One-time password generator License: permissive · Maintenance: active · Downloads: 119.3K/mo ## What it is and what it does oathtool is a one-time password generator that produces TOTP (time-based one-time password) codes from a shared secret key. It wraps the oathtool functionality and exposes it both as a command-line utility and a Python API, making it suitable for integrating OTP generation into scripts, applications, or authentication workflows. The package is designed for flexibility: you can use it as a standalone CLI tool, import it as a library in Python code, generate a standalone script, or install it via pipx for system-wide access. It depends on autocommand, importlib_resources, and path—all lightweight utilities—and requires Python 3.9 or later. Use it for: - Generate TOTP codes programmatically in a Python application for two-factor authentication flows. - Use as a command-line tool to quickly generate one-time passwords during development or testing. - Create a standalone script for offline OTP generation without a full Python environment. - Integrate into automation or CI/CD pipelines that need to authenticate with TOTP-protected services. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Generates one-time passwords (TOTP codes) from a shared secret key, available as a command-line tool and Python API. Yes. The package is actively maintained, has no known vulnerabilities, carries a permissive MIT license, and installs with low friction. It fills a straightforward need—TOTP generation—with both CLI and API interfaces. Install it if you need to generate one-time passwords in Python or from the command line. ## Install pip install oathtool uv add oathtool poetry add oathtool ## Installing oathtool Before you install: Low install friction with three lightweight runtime dependencies. Actively maintained as of April 2026, with stable production status and support for current Python versions (3.9+). License in practice: MIT license permits free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects. Quickstart: pip install oathtool Command-line: python -m oathtool $key Python API: import oathtool oathtool.generate_otp(key) Requires Python 3.9 or later. Verify before relying: - Whether the package wraps or reimplements the oathtool binary, and what system dependencies (if any) are required. - Performance characteristics and any rate-limiting or retry behavior for OTP generation. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 119.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags totp code generator, one-time password otp, time-based otp, authenticator code generator, oathtool command line, python totp library, 2fa code generation, totp, authentication, cryptography [View on SkillFed](https://skillfed.io/packages/oathtool) · [View on PyPI](https://pypi.org/project/oathtool/)