🔐 TOTP Client for macOS
A lightweight, command-line utility written in Python to manage TOTP (Time-based One-Time Password) secrets securely on macOS using the native Keychain.
📌 Key Features
- 🔒 Secure storage using macOS Keychain
- 🧾 Add, delete, rename TOTP secrets
- 🔎 Search and list stored accounts
- 🔢 Generate and copy one-time passwords (OTPs)
- 📱 Display QR codes for account setup
- 📤 Export / 📥 Import secrets
- 🎨 Colorized output and clipboard integration
💻 Requirements
- macOS
- Python 3.13+
- pykeychain
- qrcode
Installation using pipx
pipx install pytotp-client
🔧 Usage
Add a new TOTP secret
# account name - can be any string, no restrictions here
totp add <account> <secret>
# Example:
totp add google.com BBBBDDDD
Get one-time password (OTP)
totp get <pattenr>
# Example:
totp get google.com
# OTP will be printed and copied to clipboard
# you can use a search pattern here
totp get goo
# OTP for google.com will be printed here
Delete an account
totp delete <account>
# Example:
totp delete google.com
Rename an account
totp rename <old_account> <new_account>
# Example:
totp rename google.com gmail.personal
Search for an account
totp search <pattern>
# Example:
totp search goog
# List of accounts with substring goog will be printed
List all accounts
totp list
Generate Google Auth compatible QR code
totp qr <email> <account>
# Example:
totp qr me@example.com google.com
# QR code will be shown using the system viewer
Export all secrets
totp export > backup.txt
Import secrets
totp import < backup.txt
Show version
totp --version
🔐 Where are my secrets stored?
In the macOS default Keychain:
- Service name: pytotp_client
- Type: Application password
🧠 Tips
- The first OTP shown by get is also copied to your clipboard.
- Use export and import to backup/restore secrets between systems.
- The app exits with a non-zero status code on failure, allowing scripting/integration.
Metadata
Release files for pytotp_client 0.6.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pytotp_client-0.6.2.tar.gz | 5.3 kB | Without provenance | Details for pytotp_client-0.6.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pytotp_client-0.6.2-py3-none-any.whl | Python 3 | none | any | Details for pytotp_client-0.6.2-py3-none-any.whl |
Total release size: 12.4 kB
Release files / pytotp_client-0.6.2.tar.gz
| Download URL | pytotp_client-0.6.2.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
839436752c86ae8af0125c99f2bd272d0bf49035c23e655661ef406e81a2f3ed
|
|
BLAKE2b-256 checksum How to use checksums |
3316bcb63742b3af81bcedd7dcbc2c35b27a37d956cc272ed34c56710a86c0a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.3 CPython/3.13.3 Darwin/24.3.0
|
Release files / pytotp_client-0.6.2-py3-none-any.whl
| Download URL | pytotp_client-0.6.2-py3-none-any.whl |
|---|---|
| Size | 7.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6d7afc633480de818f8ae4cbb03620e917b4b803be25f6c4ce450e1f09904b0f
|
|
BLAKE2b-256 checksum How to use checksums |
540891e81c852b1154ddbcca65cad50ede55822a075efaf84f47143e619b03af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.3 CPython/3.13.3 Darwin/24.3.0
|
Security for pytotp_client 0.6.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.