kptui-0.27.1 is not a library.
kptui 0.27.1
Highly secure TUI password manager for KeePass KDBX vaults
- Compatible with the PassKeeper/KeePass KDBX
.kdband.kdbxfile format. - It saves its database file to
KDBX4.1which can be used by KeePassXC and KeePass2. - Fits in with the wider PassKeeper/KeePass ecosystem.
- Very secure in its default configuration, impossible to brute-force (so unlocking takes a few seconds!).
- Writes to
KDBX4.1hardened with Argon2. - KDF-Memory:
262144 KiB - KDF-iterations:
90(!) - KDF-parallel:
4
- Writes to
- The Terminal User Interface is responsive and fully keyboard-driven.
- Stores:
Name,Username,Password,TOTP,URLandNotes(only what it needs).
Features
- KDBX4.1 vaults: Reads and writes standard
.kdbxfiles, so you can open the same vault in KeePassXC, KeePassDX, KeePass2 or any other compatible client. - Optional keyfile support: Can unlocks vaults protected by a master password plus a keyfile, but password-only vault is also supported.
- Filtered search: Start typing on the index screen to filter entries by Name or Username.
- TOTP codes: Generates live 2FA codes from a stored seed and saves
otpauth://URI.- Editable as:
SECRET [DIGITS [PERIOD]](PERIODdefaults to30, andDIGITSto6)
- Editable as:
- Auto-exit: The whole app can close itself automatically after a set period of inactivity
in seconds (
0: stays open indefinitely). - Themeable: Ships with a range of themes and supports custom themes.
- Access Configuration from the app: On the Login screen or the Index screen, give Control-C:
- Database (default:
~/.local/share/kptui/default.kdbx) - (Optional) keyfile
- Auto-exit setting (in seconds,
0: never auto-exit) - Theme selection (location:
~/.config/kptui/themes) - Change the master password
- Import from file
- Export to file
- Database (default:
- Import from other vaults or export: Import entries from another
.kdbxfile, or from a.csv/.jsonfile (as produced by other password managers). Export to CSV/JSON or KDBX.
Usage
kptui 0.27.1 - TUI password manager for KeePass vaults
Usage: kptui [slim | version | help]
Installing
Download static single-binary
wget https://github.com/pepa65/kptui/releases/download/0.27.1/kptui
sudo mv kptui /usr/local/bin
sudo chown root:root /usr/local/bin/kptui
sudo chmod +x /usr/local/bin/kptui
Install with cargo
Static musl build from cloned repo
# After git-cloning the repo
rustup target add x86_64-unknown-linux-musl
cargo build --release
Dynamic build with cargo
cargo install --git https://github.com/pepa65/kptui
Install with cargo-binstall
Even without a full Rust toolchain, rust binaries can be installed with the static binary cargo-binstall:
# Install cargo-binstall for Linux x86_64
# (Other versions are available at https://crates.io/crates/cargo-binstall)
wget github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz
tar xf cargo-binstall-x86_64-unknown-linux-musl.tgz
sudo chown root:root cargo-binstall
sudo mv cargo-binstall /usr/local/bin/
Only a linux-x86_64 (musl) binary available: cargo-binstall kptui
It will be installed in ~/.cargo/bin/ which will need to be added to PATH!
Getting started
- On first launch, if no vault is found at the default (configured) path,
kptuiwill:- Prompt to create a new database.
- Prompt to set a master password.
- But if a password is piped or directed in, this password will be used to create a new database with that password.
- If Control-C is given, then the configuration can be adjusted.
- Once unlocked, entries can be browsed, searched and opened from the Index screen.
- To open an existing vault, set
default_databasein the config file at~/.config/kptui/config.toml.- It can also be set on the Configuration screen that's accessible with Control-C.
- If a keyfile is required, that can also be set in the configuration.
# Example
= "~/passwords.kdbx"
= "~/passwords.keyx"
- The interface requires a terminal dimensions of at least 44 colums by 24 rows (but 24x12 is still functional).
- Run in smaller terminals with:
kptui slim(at least 27 columns by 10 rows required, but 19x11 is still functional). - To show the version:
kptui version - To show a short help:
kptui help - A password can also be provided non-interactively:
- Piped in, like:
echo "$password" |kptui - Directed in, like:
kptui <<<"$password" - Use a file with the password:
kptui <password_file
- Piped in, like:
Configuration
The configuration file is at a fixed location: ~/.config/kptui/config.toml.
See default_config.toml in this repo:
= "~/.local/share/kptui/default.kdbx"
= "~/.local/share/kptui/default.keyx" # Optional (omit for password-only vaults)
= 300 # Seconds of inactivity before exiting the app
= "melange_dark.toml" # Theme from ~/.local/share/kptui/themes
All fields are optional, as the above are the default values.
Security notes
- Saved vaults are standard KDBX4.1 files, encrypted with the master password (and, when configured, the keyfile).
- The keyfile is always in addition to the mandatory password, as an extra requirement.
- If the configured keyfile is missing, unreadable, empty, or incorrect, an explicit error is given.
- The keyfile's path is stored in the config, never its contents.
- Changing the master password re-encrypts the whole vault in place, and requires entering the current password first.
- If a keyfile was set, it remains part of the new composite key.
- The app exits after
auto_exitseconds of inactivity, clearing all decrypted entries and the master password from memory. All edits and changes will be lost (0: never auto-exit). - When the app is open and the vault not locked, secrets are kept in memory!
- When the app exits, there are no plaintext secrets left anywhere in memory.