Tired of using pass? Want to switch to the nice GUI and wider ecosystem of KeePassXC?
Turn a pass (https://www.passwordstore.org/) repository into an XML file to import into KeePassXC. XML is dumped into stdout.
$ python3 pass-to-keepassxc.py <password store directory>
Typically, pass's password store directory is ~/.password-store
.
$ python3 pass-to-keepassxc.py ~/.password-store > deleteme.xml
$ keepassxc-cli import deleteme.xml MyKeepassXCPasswords.kbdx
$ rm deleteme.xml
Then go and configure additional settings in the KeePassXC GUI or CLI.
- The subdirectories of
<password-store-directory>
are equivalent to "groups" in KeePassXC. - Each leaf file (e.g., .gpg files) is a GPG-encrypted file with the first line being the password.
- The name of the directory above a leaf file is a URL of a site.
- Additional lines after the first line should be stored in the "Notes" field in KeePassXC.
This assumes a directory structure like this:
...
├── financial
│ ├── bank.example.com
│ │ └── dumbusername99
│ └── ...
└── browser
├── webmail.example.com
│ └── [email protected]
...
You may have to either edit this script or manually fix the entries in KeepassXC afterward if you are doing something different.