PassGuard CLI is a beginner-friendly Python command-line project that checks password strength, generates strong practice passwords, and stores sample password entries in a JSON file.
This project was built to revise Python fundamentals such as variables, input/output, conditionals, loops, functions, lists, dictionaries, file handling, JSON, exception handling, and basic CLI structure.
Warning: This project is for learning and practice only. Do not store real passwords in this app.
- Check password strength
- Detect common weak passwords
- Give password improvement suggestions
- Generate strong random passwords
- Save practice password entries
- Store entries in a JSON file
- View saved entries with hidden passwords
- Reveal a specific saved password when needed
- Search entries by website name
- Search entries by username
- Delete saved entries
When the program runs, it shows a menu:
===== PassGuard CLI =====
Warning: This project is for learning only. Do not store real passwords here.
1. Check Password Strength
2. Generate Strong Password
3. Save Passwords
4. View Saved Passwords
5. Search Specific Password Entries
6. Delete Password Entry
7. Exit
The user can choose an option and perform password-related actions from the terminal.
The app checks a password based on:
- Password length
- Uppercase letters
- Lowercase letters
- Numbers
- Special characters
- Spaces
- Common weak passwords
It then gives a score and classifies the password as:
- Very Common
- Weak
- Medium
- Strong
Example output:
Mudit@123 obtained a score of 10 and has Strength : Strong
The app gives suggestions to improve weak or medium passwords.
Example suggestions:
- Increase the password length to at least 8 characters.
- Use at least one uppercase character.
- Use at least one numerical character.
- Use at least one special character.
- Do not use only numbers. Mix letters and symbols too.
The password generator creates a random password using:
- Uppercase letters
- Lowercase letters
- Numbers
- Special characters
The user can choose a password length between 8 and 15 characters.
Example output:
Generated strong password: A7#mQp92
The app can save practice password entries in a JSON file named:
pass.json
Each saved entry contains:
{
"website": "GitHub",
"username": "mudit-codez",
"password": "Practice@123",
"score": 10,
"strength": "Strong"
}This storage feature is only for learning JSON and file handling. Do not save real passwords.
Hidden Password View
When viewing saved passwords, the app hides passwords by default.
Example:
1. GitHub
Username : mudit-codez
Password : ************
Score : 10
Strength : Strong
The user can reveal a specific saved password by entering its entry number.
The app allows searching saved entries by:
- Website name
- Username
This helps practice loops, string comparison, dictionaries, and list traversal.
The user can delete a saved password entry by selecting its entry number.
After deletion, the updated list is saved back to the JSON file.
This project helped revise the following Python concepts:
- Variables
- Input and output
- Strings
- Lists
- Dictionaries
- Functions
- Loops
- Conditional statements
- Exception handling
- File handling
- JSON reading and writing
- Random module
- Basic CLI menu design
-
Make sure Python is installed on your system.
-
Clone this repository or download the project folder.
-
Open the project folder in a terminal.
-
Run the program:
python main.py- Follow the menu options in the terminal.
PassGuard/
│
├── main.py
├── pass.json
└── README.md
If pass.json does not exist or is empty, the program safely starts with an empty password list.
Possible future improvements:
- Add edit password entry feature
- Add password confirmation before saving
- Hide passwords in search results
- Improve password scoring rules
- Use Python's
secretsmodule for stronger password generation - Add master password protection
- Encrypt saved password data
PassGuard CLI is not a real password manager.
It was created only as a beginner Python learning project. Do not use it to store real passwords, private credentials, banking details, or any sensitive information.