# susam/mintotp

Minimal TOTP generator in 20 lines of Python

Repository: https://github.com/susam/mintotp
Canonical: https://ross.abutalabs.com/products/mintotp
Language: Python
License: MIT
License Family: permissive
Topics: totp, hotp, 2fa, cryptography, security, python3, minimalist
Last push: 2024-01-21T01:42:02+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 2582, "days_push": 956, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1399, forks 92 (observed 2026-08-28T04:04:36.967541+00:00)

## What it is
MinTOTP is a minimal TOTP (time-based one-time password) generator written in about 20 lines of Python, usable as a CLI tool or as importable module functions. It generates 2FA codes from Base32 secret keys on any system with Python 3.4+.

## Use cases
- generate TOTP 2FA codes from the command line
- generate one-time passwords from a Base32 secret key
- replace a mobile authenticator app with a Python script
- generate TOTP values programmatically in Python
- decrypt a GPG-encrypted 2FA secret and generate codes
- learn how the TOTP/HOTP algorithm works from minimal source code

## When to choose
- you want a tiny, auditable TOTP generator with minimal dependencies
- you need to generate 2FA codes on a headless server or any machine with Python 3.4+
- you want to embed TOTP generation in Python code via module-level functions

## When to avoid
- you need a full-featured authenticator app with QR scanning, multi-account UI, or encrypted storage
- you need HOTP counter-based workflows or advanced OTP features beyond basic TOTP generation

## Facets
- artifact type: cli-tool
- maturity: maintenance
- function: cryptography, security, cli
- domain: security, developer-tools
- platform: python, cli, cross-platform
- tags: totp, 2fa, hotp, authenticator, minimalist, one-time-password, command-line

## Member repositories
- susam/mintotp (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:36.967541+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:39:11.189571+00:00, confidence not recorded.
  - readme: https://github.com/susam/mintotp (fetched 2026-08-28T04:04:36.967541+00:00, sha d3c6f9ba278d)
  - registry_pypi: https://pypi.org/pypi/mintotp/json (fetched 2026-08-29T11:53:25.920686+00:00, sha bd88453fe2ae)
- Data as of 2026-08-30T08:39:29.467469+00:00.
