OnePIF is a KeePass 2.x plugin to import 1Password Interchange Format (1pif) files.
This plugin was made using Dmitry Wolf's 1P2KeePass as a guide and example. There are copy-pasted bits of 1P2KeePass code I was lazy to rewrite myself.
Features and support
Brief list of features
- The plugin imports:
- Most item types available in 1Password 6: Logins, Secure Notes, Credit Cards, Identities, Passwords, Bank Accounts, Databases, Driver Licenses, Email Accounts, Memberships, Outdoor Licenses, Passports, Reward Programs, Servers, Social Security Numbers, Software Licenses, Wireless Routers, User-defined Folders.1
- Legacy item types from 1Password 3: Email Account (v1), iTunes, MySQL Database, FTP Account, iCloud (a.k.a. MobileMe), Generic Account, Instant Messenger, Internet Provider, Amazon S3 (a.k.a. Amazon Web Services).
- All template fields, web form fields and user-defined fields.
- Previously used passwords list.
- User-defined tags.
- Favorite flag (as a tag).
- Trashed items.
- Custom user-provided icons2 (not the rich icons provided by AgileBits).
- File attachments.
- TOTP fields formatted for KeeWeb, Tray TOTP or KeeOtp.
- Organizes items into the standard 1Password categories or using pre-existent user-defined folders.
- Proper handling of line endings in multiline fields.
- Customizable date formats: ISO 8601 or user locale.
- Customizable address formats: one-liner, multi-line in a single field or one field for each address component.
(Un)tested and (un)supported file formats and platforms
- The plugin was tested using files created in 1Password 3 and 6 for macOS and 1Password 4 for Windows and exported by 1Password 6 and 7 for macOS as well as 1Password 4 for Windows. All item types (from the above list in previous section) and template fields were tested. Nevertheless the number of combinations for creating, updating, migrating and exporting items in different versions of 1Password creates a whole universe of possibilities, so you might still find errors while importing a file.
- Very limited testing was performed with 1Password for Families/Teams/Businesses vaults.3
- The plugin was tested with KeePass 2.40+ running on Windows and KeePass 2.38 running on Ubuntu.
I expect to keep fixing bugs, adding some features and broadening support for more variants of 1pif files. Here are some of the plans, in no particular order:
- General error handling.
- Log/summary of import errors.
- Support for older 1pif formats (without sections).
Download and installation
You can get the latest release from the Releases page. To install, unpack the archive and copy its contents to the KeePass Plugins directory.
If you're using KeePass 2.08 or older, you'll have to build the DLL version of the plugin. See next section for instructions.
Building and debugging
Before building the plugin you must either download and place a copy of KeePass software in the
KeePass directory inside the solution directory, or adjust the paths all over the projects4 to point to your current KeePass installation.
The plugin depends on Newtonsoft Json.NET. If you're using Visual Studio, enable the NuGet automatic download and installation of missing packages in
Tools > Options > NuGet Package Manager > General. If you're using MSBuild use the
nuget restore command to restore dependencies before building.
Building the PLGX version
You don't have to actually compile anything, just build the
PackagePLGX project which consists of only a few post-build commands. KeePass will compile the plugin code upon first load of the PLGX package.
Building the DLL version
OnePIF project using the
Release configuration and you're ready to go.
To install, copy the plugin DLL along with the dependecies and (optionally) the localization satellite DLLs to the KeePass Plugins path5.
To debug the plugin, configure
OnePIF project Debug settings to start the KeePass executable.
This software is provided as-is without any warranty of any kind. I take no responsability or liability for any damage it may cause. If it breaks your data you can keep its pieces.
Vaults often contain very sensitive information. Thoroughly check imported data for completeness and correctess before deleting the original files.
1 Smart Folders are not supported since KeePass seems to lack a similar feature.
2 Only icons saved as image formats supported by .NET
System.Drawing.Bitmap class, namely: BMP, GIF, EXIF, JPEG, PNG and TIFF.
3 Sample 1pif files completely or partially failing to be imported are welcome to expand support. If they're from a real vault, don't forget to redact private information.
4 Currently the post-build event in the PackagePLGX project, the build output path and the reference to the KeePass executable in the OnePIF project are dependent on the KeePass installation path.
5 If you want to use the localization satellite DLLs and you're using KeePass version 2.40 or older, copy all the files to the root KeePass installation path. Otherwise it will try (and fail) to load the satellite DLLs as plugins themselves.