A simple, offline CLI password manager. Everything is encrypted with your master password and stored locally. Nothing leaves your machine.
Option 1 — Native (recommended)
# Create ~/bin if it doesn't exist and add it to PATH
mkdir -p ~/bin
echo 'export PATH="$HOME/bin:$PATH"' >> ~/.bashrc && source ~/.bashrc
cp pm pm.sh ~/bin/
chmod +x ~/bin/pm ~/bin/pm.sh
echo "alias pm='pm.sh'" >> ~/.bashrc && source ~/.bashrc
pm initThat's it. On first run pm.sh sets up a virtualenv automatically.
Requires Python 3.10+
Option 2 — Docker
docker build -t pm-vault .
echo 'alias pm="docker run --rm -it -v $HOME/.pm:/root/.pm pm-vault"' >> ~/.bashrc
source ~/.bashrc
pm initYour vault is stored at ~/.pm/ on your machine — not inside the container.
pm init # set up your vault (once)
pm add # add a password
pm ls # list everything
pm get 1 # view entry #1 and copy password to clipboard
pm find github # searchCreate your vault. You'll set a master password (min 8 characters). There is no password recovery — don't forget it.
pm init # first-time setup
pm init --force # wipe and start fresh (deletes all entries, no confirmation prompt)
pm init -f # same as --forceAdd a new entry. You'll be prompted for each field.
pm add| Field | Required | Notes |
|---|---|---|
| Title | Yes | e.g. "GitHub" |
| Username | No | |
| URL | No | |
| Category | No | e.g. "work", "personal" |
| Password | No | Leave blank to auto-generate a strong password |
| Notes | No |
List all entries.
pm lsView an entry and copy its password to clipboard.
pm get 3 # copy password to clipboard
pm get 3 --show # also print it in the terminal
pm get 3 --pipe # output raw password only (for scripting)Edit an entry. Leave any field blank to keep the current value.
pm update 3
pm edit 3 # aliasDelete an entry. Asks for confirmation.
pm rm 3
pm delete 3 # alias
pm del 3 # aliasSearch across title, username, URL, category, and notes.
pm find github
pm find work
pm search github # aliasGenerate a random password and copy it to clipboard.
pm gen # 24 chars, all character types
pm gen --length 32 # custom length
pm gen -l 32 # same as --length
pm gen --no-symbols # letters and digits only
pm gen --no-digits # letters and symbols only
pm gen --no-upper # lowercase and symbols onlyCheck how strong a password is. You'll be prompted to type it (never passed as an argument).
pm strength
pm check # aliasExport all entries to a CSV file. Passwords will be in plaintext — you'll be warned before anything is written.
pm export # saves to ~/.pm/export.csv
pm export --output ~/backup.csv # custom path
pm export -o ~/backup.csv # same as --outputDelete the file when you're done with it.
Import entries from a CSV file.
pm import ~/export_from_bitwarden.csvExpected columns: title, username, password, url, notes, category. Only title is required.
Show entry count and category breakdown.
pm statsSSH into a server using stored credentials. The URL field of the entry is used as the hostname.
pm ssh 5
pm ssh 5 --port 2222
pm ssh 5 -P 2222 # same as --portRequires sshpass to be installed:
sudo apt install sshpass # Debian/Ubuntu
sudo pacman -S sshpass # Arch
sudo dnf install sshpass # FedoraClipboard doesn't work Install the system clipboard backend:
sudo apt install xclip # Linux X11
sudo apt install wl-clipboard # Linux WaylandForgot master password
There's no reset. If you have an export, you can pm init --force and pm import it back. Otherwise the vault is unrecoverable.
Docker: clipboard doesn't work Containers can't access the host clipboard. Copy manually instead:
pm get 3 --pipe | xclip -selection clipboard # X11
pm get 3 --pipe | wl-copy # WaylandDocker: permission denied / cannot connect to daemon
sudo systemctl start docker
sudo usermod -aG docker $USER # then log out and back in