Terminal TUI for browsing KeePass databases and managing SSH keys
Project description
kpassh
A terminal TUI for browsing KeePass (KDBX) databases and managing SSH keys via the SSH agent.
Features
- Browse password entries by group with instant search
- Copy username, password, host, or URL to clipboard
- Detect and list SSH private keys (RSA, Ed25519, ECDSA) attached to KDBX entries
- Add/remove SSH keys to/from the running SSH agent — no passphrase prompt if stored in the entry's password field
- Reads the SSH key comment from the key file itself, preserving the original comment in the agent
- Internationalization: automatically uses English or Korean based on the OS locale (
LANGUAGE/LANG)
Installation
uv tool install .
Requirements
- Python >= 3.9
- Dependencies:
pykeepass,textual,cryptography,bcrypt,appdirs - Clipboard: one of
wl-copy(Wayland),xclip, orxsel(X11)
Setup
Before the first run, place your KDBX database in the app data directory:
kpassh-db path # show the expected database path
kpassh-db push # copy database.kdbx from the current directory
kpassh-db push -i my.kdbx # specify a custom filename
Usage
TUI viewer
kpassh # use the default database
kpassh /path/to/database.kdbx # specify a file
Enter the master password when prompted, then navigate the TUI.
Key bindings
General
| Key | Action |
|---|---|
1 |
Switch to Passwords tab |
2 |
Switch to SSH Keys tab |
q |
Quit |
Passwords tab
| Key | Action |
|---|---|
Tab / Shift+Tab |
Switch focus between Groups and Entries panels |
/ |
Open search (group name, title, username, URL) |
Esc |
Clear search / go back |
u |
Copy username to clipboard |
p |
Copy password to clipboard |
h |
Copy host to clipboard (from Host: line in Notes, or URL) |
l |
Copy URL to clipboard |
SSH Keys tab
| Key | Action |
|---|---|
a |
Add selected key to SSH agent |
d |
Remove selected key from SSH agent |
The passphrase is automatically read from the entry's Password field when adding a key. A manual prompt appears only if the entry has no password or the password is incorrect.
Database file management
The database is stored in the OS-specific user data directory.
| OS | Path |
|---|---|
| Linux | ~/.local/share/kpassh/database.kdbx |
| macOS | ~/Library/Application Support/kpassh/database.kdbx |
| Windows | C:\Users\<user>\AppData\Local\kpassh\database.kdbx |
kpassh-db path # print the database path
kpassh-db pull # copy from app data dir to current directory
kpassh-db pull -o backup.kdbx # specify output filename
kpassh-db push # copy from current directory to app data dir
kpassh-db push -i edited.kdbx # specify input filename
kpassh-db pull/push -f # overwrite if destination already exists
Project structure
kpassh/
__init__.py
main.py # TUI viewer (Textual)
ssh_agent.py # SSH agent socket protocol, key parsing and fingerprinting
db.py # Database file management CLI
i18n.py # Internationalization (gettext, auto-detects OS locale)
locale/
ko/LC_MESSAGES/
kpassh.po # Korean translations source
kpassh.mo # compiled catalog
database.kdbx # bundled default database
License
BSD 3-Clause License. See LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kpassh-0.2.0.tar.gz.
File metadata
- Download URL: kpassh-0.2.0.tar.gz
- Upload date:
- Size: 19.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ea8d95983d6688d0b56345dc2a2245d397e5b179c1e27fa007b5eaf71b5563d
|
|
| MD5 |
448fb60c246a491cd89ad2f49bf1dc8f
|
|
| BLAKE2b-256 |
d51c5976a20e071629c5943f9a24d09247a54b1006adb507e66494d4a7a70074
|
File details
Details for the file kpassh-0.2.0-py3-none-any.whl.
File metadata
- Download URL: kpassh-0.2.0-py3-none-any.whl
- Upload date:
- Size: 18.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d73a218ae072e4d879a8c8aed5398651d64eeb3fed1d7b9fd5c7502be18a288
|
|
| MD5 |
fb473805143e7c563372767ab0270349
|
|
| BLAKE2b-256 |
42c1e71968e16a0c5c49e4c4be4beebb9906036e790bbe2b3b5e2d454449e901
|