A Terminal User Interface (TUI) for GPG batch decryption and encryption, inspired by the Kleopatra desktop application. Built with Textual and PGPy.
Browse files, select multiple encrypted or plaintext files, enter your passphrase once, and decrypt or encrypt them all in one go — right from your terminal.
- Full directory tree rooted at your home folder
- Hidden files are filtered out automatically
- Directories are sorted before files for easy navigation
- Click any file in the browser to add it to the queue
- Remove individual files with the ✕ button or clear the entire list at once
- Duplicate files are detected and skipped
- Visual indicators distinguish GPG files (🔒) from regular files (📄)
- Enter your passphrase once and decrypt all selected files
- Supports symmetric (passphrase-based) decryption
- Supports public-key decryption with a private key file (
.asc/.gpg) - Protected private keys are automatically unlocked with the provided passphrase
- Recognised GPG extensions:
.gpg,.pgp,.asc,.enc - Automatically detects system GnuPG (
gpg) for significantly faster symmetric decryption - Falls back to the pure-Python PGPy implementation when
gpgis not installed
- Encrypt any selected files using a public key or a symmetric passphrase
- Encrypted output is saved with a
.gpgextension
- When enabled, archives (
.zip,.tar,.tar.gz,.gz) are automatically extracted after decryption - Extracted contents are scanned recursively for nested GPG files
- Discovered GPG files are automatically added to the decryption queue
- Non-GPG archive files selected directly are extracted first, then their GPG contents are queued for decryption
- Set a single output directory for all decrypted or encrypted files
- Browse for the output folder via a built-in directory picker modal
- Leave blank to output files alongside their sources
- Optionally provide a private key file for decryption or a public key file for encryption
- Browse for the key file using a dedicated file picker modal
- Real-time timestamped log of all operations
- Success (✓), failure (✗), and informational messages
- Clearable with a button or
Ctrl+L
| Shortcut | Action |
|---|---|
Ctrl+D |
Decrypt All |
Ctrl+E |
Encrypt All |
Ctrl+L |
Clear Log |
Ctrl+Q |
Quit |
- Python 3.8 or higher
pip install -r requirements.txtOr install manually:
pip install textual>=0.40.0 PGPy>=0.6.0python Kleopatra_py.py- Browse the file tree on the left panel and click files to add them to the queue.
- Enter your passphrase in the settings bar (used for all files).
- (Optional) Select a private/public key file via the "Browse…" button.
- (Optional) Set an output directory or leave blank to use source directories.
- Click 🔓 Decrypt All or 🔐 Encrypt All to process the queue.
- Monitor progress in the Activity Log at the bottom.
| Package | Version | Purpose |
|---|---|---|
| Textual | ≥ 0.40.0 | Terminal UI framework |
| PGPy | ≥ 0.6.0 | Pure-Python OpenPGP implementation |
| Package | Purpose |
|---|---|
| GnuPG (system) | Faster symmetric decryption when available |
| PyInstaller (≥ 5.1) | Build a standalone .exe |
A one-file .exe can be built with PyInstaller:
pip install pyinstaller
cd Kleopatra-py
pyinstaller --clean --onefile --name Kleopatra_py Kleopatra_py.py --icon icon.icoOr simply run the included batch file on Windows:
build_exe.batThe resulting binary will be in the dist/ folder.
