A CLI and GUI password manager for securely storing and managing credentials with end-to-end encryption.
- Encrypted storage — Passwords are encrypted with Fernet before being persisted to a local SQLite database.
- Password generation — Produces cryptographically secure random passwords of configurable length.
- Strength checker — Rates password strength (Weak, Medium, Strong, Very Strong) in real time.
- Clipboard support — Copies generated passwords to the system clipboard.
- Dual interface — Terminal CLI with a
richUI, plus a native PyQt6 GUI. - Full CRUD — Add, list, edit, and delete credentials from the vault.
- Python 3.10+
- SQLite3 (bundled with Python)
Clone the repository and install dependencies:
git clone https://github.com/SMohammad-Molanezhad/password-manager.git
cd password-manager
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtFor the GUI version, also install PyQt6:
pip install -r requirements-gui.txtStart the CLI:
python main.pyThe encryption key is created automatically on first run. To regenerate the key, use:
python generate_key.pyThe interactive menu lets you:
- Add a new credential
- List all stored credentials
- Delete a credential by ID
- Edit an existing credential
- Generate a secure password
- Exit
python main_gui.pyPassword-Manager/
├── app/
│ ├── cli/ # Terminal UI (menus, prompts, panels)
│ ├── crypto/ # Fernet encryption & key management
│ ├── database/ # SQLite connection, queries, repository
│ ├── gui/ # PyQt6 GUI window and widgets
│ ├── services/ # Business logic (password gen & service)
│ └── utils/ # Clipboard, helpers, strength checker
├── main.py # CLI entry point
├── main_gui.py # GUI entry point
├── generate_key.py # Standalone key generator
├── vault.db # Encrypted credential store
├── secret.key # Encryption key (not tracked in git)
└── requirements.txt # Core dependencies
Settings are defined in app/config.py:
| Constant | Purpose |
|---|---|
VERSION |
Application version |
DB_NAME |
SQLite database file path |
KEY_FILE |
Encryption key file path |
STYLE |
Rich terminal colour theme |
Edit this file to adjust defaults.
- The encryption key (
secret.key) is stored in the working directory. Back it up securely — losing it makes stored passwords irrecoverable. - Add
secret.keyandvault.dbto.gitignorebefore sharing the repository. - Key file permissions are set to
0600on Unix automatically.
