A simple command-line interface (CLI) password manager tool that was developed for a session presented during the Society of Cybersecurity (SOC) Winter Boot Camp for educational purposes. This project provides hands-on experience with Python, CLI app development, file I/O, and basic coding concepts. The recordings of the sessions can be found here: Part 1 and Part 2.
Want to get started quickly? Jump to Getting Started!
- Secure Vaults: Safely store your passwords in encrypted vaults (encryption was given as a self-task for students)
- Simple Commands: Easy-to-use commands for adding, listing, and retrieving passwords.
- Colorful Terminal Output: Utilizes the
rich
library for a visually appealing and user-friendly interface.
- CLI App Development
- Functions
- File I/O
- Code Organization
- f-strings
- Conditional Statements (if statements)
argparse
: To make the CLI app.os
: To operate on files.rich
(optional): Create a colorful terminal output.
Ensure your system has Python
and PIP
installed.
-
Make a new directory (folder):
mkdir password-manager
-
Navigate to the project directory:
cd password-manager
-
Clone the repository:
git clone https://github.com/Ahmad-Alsaleh/Password-Manager-CLI.git
-
(Optional, but recommended) Make a virtual environment:
# Windows python -m venv venv # creating the virtual environment .\venv\Scripts\activate # activating the virtual environment
# Mac/Linux python3 -m venv venv # creating the virtual environment source venv/bin/activate # activating the virtual environment
-
Install dependencies:
# Windows pip install -r requirements.txt
# Mac/Linux pip3 install -r requirements.txt
IMPORTANT NOTE: if you are using Mac/Linux, replace every python
with python3
.
- Square brackets
[VALUE]
: what in between is optional. - Angular brackets
<VALUE>
: this is a placeholder. That is, a value must replace it.
python password_manager.py --vault-name <name> --master-password <password> COMMAND [OPTIONS]
-
get
Retrieve the password for a specified account.python password_manager.py --vault-name <name> --master-password <password> get <account-name>
-
add
Add a new password to the vault.python password_manager.py --vault-name <name> --master-password <password> add <account-name> <password>
-
list
List all accounts in the vault (optionally displaying passwords).python password_manager.py --vault-name <name> --master-password <password> list [--show-passwords]
This project was written during the SOC Winter Boot Camp for educational purposes.
Feel free to contribute and enhance this educational project!