Skip to main content

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

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


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.1.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytotp_client-0.6.1-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file pytotp_client-0.6.1.tar.gz.

File metadata

  • Download URL: pytotp_client-0.6.1.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

Hashes for pytotp_client-0.6.1.tar.gz
Algorithm Hash digest
SHA256 06b2551db398891065f4c6b08978f6a887ed210509d36b6d9c2e22760dfdd792
MD5 83b836f3057409af4e8ec3f94a058a82
BLAKE2b-256 4c4087cb985a7e18d7facf3429921054dfba8efa23f06c685fdef64cd180e1fc

See more details on using hashes here.

File details

Details for the file pytotp_client-0.6.1-py3-none-any.whl.

File metadata

  • Download URL: pytotp_client-0.6.1-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

Hashes for pytotp_client-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 99274922e76f575978e9fd5641dd557ae3042b6237eda14962023942227e9ff3
MD5 0517fca0516aa1c339a3e36517738e75
BLAKE2b-256 46c07b8f41daba7c7f0fce7aae164b5d427c8952e14065c83b428ff5d6928b8b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page