Lightweight, offline, independent TOTP 2FA manager for Linux
No cloud, no phone required. Store your secrets locally, generate codes, create encrypted backups, and sync with Google Authenticator via QR codes.
Lightweight, offline, independent TOTP 2FA manager for Linux. No cloud, no phone required. Store your secrets locally, generate codes, create encrypted backups, and sync with Google Authenticator via QR codes.
Dependencies:
# Arch Linux sudo pacman -S oath-toolkit gnupg qrencode python # Debian/Ubuntu sudo apt install oathtool gpg qrencode python3 # Fedora/RHEL sudo dnf install oathtool gnupg2 qrencode python3
Setup:
cd ~ git clone https://github.com/smartlegionlab/smart-2fa-manager-cli.git cd smart-2fa-manager-cli chmod +x 2fa.py sudo cp 2fa.py /usr/local/bin/2fa.py # Initialize (first launch only!) 2fa.py init
| Command | Description |
|---|---|
init | Create encrypted storage |
add <service> <secret> | Add a new service |
get <service> | Generate TOTP code (copies to clipboard) |
list | List all service names |
show-all | List all services with current codes |
del <service> | Delete a service |
show | Show all secrets in plain text (⚠️ unsafe) |
qr <service> | Show QR code to scan with phone |
backup | Create encrypted backup with timestamp |
restore <file> | Restore from encrypted backup |
about | Show author, repository and license info |
version | Show version number |
help | Show help message |
# Initialize storage (first launch only!) 2fa.py init # Add a service (secret from website QR code) 2fa.py add github JBSWY3DPEHPK3PXP # Get TOTP code (auto-copies to clipboard) 2fa.py get github # Show all services with current codes 2fa.py show-all # Export QR code to phone (Google Authenticator / Aegis) 2fa.py qr github # Create encrypted backup 2fa.py backup # Restore from backup 2fa.py restore ~/.2fa/backups/secrets.2026-04-06.gpg
~/.2fa/
├── secrets.gpg # Encrypted master storage
└── backups/
└── secrets.2026-04-06_14-30-00.gpg
~/.2fa/secrets.gpg (AES-256 encrypted with GPG)oathtool2fa.py show displays all secrets in plain text — use in secure environment onlyCross-platform 2FA Management Ecosystem: