TOTP client for macOS
Project description
🔐 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pytotp_client-0.6.2.tar.gz
(5.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pytotp_client-0.6.2.tar.gz.
File metadata
- Download URL: pytotp_client-0.6.2.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.13.3 Darwin/24.3.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
839436752c86ae8af0125c99f2bd272d0bf49035c23e655661ef406e81a2f3ed
|
|
| MD5 |
654fe68dbc321d599c3ee8f9c0397b91
|
|
| BLAKE2b-256 |
3316bcb63742b3af81bcedd7dcbc2c35b27a37d956cc272ed34c56710a86c0a9
|
File details
Details for the file pytotp_client-0.6.2-py3-none-any.whl.
File metadata
- Download URL: pytotp_client-0.6.2-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.13.3 Darwin/24.3.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d7afc633480de818f8ae4cbb03620e917b4b803be25f6c4ce450e1f09904b0f
|
|
| MD5 |
2fb2f09aaa3a108a66bb0836f8a2767e
|
|
| BLAKE2b-256 |
540891e81c852b1154ddbcca65cad50ede55822a075efaf84f47143e619b03af
|