π Password Manager (CLI)
A simple and secure command-line password manager built with Python. All stored passwords are encrypted using Fernet (AES-128) from the cryptography library.
π Features
Secure password storage (Fernet encryption)
Master password protection
Add / View / Update / Delete accounts
Encrypted JSON database
Clean, modular Python structure
Safe error handling for wrong master password (InvalidToken)
π Project Structure
project/ βββ cli.py βββ storage.py βββ crypto.py βββ database.py βββ main.py βββ password.db # Encrypted database βββ requirements.txt βββ README.md
π¦ Installation
Clone the repository:
git clone https://github.com/USERNAME/REPO-NAME.git cd REPO-NAME
Install required packages:
pip install -r requirements.txt
π Usage
Run the CLI:
python3 -m password_manager add python3 -m password_manager get python3 -m password_manager update python3 -m password_manager delete
π§ How It Works
You enter a master password
A PBKDF2-derived key is generated
Your data is encrypted with Fernet
All passwords stay encrypted inside password.db
Entering a wrong master password β raises a clean InvalidToken: Invalid master password
βοΈ requirements.txt
Make sure this file contains at least:
cryptography
π Security Notes
Master password cannot be recovered
Forgetting it means losing access to all encrypted data
Database contents are never stored in plaintext
π License
MIT License