implement a kdbx importer #70
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
build a importer for kdbx files that reflects how pass does the imports and generates the structure.
The importer should properly recognize already existing objects and only update changed objects and new objects. it never will delete, it will only add to the vault.
it should have a quick add mode to only add new entries it finds.
it should be hooked up into all apps (cli, gui, tui - not iphone).
this should also look at the actual format in kdbx and we want more than pass is providing in structure, so kdbx formats are properly supported especially for multi-line fields, so they don't break appart. so it should write continuation lines with a leading space to stabilize them against misinterpretation.
Implemented and pushed in
bf75465.The storage crate now owns a pure-Rust KDBX 3/4 importer with password and optional key-file support. It maps nested groups, passwords/login/URL/notes, validated OTP data, custom fields, tags, autotype metadata, attachments, and history into pass-compatible encrypted entries. Named multiline values use leading-space continuation lines. Full mode adds new and updates changed entries; quick-add skips every existing target; neither mode deletes unrelated vault content. Each changed entry uses the embedded automatic Git committer.
The shared command contract exposes import-kdbx with --key-file and --quick-add. CLI uses hidden password input, the TUI supplies a masked keyboard form and K hotkey, and the desktop app supplies a native database/key picker, secure password field, explicit confirmation, Tools menu/palette action, authentication, and tree refresh. All frontends call the same storage importer.
Review and verification:
The focused KDBX compatibility regression proves add/update/unchanged/quick-add behavior, password plus key-file authentication, stable multiline parsing, OTP/custom/autotype/attachment mapping, per-entry encryption, and byte-exact preservation of an unrelated existing entry.