pm is a small local CLI password manager. It stores entries in an encrypted
vault.json file in the directory where you run the command.
The project is intentionally simple: no accounts, no sync service, no browser extension, and no cloud backend.
Built for fun and as a way to learn how password managers work internally.
- Encrypted local vault file
- Master password unlock
- Argon2id key derivation for new vaults
- Backward-compatible PBKDF2 vault reading
- Login and secret entries
- Entry add, edit, show, list, and delete commands
- Master password rotation
- Secure random password generation
Install the project from the repo:
python3 -m pip install .For local development, the repo also includes a launcher:
ln -sf "$(pwd)/bin/pm" "$HOME/.local/bin/pm"Make sure ~/.local/bin is in your shell path:
export PATH="$HOME/.local/bin:$PATH"Then verify:
pm helpCreate a new encrypted vault:
pm initAdd a login:
pm add --login githubAdd a secret:
pm add --secret api-key-openaiShow one entry:
pm show githubList all entries:
pm listEdit an entry:
pm edit github --email alice@example.com
pm edit github --password new-password
pm edit github --url https://github.comDelete an entry:
pm delete githubChange the master password:
pm passwordGenerate a password:
pm gen --length 16 --uppercase --lowercase --numbers --symbolsDelete the vault file:
pm eraseShow command help:
pm
pm help
pm --helpThe plaintext vault data is a Python dictionary serialized as JSON before
encryption. On disk, vault.json stores an encrypted envelope:
{
"version": 1,
"kdf": "argon2id",
"time_cost": 3,
"memory_cost": 65536,
"parallelism": 4,
"salt": "...",
"ciphertext": "..."
}The actual entries are inside ciphertext.
pm uses:
getpassfor hidden master password prompts- Argon2id to derive an encryption key from the master password
- a random salt for key derivation
cryptography.fernetfor authenticated encryption- Python's
secretsmodule for password generation
This protects the vault file if someone obtains vault.json but does not know
the master password.
This project does not currently provide:
- automatic locking for a long-running session
- clipboard clearing
- multi-device sync
- two-factor authentication
- recovery keys
- secure sharing
- protection from malware or a compromised machine