Export Bitwarden vault
Project description
Bitwarden Exporter
Python Wrapper for Password Manager CLI for exporting bitwarden vaults.
Features
- Export your entire Bitwarden vault to a KeePass (.kdbx) database using the official Bitwarden CLI.
- Preserves structure and grouping:
- Personal items are placed under a top-level "My Vault" group and organized by your Bitwarden folders.
- Organization items are grouped by Organization → Collection, mirroring Bitwarden.
- Items without a folder/collection are added to the "My Vault" root.
- Rich item data mapping to KeePass entries:
- Title, Username, Password, Notes.
- URIs (primary URL mapped to entry URL; additional URIs stored as custom properties).
- TOTP/OTP codes are added to the entry so they can be used from KeePass.
- Custom fields (text/hidden/boolean and linked types) are preserved as KeePass custom properties.
- Identity and Card details (name, address, card brand/expiry, etc.) are included as custom properties.
- Attachments and SSH keys:
- All Bitwarden attachments are downloaded and attached to the corresponding KeePass entry.
- If duplicate attachment names occur, they are de-duplicated automatically (e.g., by appending -1).
- Items with SSH keys have their private/public keys materialized as files and attached to the entry.
- Built-in Bitwarden JSON snapshot:
- A "Bitwarden Export" entry is created at the database root with JSON attachments of status, organizations, collections, and items for reference/auditing.
- Duplicate handling for items in multiple collections:
- By default, items that belong to multiple collections are written only to the first collection (with a warning).
- Use
--allow-duplicatesto place the item in all of its collections.
- Safe temporary workspace:
- Attachments and generated SSH key files are stored in a configurable temporary directory during export.
- The temporary directory is automatically removed after export unless
--debugis used.
- Configurable and script-friendly CLI:
- Choose an output path for the KDBX and supply the database password directly or via a file path.
- Set a custom Bitwarden CLI executable path with
--bw-executable. - Verbose debug logging with
--debug(may log sensitive data; keeps temp files for troubleshooting).
- Prerequisites and safeguards:
- Requires the Bitwarden CLI (
bw) and an unlocked vault; the exporter will error if the vault is locked.
- Requires the Bitwarden CLI (
Prerequisites
(Recommended) Run with uvx
BW_SESSION=<session token> uvx bitwarden-exporter==VERSION --help
or
BW_SESSION=<session token> uvx bitwarden-exporter --help
Install with pipx
BW_SESSION=<session token> pipx install bitwarden-exporter
Options
bitwarden-exporter --help
-h, --help show this help message and exit
-l, --export-location EXPORT_LOCATION
Bitwarden Export Location, Default: bitwarden_dump_<timestamp>.kdbx, This is a dynamic value, Just in case if it exists, it will be overwritten
-p, --export-password EXPORT_PASSWORD
Bitwarden Export Password or Path to Password File.
--allow-duplicates, --no-allow-duplicates
Allow Duplicates entries in Export, In bitwarden each item can be in multiple collections, Default: --no-allow-duplicates
--tmp-dir TMP_DIR Temporary Directory to store temporary sensitive files, Make sure to delete it after the export, Default: /home/arpan/workspace/src/bitwarden-exporter/bitwarden_dump_attachments
--bw-executable BW_EXECUTABLE
Path to the Bitwarden CLI executable, Default: bw
--debug, --no-debug Enable Verbose Logging, This will print debug logs, THAT MAY CONTAIN SENSITIVE INFORMATION,This will not delete the temporary directory after the export, Default: --no-debug
Roadmap
- Make a cloud-ready option for bitwarden zero-touch backup, Upload to cloud storage.
- Restore back to bitwarden.
Credits
@ckabalan for bitwarden-attachment-exporter
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
bitwarden_exporter-1.6.2.tar.gz
(13.7 kB
view details)
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 bitwarden_exporter-1.6.2.tar.gz.
File metadata
- Download URL: bitwarden_exporter-1.6.2.tar.gz
- Upload date:
- Size: 13.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
538758df46f334760173e749fc954f50011e0951fde09e91bac172cef096c399
|
|
| MD5 |
841ba0d550267c339b51d669fe8f5504
|
|
| BLAKE2b-256 |
1e7707812ee836b5127765178469802e11ee252c552dc034e10711e545cdcb03
|
File details
Details for the file bitwarden_exporter-1.6.2-py3-none-any.whl.
File metadata
- Download URL: bitwarden_exporter-1.6.2-py3-none-any.whl
- Upload date:
- Size: 16.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b883bcd61c34334ea6d3e6307ace8749ac0569c258cbb2eddcb3a28c72783883
|
|
| MD5 |
13f91e56c7dfea273d42b72b4fa5f185
|
|
| BLAKE2b-256 |
922c5fc3d887a07c0e9044f51433ea44703c6bb756a58add591ac4690e1fec26
|