Skip to main content

Export Bitwarden vault

Project description

Bitwarden Exporter

Python Wrapper for Password Manager CLI for exporting bitwarden vaults to KeePass.

Features

  • Comprehensive data mapping
    • Credentials
    • URIs (Compatible with keepass URL)
    • Notes (Compatible with keepass note)
    • TOTP codes (Compatible with keepass totp)
    • Custom Fields (Compatible with additional attributes)
    • Identity/Cards (Backup only, not supported by Keepass yet)
    • Attachments (Compatible with keepass attachment)
    • SSH keys (Compatible with keepass ssh and attachments)
    • Fido U2F Keys (Backup only, not supported by Keepass yet)
  • Preserves vault structure
    • Collection and Folder hierarchy is preserved as Keepass groups.
  • Built-in JSON snapshot of vault data for auditing.
  • Configurable CLI with options for duplicates handling, custom temp directory, debug logging, and Bitwarden CLI path.

Bitwarden Web Bitwarden Web

Structure TOTP Structure TOTP

Other screenshots.

Prerequisites

Installation

(Recommended) Run with uvx from PyPI

BW_SESSION=<session token> uvx bitwarden-exporter==VERSION --help

or

BW_SESSION=<session token> uvx bitwarden-exporter --help

Run it from source

BW_SESSION=<session token> uvx git+https://github.com/arpanrec/bitwarden-exporter.git@main bitwarden-exporter --help

Install with pipx from PyPI

BW_SESSION=<session token> pipx install bitwarden-exporter

Options

Run bitwarden-exporter --help to see all available options.

Required Options

--export-password, -p

Required - Password for the exported KeePass database.

You can provide the password in multiple ways:

  • Direct value: --export-password "my-secret-password"
  • From file: --export-password file:secret.txt
  • From environment: --export-password env:SECRET_PASSWORD
  • From vault (JMESPath expression): --export-password "jmespath:[?id=='xx-xx-xx-xxx-xxx'].fields[] | [?name=='export-password'].value"

Optional Configuration

--export-location, -l

Path for the exported KeePass database file.

  • Default: bitwarden_dump_<timestamp>.kdbx
  • Note: If the file exists, it will be overwritten.

--allow-duplicates, -d

Allow duplicate entries in the export. Since Bitwarden items can belong to multiple collections, this option controls whether to create duplicate entries in KeePass.

  • Default: --no-allow-duplicates

--tmp-dir, -t

Custom temporary directory for storing temporary sensitive files during export.

  • Default: System temporary directory
  • ⚠️ Security Note: Make sure to delete this directory after export.

--bw-executable, -e

Path to the Bitwarden CLI executable.

  • Default: bw (from system PATH)

--debug

Enable verbose logging for troubleshooting.

  • Default: --no-debug
  • ⚠️ Warning: Debug logs may contain sensitive information. When enabled, the temporary directory will NOT be automatically deleted.

Credits

@ckabalan for bitwarden-attachment-exporter

License

MIT

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

bitwarden_exporter-1.8.0.tar.gz (14.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bitwarden_exporter-1.8.0-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

Details for the file bitwarden_exporter-1.8.0.tar.gz.

File metadata

  • Download URL: bitwarden_exporter-1.8.0.tar.gz
  • Upload date:
  • Size: 14.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.3

File hashes

Hashes for bitwarden_exporter-1.8.0.tar.gz
Algorithm Hash digest
SHA256 2aaee2cbbc8c59cc19f58b681847b50a673f386e48b82c8f36dc8c3709f7f3c5
MD5 3a267812f4ec64656bb838adae756b37
BLAKE2b-256 cb3755bb9d4d0d07cfbd8f5350d028b4dd2f3a2b7e9cccf66ff099bd812a310a

See more details on using hashes here.

File details

Details for the file bitwarden_exporter-1.8.0-py3-none-any.whl.

File metadata

File hashes

Hashes for bitwarden_exporter-1.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f696a94e587fed7ca916e5bf0d14064391fef171f012fbdebc50cfc5ab1e15a9
MD5 4ad926f5dd221dbc257aa0b4b45a2e77
BLAKE2b-256 9351f8a8a2a413c11e4000fce3b1e759a02fe07363f0b0e12aeee21c788d85d5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page