A lightweight, terminal-based password manager written in Python. Stores your credentials locally behind a master password — no internet connection, no third-party cloud.
- Master password protection (SHA-256 hashing)
- Add, search, list, and delete site credentials
- Cryptographically secure password generator (
secretsmodule) - One-click clipboard copy for retrieved passwords
- Fully offline — your data never leaves your machine
$ python vault.py
Create a master password: ········
Vault created. Remember your master password — it cannot be recovered.
Master password: ········
Unlocked.
[1] Add [2] Search [3] List [4] Delete [5] Quit
> 1
Site: github.com
Username: johndoe
Password (leave blank to generate one):
Length (default 16): 20
Generated password: xK$9mN!2pQ#7vR@3wL&8
Notes: work account
Entry for 'github.com' saved.
[1] Add [2] Search [3] List [4] Delete [5] Quit
> 2
Search site: github
Site : github.com
Username : johndoe
Notes : work account
Copy password to clipboard? (y/n): y
Password copied to clipboard.
Requirements: Python 3.8+
# 1. Clone the repository
git clone https://github.com/YOUR_USERNAME/password-vault.git
cd password-vault
# 2. (Optional) Create a virtual environment
python -m venv venv
venv\Scripts\activate # Windows
# source venv/bin/activate # macOS / Linux
# 3. Install dependencies
pip install -r requirements.txt
# 4. Run
python vault.py| Option | Action |
|---|---|
1 Add |
Save a new site, username, and password |
2 Search |
Find an entry by site name and copy its password |
3 List |
Display all saved site names |
4 Delete |
Remove an entry with confirmation |
5 Quit |
Exit the vault |
Tip: Leave the password field blank when adding an entry to auto-generate a secure password.
password-vault/
├── vault.py # Main application
├── requirements.txt # Python dependencies
├── .gitignore # Excludes vault data and temp files
└── README.md
vault.pklis created locally when you first run the app and is excluded from version control via.gitignore. Never share this file — it contains your stored credentials.
- Passwords are stored locally in a binary file (
vault.pkl). The file is excluded from git. - The master password is hashed with SHA-256 before storage — it is never saved in plain text.
- Password generation uses Python's
secretsmodule, which is cryptographically secure. - Limitation: vault entries are not encrypted at rest. A planned improvement is to add AES encryption using the
cryptographylibrary.
- AES-256 encryption for stored vault data
- Upgrade master password hashing to bcrypt / Argon2
- Export vault to an encrypted CSV
- Password strength checker on entry
- GUI version using Tkinter or a web frontend
- Language: Python 3
- Libraries:
hashlib,secrets,pickle,getpass,pyperclip - Storage: Local binary file (
.pkl)
MIT License — feel free to fork, modify, and use this project.
Built as a personal project to learn Python fundamentals, secure coding practices, and CLI application design.