Skip to content

Rojit-Timilsena/VaultPM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔐 pm — Vault Password Manager

A simple, offline CLI password manager. Everything is encrypted with your master password and stored locally. Nothing leaves your machine.


Install

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 init

That'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 init

Your vault is stored at ~/.pm/ on your machine — not inside the container.


Quick Start

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  # search

Commands

pm init

Create 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 --force

pm add

Add 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

pm ls

List all entries.

pm ls

pm get <id>

View 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)

pm update <id> / pm edit <id>

Edit an entry. Leave any field blank to keep the current value.

pm update 3
pm edit 3     # alias

pm rm <id>

Delete an entry. Asks for confirmation.

pm rm 3
pm delete 3   # alias
pm del 3      # alias

pm find <query>

Search across title, username, URL, category, and notes.

pm find github
pm find work
pm search github  # alias

pm gen

Generate 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 only

pm strength

Check how strong a password is. You'll be prompted to type it (never passed as an argument).

pm strength
pm check      # alias

pm export

Export 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 --output

Delete the file when you're done with it.


pm import <file>

Import entries from a CSV file.

pm import ~/export_from_bitwarden.csv

Expected columns: title, username, password, url, notes, category. Only title is required.


pm stats

Show entry count and category breakdown.

pm stats

pm ssh <id>

SSH 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 --port

Requires sshpass to be installed:

sudo apt install sshpass     # Debian/Ubuntu
sudo pacman -S sshpass       # Arch
sudo dnf install sshpass     # Fedora

Troubleshooting

Clipboard doesn't work Install the system clipboard backend:

sudo apt install xclip        # Linux X11
sudo apt install wl-clipboard # Linux Wayland

Forgot 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                     # Wayland

Docker: permission denied / cannot connect to daemon

sudo systemctl start docker
sudo usermod -aG docker $USER  # then log out and back in

About

A CLI based password manager that removes needs for repetetive and exhausting credentials' entry. Strong for SSH time saving and efficiency

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors