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.1.tar.gz
(13.1 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.1.tar.gz.
File metadata
- Download URL: bitwarden_exporter-1.6.1.tar.gz
- Upload date:
- Size: 13.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
85c2dcedfcaf22c35aa51eeec74ed83140d67aa59491775c18d7b6d4dc7beffe
|
|
| MD5 |
8a3dbb34cd6c41016e9b3648a7f627f0
|
|
| BLAKE2b-256 |
e82b73b2744dec280cba41e0923789026ce16ced74820e77aadc4158185b6e87
|
File details
Details for the file bitwarden_exporter-1.6.1-py3-none-any.whl.
File metadata
- Download URL: bitwarden_exporter-1.6.1-py3-none-any.whl
- Upload date:
- Size: 16.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b3606307f1aa162456861b43e3001d979967d0ba0540209af1eb20ab746bbc7
|
|
| MD5 |
a0cf0236b0394c6dbde053a75fb1c1db
|
|
| BLAKE2b-256 |
ceaa5c47910511ca48398d889f044cf78da5b02e43a3b6f2254f059705a939a5
|