← Back to projects

Personal Python project

Password Manager

Secure Command-Line Password Manager

A command-line password manager built in Python that securely stores account credentials in an encrypted local vault.

Status
Completed
Type
Personal Project
Interface
Python command line
Password Manager command-line interface

Overview

I built Password Manager to run in the terminal and give users a simple way to securely save and manage login credentials. It supports adding, viewing, searching, editing, and deleting entries, generating secure passwords, and changing the master password.

Everything stays stored locally instead of being sent to an online service.

Why I built it

I wanted to learn more about encryption, password-based key generation, secure local storage, and handling sensitive data. Building a useful command-line application gave those ideas a real workflow instead of leaving them as isolated concepts.

How it works

Master password
→
Salt + key derivation
→
Encryption key
→
Encrypted local vault

When the program starts, the user enters a master password. That password is not stored directly. Instead, the application combines it with a random salt to create an encryption key, which is then used to unlock the encrypted password vault.

Saved credentials remain encrypted on disk when the program is not running.

Security details

Python

The language used for the CLI and vault logic.

Scrypt

Derives an encryption key from the master password while making guessing attempts more expensive.

Fernet

Encrypts and decrypts the stored credential data.

Random salt

Adds unique input when creating a key from the master password.

Encrypted verifier

Confirms the master password without storing it directly.

Atomic writes

Uses safe file replacement so interrupted saves are less likely to corrupt the vault.

Password generator

Creates strong random passwords from the command line.

Master-password rotation

Re-encrypts the vault when the master password changes.

Automated tests

Checks important vault, encryption, and recovery behaviors.

Features

Add credentials

View saved accounts

Search credentials

Edit entries

Delete entries

Generate secure passwords

Change the master password

Encrypted local storage

Testing

The project includes automated tests for correct and incorrect master passwords, encryption and decryption, adding, editing, deleting, and reloading credentials, malformed records, atomic saves, and master-password rotation.

This is targeted project testing, not exhaustive security testing.

What I learned

This project helped me understand encrypted data persistence, password-based key derivation, file safety, and why storage, encryption, and interface responsibilities should be separated. It also gave me practice with unit testing, error handling, and debugging an older codebase through refactoring rather than immediately rewriting it.

Limitations

Password Manager is stored locally, has no cloud sync or browser extension, and has not undergone a professional cryptographic audit. Forgotten master passwords cannot be recovered. It is a focused learning project, not a production-ready password service.

CLI screenshot

Password Manager command-line interface showing the available vault commands

Project details

Type
Personal Project
Status
Completed
Language
Python
Interface
Command Line
Security
Scrypt
Fernet
Storage
Encrypted local JSON vault
Testing
Automated tests
Version
v1.0.0

← Back to all projects