MiniSecret is a minimal, secure secrets manager for Python projects and automation agents.
It uses AES-256-GCM encryption and an environment-based master key to keep your secrets safe, simple, and offline.
- 🔒 AES-256-GCM authenticated encryption
- 🔐 Environment-based master key (
MINISECRET_KEY) - 🧊 Local encrypted file store (
secrets.enc.json) - ⚙️ Simple Python class + optional CLI tool
- 🧽 Secure memory auto-wipe for sensitive values
- 🚫 No cloud dependencies or runtime daemons
| Feature | MiniSecret | python-keyring | python-decouple | hvac / AWS / GCP |
|---|---|---|---|---|
| 🔐 Encryption | ✅ AES-256-GCM | ✅ OS-backed | ❌ None | ✅ Enterprise |
| 📁 File-based | ✅ | ❌ | ✅ | ❌ |
| 💻 Works offline | ✅ | ✅ | ✅ | |
| 🧠 Simple to use | ✅ | ✅ | ✅ | ❌ |
| 🛡️ Secrets in memory only | ✅ Optional | ❌ | ❌ | ✅ |
Install directly from PyPI:
pip install minisecretpython -c "import os, base64; print(base64.urlsafe_b64encode(os.urandom(32)).decode())"export MINISECRET_KEY="your-generated-key"To persist: add to ~/.bashrc, ~/.zshrc, or .profile.
$env:MINISECRET_KEY = "your-generated-key"- Search for "Environment Variables"
- Add a new User variable
- Name:
MINISECRET_KEY - Value: your-generated-key
- Name:
You want to store the following secret:
MySecretPassword
minisecret put my_password MySecretPasswordminisecret get my_passwordSecure retrieval (auto-wiped from memory):
minisecret get my_password --secureList all stored keys:
minisecret listfrom minisecret import MiniSecret
import pyautogui
import time
secrets = MiniSecret()
# Secure version (wiped from memory immediately)
password = secrets.secure_get("my_password")
# Type the password into a GUI window
time.sleep(2)
pyautogui.write(password, interval=0.1)- Secrets are encrypted with AES-256-GCM and stored in
secrets.enc.json - Secrets are decrypted only in memory when accessed
- Use
secure_get()or--secureto clear secrets from memory after use - Do not commit
secrets.enc.jsonor yourMINISECRET_KEYto version control
minisecret put <key> <value>
minisecret get <key> [--secure]
minisecret list- ⏳ Auto-expiring secrets
- 📦 Project-based secret stores
- 🔐 Password-prompt fallback for the master key
- 🧽 Clipboard auto-clear support
Developed with ❤️ by @Cognet-74