Tool to migrate from Enpass to 1Password
Project description
enpass2onepassword
Tool to migrate from Enpass to 1Password. This tool takes an Enpass JSON export and imports it via the 1Password SDK.
Requirements
- You need Python 3 installed on your system.
- You need
pipinstalled on your system. - You need to know how to open a Terminal aka Shell.
- On macOS, for example Terminal.app.
- On Windows, for example PowerShell.
- On Linux: You know your way.
Quick-Start
- Follow the Preparations section below.
- Install
uv. - Then, in a terminal of your choosing, run the following command:
uvx enpass2onepassword ~/Documents/no_backup/enpass_export.json
- Fill in the information
- Sa name: The name of your 1Password Service Account
- Sa token: The token (aka credential) for the 1Password Service Account.
- Op vault: The name of the empty(!) 1Password Vault.
Preparations
- Create a new 1Password Vault.
- Call the Vault whatever you like, for example
Enpass. - See the official documentation for further guidance.
- Call the Vault whatever you like, for example
- Create a 1Password Service Account.
- Call the Service Account whatever you like, for example
enpass2onepassword - Use the cog ⚙️ to add the write permission to the Service Account
- See the official documentation for further guidance.
- Call the Service Account whatever you like, for example
- Copy the Service Account Token (and/or save it to 1Password).
- Export your Enpass Vault as JSON, for example as
export.json.- ⚠️ The export is unencrypted!
- Don't forget to delete the file after a successful import!
- Ensure, that you export the vault to a place that is not synced to another computer
and which is not backed up automatically.
- If you use Time Machine on macOS, create a folder
no_backupin your Documents. Then open the System Settings. Under General click on Time Machine. Now click on Options…. Use the+-button to add the folder you just created to the Exclude from Backups list.
- If you use Time Machine on macOS, create a folder
- A good place would also be an SD card or a USB drive with an encrypted filesystem.
Usage Overview
Usage: enpass2onepassword [OPTIONS] ENPASS_JSON_EXPORT
Adds items from an Enpass JSON export to a 1Password vault through the
1Password API.
Options:
-n, --op-sa-name, --sa TEXT The 1Password service account name. You
chose this when creating the 1Password
service account.
Can also be supplied as environment variable
'OP_SERVICE_ACCOUNT_NAME'. [default:
enpass2onepassword; required]
-t, --op-sa-token, --token TEXT
The 1Password service account token. It was
shown to you when you created the 1Password
service account.
Can also be supplied as environment variable
'OP_SERVICE_ACCOUNT_TOKEN'. [required]
-o, --op-vault, --vault TEXT The name of the 1Password vault. All Enpass
items will be created in that 1Password
vault. This 1Password vault must be empty!
Also, the service account must have write
permissions to it.
Can also be supplied as environment variable
'OP_VAULT'. [default: Enpass; required]
--ignore-non-empty-vault By default, this tool will stop if it
detects that there are already items in a
vault. Use this flag to ignore this behavior
and continue, even if there are already
items in the given vault. If you use this,
you should definitely make a sound backup of
the vault before the import!
--no-confirm By default, this tool will stop before
importing anything to 1Password, and you
need to confirm the import. Use this flag to
ignore this behavior and import without
further confirmation.
--no-wakelock By default, this tool will prevent the
computer to go to sleep while the import is
running. Use this flag to disable this
behavior.
When this flag is defined, then the computer
might go to sleep and interrupt your import.
The import is usually resumed, when your
computer resumes from sleep. The result is
that you won't make the best use of the
1Password rate limits.
--silent By default, this tool will print status
information while importing to 1Password.
Use this flag to disable such reports.
--skip INTEGER Skip the first number of items. This can be
helpful to recover a failed import.
[default: 0]
--op-rate-limit-hourly INTEGER 1Password enforces a write request rate
limit per 1Password Service Account. The
hourly rate limit as of 2025-01-01 is 100
requests per hour for private, family and
team accounts and 1'000 requests per hour
for Business accounts.
See https://developer.1password.com/docs/service-accounts/rate-limits/ for more info. [default: 100]
--op-rate-limit-daily INTEGER 1Password enforces a write request rate
limit per 1Password Account. The daily limit
as of 2025-01-01 is 1'000 requests per hour
for private and family accounts, 5'000 per
day for Teams accounts and 50'000 requests
per hour for Business accounts.
See https://developer.1password.com/docs/service-accounts/rate-limits/ for more info. [default: 1000]
--op-client-validity INTEGER This tool authenticates with the 1Password
server in order to import entries. This
authentication is only valid for a certain
amount of time. With this parameter, you can
adjust the time after which a this tool re-
authenticates with the 1Password server.
The value is in seconds. [default: 1800]
--help Show this message and exit.
Tip: Load Service Account Credentials via 1Password CLI
Add the credentials of your 1Password Service Account to your private 1Password vault like so:
- Vault: Private
- Type: API Credential
- Name:
Service Account Auth Token - Username:
enpass2onepassword(or whatever you chose as username) - Password:
ops_…(the secret generated by 1Password)
Note: If you choose other names, you need to adjust the commands below to make it work!
Then install the 1Password CLI and use the following command to run the migration tool:
# unlock 1Password CLI
op signin
# specify the paths to the secrets
export OP_VAULT="Enpass"
export OP_SERVICE_ACCOUNT_NAME="$(op read 'op://Private/Service Account Auth Token/username')"
export OP_SERVICE_ACCOUNT_TOKEN="$(op read 'op://Private/Service Account Auth Token/password')"
# inject the secrets
uvx enpass2onepassword ~/Desktop/export.json
If that does not work, it may help to replace Private with the vault's UUID (which is a value like johaxupyjfamyo2ivigxs64y8n) in the above snippet.
Update
Run the following command to update the tool to the latest version.
uv tool upgrade enpass2onepassword
Roadmap
- Improved support for credit card's expiry date, once #140 is implemented
- Support for importing attachments, once #139 is implemented
- Improved support for Secure Notes, once #141 is implemented
- Improved support for Wireless Networks, once #142 is implemented
- Support for favorites, once #143 is implemented
jq tips for developers
These tips require that jq is installed on your computer.
List all categories in export
To list all the categories in the Enpass export, use the following command:
jq '[.items[].category] | unique' export.json
List all field types in export
To list all the field types in the Enpass export, use the following command:
jq '[.items[] | select(.fields != null) | .fields[]] | flatten | [.[].type] | unique' export.json
Split your export by category
To split your export by category, use the following command:
jq '{folders: .folders, items: [.items[] | select(.category == "uncategorized")]}' export.json > export_uncat.json
# ^^^^^^^^^^^^^ Change category here
Select all items with a note
jq '{folders: .folders, items: [.items[] | select(.note != "")]}' enpass_complete.json > export_hasnote.json
Development
This project uses uv for dependency management, building and publishing.
Run the development build:
uv sync
uv run enpass2onepassword
Update dependencies:
uv lock --upgrade
Linters
This project uses MegaLinter. To run MegaLinter locally:
npx mega-linter-runner
This requires a valid Docker-compatible container runtime to be available, like Podman.
Also, it required a Node installation with npm.
Release
Release procedure:
- Edit the version in
pyproject.toml - Commit the change
git pushgit tag 0.1.0git push --tags
The rest is taken care of by the Release GitHub Action.
Copyright and License
Copyright © 2025 Christian Mäder.
See LICENSE for license.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file enpass2onepassword-0.2.0.tar.gz.
File metadata
- Download URL: enpass2onepassword-0.2.0.tar.gz
- Upload date:
- Size: 22.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
badd536daefda96512eec4cb175eb068f0b32230c97f06a7ad484585c6ecf4d2
|
|
| MD5 |
40dbf0fdf0fbdbf4b8570fb654869102
|
|
| BLAKE2b-256 |
01c27bcc14d94e66867339986bff86cf385101e77ed2938afc1049390b73e10e
|
Provenance
The following attestation bundles were made for enpass2onepassword-0.2.0.tar.gz:
Publisher:
release.yaml on cimnine/enpass2onepassword
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
enpass2onepassword-0.2.0.tar.gz -
Subject digest:
badd536daefda96512eec4cb175eb068f0b32230c97f06a7ad484585c6ecf4d2 - Sigstore transparency entry: 161266680
- Sigstore integration time:
-
Permalink:
cimnine/enpass2onepassword@4dadb7fbe81e9db5693a3d5625e18cb97f6ce7e8 -
Branch / Tag:
refs/tags/0.2.0 - Owner: https://github.com/cimnine
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@4dadb7fbe81e9db5693a3d5625e18cb97f6ce7e8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file enpass2onepassword-0.2.0-py3-none-any.whl.
File metadata
- Download URL: enpass2onepassword-0.2.0-py3-none-any.whl
- Upload date:
- Size: 23.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
04459f791ff402b37267f9c30cf1d018f9f0972f435991ee4068d75773528699
|
|
| MD5 |
f74af19a9dd835c4b00654c4dcf50dcb
|
|
| BLAKE2b-256 |
414c0b226135da4bcd5b072b49e3b3f1ddb242008cf559472b04444df97e1c10
|
Provenance
The following attestation bundles were made for enpass2onepassword-0.2.0-py3-none-any.whl:
Publisher:
release.yaml on cimnine/enpass2onepassword
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
enpass2onepassword-0.2.0-py3-none-any.whl -
Subject digest:
04459f791ff402b37267f9c30cf1d018f9f0972f435991ee4068d75773528699 - Sigstore transparency entry: 161266682
- Sigstore integration time:
-
Permalink:
cimnine/enpass2onepassword@4dadb7fbe81e9db5693a3d5625e18cb97f6ce7e8 -
Branch / Tag:
refs/tags/0.2.0 - Owner: https://github.com/cimnine
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@4dadb7fbe81e9db5693a3d5625e18cb97f6ce7e8 -
Trigger Event:
push
-
Statement type: