Skip to content

Add export helpers for browser import and other formats #59

@coreyleavitt

Description

@coreyleavitt

Problem

Users often need to:

  • Import passwords from browsers into kdbxtool
  • Export from kdbxtool to browser-compatible CSV
  • Convert between formats

Proposal

Add import/export utilities:

from kdbxtool import Database
from kdbxtool.export import to_csv, to_json, to_bitwarden
from kdbxtool.import_ import from_csv, from_chrome, from_firefox

# Export to CSV (Chrome/Firefox compatible)
db = Database.open('vault.kdbx', password='secret')
to_csv(db, 'export.csv', fields=['title', 'username', 'password', 'url'])

# Export to Bitwarden JSON
to_bitwarden(db, 'bitwarden-export.json')

# Import from Chrome CSV
entries = from_chrome('chrome-passwords.csv')
for entry in entries:
    db.root_group.add_entry(entry)

# Import from 1Password export
entries = from_1password('1password-export.csv')

Security Considerations

  • Exported files contain plaintext passwords - should warn user
  • Consider secure deletion of export files after import
  • Maybe add encrypted export option?

Supported Formats

Priority:

  1. Generic CSV (Chrome/Firefox/Edge compatible)
  2. Bitwarden JSON
  3. 1Password CSV
  4. LastPass CSV

Labels

enhancement

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions