Seamlessly migrate your passwords from Unix pass to Proton Pass
A lightweight Python migration tool that converts your existing pass password store into a Proton Pass compatible CSV format. Perfect for users switching from the Unix command-line password manager to Proton's secure password manager.
- β Complete Migration - Extracts passwords, usernames, emails, and notes
- π Secure Processing - Uses GPG directly, no plaintext intermediate storage
- π₯οΈ Cross-Platform - Works on macOS, Linux, and Windows (with WSL)
- β‘ Fast & Simple - Single command migration of entire password store
- π― Proton Pass Ready - Generates perfectly formatted CSV for direct import
| Field | Source | Proton Pass Column |
|---|---|---|
| Password | First line of pass entry | password |
| Username | username:, user:, login: lines |
username |
Lines containing @ |
email |
|
| Notes | All other content | note |
| Entry Name | Pass entry path | name |
- Unix pass - The password manager must be installed and configured
- GPG - Required by pass for encryption/decryption
- Python 3.6+ - For running the migration script
To avoid interactive GPG passphrase prompts during migration, you need to enable passphrase preset in GPG agent:
-
Edit your GPG agent configuration file:
~/.gnupg/gpg-agent.conf -
Add the following line:
allow-preset-passphrase -
Reload the GPG agent:
gpg-connect-agent reloadagent /bye
If the above doesn't work, you may need to restart the agent completely:
gpg-connect-agent killagent /bye gpg-agent --daemon
The script uses the following environment variables:
GPG_PASSPHRASE(optional): Your GPG passphrase. If not set, you'll be prompted to enter itENCRYPTION_KEYGRIP(required for passphrase preset): Your GPG key's keygrip
To find your encryption keygrip:
gpg --list-secret-keys --with-keygripLook for your encryption key and copy the keygrip value.
-
Set environment variables (optional but recommended):
export GPG_PASSPHRASE="your-gpg-passphrase" export ENCRYPTION_KEYGRIP="your-keygrip-here"
-
Run the migration script:
python migrate.py
-
Import the generated CSV into Proton Pass:
- The output file will be saved to
~/.proton-migrate/protonpass.csv - Import this file through the Proton Pass web interface
β οΈ IMPORTANT: Delete the CSV file after importing to protect your password data:rm ~/.proton-migrate/protonpass.csv
- The output file will be saved to
The script generates a CSV file with the following columns:
name: Entry name from passurl: URL (currently empty)email: Extracted email addressesusername: Extracted usernames (looks for username:, user:, login: prefixes)password: The actual passwordnote: Any additional lines not categorized as username/emailtotp: TOTP codes (currently empty)vault: Vault assignment (currently empty)
The script expects pass entries in this format:
password_here
username: your_username
email: your_email@example.com
any other notes or information
Alternatively, simple formats like:
password_here
your_username
your_email@example.com
- Input:
~/.password-store/(default pass store location) - Output:
~/.proton-migrate/protonpass.csv
- Ensure
allow-preset-passphraseis enabled in~/.gnupg/gpg-agent.conf - Verify your
ENCRYPTION_KEYGRIPis correct - Check that the GPG agent is running and reloaded
- Ensure you have read access to
~/.password-store/ - Ensure you can create files in
~/.proton-migrate/
- Install
pass: Most package managers have it available - Ensure Python 3.6+ is installed
This script has been tested on:
- macOS
- Linux
Windows support may require additional configuration for GPG paths and pass installation.