Skip to content

KeePassCore.CLI roadmap

src/KeePassCore.CLI, net10.0, terminal UI (Terminal.Gui 2.5). User doc and keys: src/KeePassCore.CLI/README.md.

Goal and rules

  • A cross-platform demo of the lib: it shows that the lib creates, reads and writes databases that other KeePass applications open.
  • DatabaseService holds all lib calls (UI-independent); the UI runs key derivation in the background and marshals back with IApplication.Invoke.
  • Never breaking KDBX 4 files also means never overwriting changes made by another application (see item 10).

Done

  • Create / open a database: password and/or key file (a missing key file is created). New databases: AES-256 + Argon2d (the lib default), root group only.
  • Browse: group tree (left), entries of the selected group (right), Tab switches panels.
  • Groups: create (F9), edit name and notes (F10 / Enter). Multi-line notes shown read-only and kept.
  • Entries: create (F9), edit title, user name, password, URL, notes (F10 / Enter).
  • The current password is never loaded into the dialog; an empty password keeps it.
  • Edits keep the previous version in the history (CreateBackup + Touch); custom fields, attachments and history are kept.
  • Saving: changes stay in memory until F5; quitting or switching database with unsaved changes asks Cancel / Discard / Save. Saves are transacted (temporary file, then an atomic replace, see the lib roadmap) and keep the Unix permissions.
  • Weak key derivation: a warning in the log after opening a database whose KDF is reported weak by the lib (AES-KDF, or Argon2 below the defaults). Switching it waits for the database settings (To do).
  • NativeLib.AllowNative = false workaround dropped (it avoided a Mono assert in the lib, removed).
  • Checks: created files open in pykeepass (an independent KDBX 4 reader); password, key file, wrong key and input validation tested in a pseudo-terminal.

Known limitations

  • Notes are edited on one line (TextView is obsolete in Terminal.Gui 2.5).
  • Tree labels must not contain emoji (non-BMP characters): Terminal.Gui's TreeView throws.
  • Entry UUID, tags, expiry date and attachment names are not shown yet.

To do

"Lib" means KeePassCoreLib already provides the logic; the CLI only needs the UI.

Suggested order: 1, 2, 3, 10, 5, 4, 6, 8, then the rest.

Core

  1. Delete group / entry. To decide: move to the Recycle Bin (KeePass default; lib: RecycleBinEnabled, RecycleBinUuid), delete permanently, or both (Delete = bin, Shift+Delete = permanent). Deletions must be recorded in DeletedObjects, otherwise a later sync with another copy brings them back.
  2. Copy password, user name or URL to the clipboard, cleared after 10 s. Clear only if the clipboard still holds the copied value. On Linux the Terminal.Gui clipboard needs xclip, xsel or wl-copy; over SSH only OSC 52 works. Show a message when no clipboard is available.
  3. Password reveal (the former F4 toggle was removed).
  4. Password generator when creating or editing an entry (lib: PwGenerator, PwProfile; QualityEstimation for the strength).
  5. Search across the whole database: title, user name, URL, notes, tags (lib: SearchParameters, PwGroup.SearchEntries).
  6. Entry details view: custom fields, tags, expiry, attachments, history.
  7. Move an entry or group to another group (target picked in a tree dialog).

Security

  1. Lock the database, manually and after X minutes idle: close it, keep the path, ask for the key again.
  2. Change the master key (password and/or key file).
  3. Detect external changes before saving. If KeePassXC or a sync tool changed the file since it was opened, saving silently overwrites those changes. The lib keeps HashOfFileOnDisk for this check; then offer merge or overwrite. Matters early (never lose data).
  4. Expired entries: mark them in the list, filter them.

Data

  1. Edit custom fields, tags, expiry date, icon.
  2. Attachments: list, export to a file, add from a file.
  3. History: show the versions, restore one.
  4. Database settings: name, description, cipher, KDF and its parameters, Recycle Bin, history limits. Also the place for the migration of old KeePass 2.x files whose Argon2 memory is below the RFC 9106 minimum (8 KiB × parallelism): they open, but cannot be saved as is (see the lib roadmap).
  5. TOTP codes for entries holding an OTP secret (lib: HmacOtp).
  6. Merge / sync with another copy of the file (lib: PwDatabase.MergeIn).
  7. Import / export: KeePass XML is in the lib; CSV and other formats are in the WinForms app (see its roadmap: move UI-free formats).

Comfort

  1. Sort entries by column, duplicate an entry, remember the last opened file.
  2. Non-interactive commands for scripts (list, get, copy), like keepassxc-cli; only if the CLI becomes more than a demo.

Not possible in a terminal: Auto-Type, browser integration.

Maintenance

  • Test on Windows and macOS terminals (only tested on Linux).
  • Dockerfile (Alpine, build stage + runtime stage).