pass is the standard unix password manager. It stores passwords in GPG-encrypted files organized in a directory tree. Simple, secure, and works with git for syncing.
Initialization
- pass init <gpg-id> - Initialize password store with GPG key
- pass git init - Initialize git repository in password store
- ~/.password-store/ - Default password store location
Basic Operations
- pass - Show list of passwords
- pass <entry> - Show password for entry
- pass -c <entry> - Copy password to clipboard
- pass insert <entry> - Insert new password (prompts)
- pass generate <entry> <length> - Generate random password
- pass rm <entry> - Remove password entry
- pass mv <old> <new> - Rename/move entry
- pass cp <old> <new> - Copy entry
Password Generation
- pass generate <entry> 20 - Generate 20-character password
- pass generate -n <entry> 16 - Generate without symbols
- pass generate -c <entry> 24 - Generate and copy to clipboard
- pass generate -i <entry> - Interactive generation
Multi-line Entries
- pass insert -m <entry> - Insert multi-line entry
- First line is password, additional lines are metadata
- pass edit <entry> - Edit entry with $EDITOR
Git Integration
- pass git init - Initialize git repo
- pass git push - Push to remote
- pass git pull - Pull from remote
- pass git log - Show commit history
Common Examples
Initialize Store
pass init your@email.com
Initialize password store with your GPG key.
Generate Password
pass generate -c websites/github.com 32
Generate and copy 32-character password.
Retrieve Password
pass websites/github.com
Show password for entry.
Copy to Clipboard
pass -c websites/github.com
Copy password to clipboard (clears after 45 seconds).
Multi-line Entry
pass insert -m accounts/example.com
# Enter password, then username, then notes
Create entry with password and metadata.
Git Sync
pass git init
pass git remote add origin git@example.com:pass.git
pass git push
Set up git sync for password store.
Tips
- Organize passwords in directories (websites/, servers/, etc.)
- Use -c flag to copy passwords without displaying them
- First line of entry is the password, rest is metadata
- Git integration makes it easy to sync across devices
- Works great with browser extensions (passff, browserpass)
- Use pass-otp for TOTP codes
- Simple, auditable, and secure