https://github.com/daxartio/kdbx
A secure hole for your passwords (Keepass CLI)
https://github.com/daxartio/kdbx
cli command-line command-line-tool kdbx keepass otpauth rust totp
Last synced: 6 months ago
JSON representation
A secure hole for your passwords (Keepass CLI)
- Host: GitHub
- URL: https://github.com/daxartio/kdbx
- Owner: daxartio
- License: mit
- Created: 2023-09-22T20:30:53.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2025-03-24T21:39:32.000Z (7 months ago)
- Last Synced: 2025-03-28T20:11:13.283Z (7 months ago)
- Topics: cli, command-line, command-line-tool, kdbx, keepass, otpauth, rust, totp
- Language: Rust
- Homepage: https://crates.io/crates/kdbx
- Size: 507 KB
- Stars: 13
- Watchers: 0
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Keepass CLI
[](https://crates.io/crates/kdbx)
A secure hole for your passwords (Keepass CLI)
## Features
- MacOS, Linux
- master password is stored in OS's keyring## Install
### Manual
[Download](https://github.com/daxartio/kdbx/releases)
### Cargo
```
cargo install kdbx
```[cargo-binstall](https://github.com/cargo-bins/cargo-binstall)
```
cargo binstall kdbx
```### Script
```
curl -fsSL https://raw.githubusercontent.com/daxartio/kdbx/master/install.sh | sh -s
```### Homebrew
```
brew install daxartio/tap/kdbx
```**Please take a backup of your database before updating the application.**
## Usage
### Examples
Display selector and then print entry's info:
```
kdbx show
```Copy password/totp if only single entry found otherwise display selector:
```
kdbx pwd /root/emails/gmail
kdbx totp /root/emails/gmail
```Print password/totp to STDOUT:
```
kdbx pwd github.com | cat
kdbx totp github.com | cat
```Read password from STDIN:
```
cat /mnt/usb/key | kdbx pwd
```Generate shell completions:
```
kdbx completion --shell=zsh > /usr/local/share/zsh/site-functions/_kdbx
``````
kdbx completion --shell=fish > ~/.config/fish/completions/kdbx.fish
```### commands
```
A secure hole for your passwords (Keepass CLI)Usage: kdbx
Commands:
pwd Copy password and clear clipboard after specified amount of time
totp Copy totp
show Display entry's info
add Add new entry
init Init new database
list List all entries
completion Outputs the completion file for given shell
help Print this message or the help of the given subcommand(s)Options:
-h, --help Print help
-V, --version Print version
```### pwd
```
Copy password and clear clipboard after specified amount of timeUsage: kdbx pwd [OPTIONS] --database [ENTRY]
Arguments:
[ENTRY]Options:
-t, --timeout Timeout in seconds before clearing the clipboard. 0 means no clean-up [default: 15]
-G, --no-group Show entries without group(s)
-n, --no-interaction Do not ask any interactive question
-v, --preview Preview entry during picking
-f, --full-screen Use all available screen for picker
-p, --use-keyring Store password for the database in the OS's keyring
-P, --remove-key Remove database's password from OS's keyring and exit
-d, --database KDBX file path [env: KDBX_DATABASE=]
-k, --key-file Path to the key file unlocking the database [env: KDBX_KEY_FILE=]
-h, --help Print help
```### totp
```
Copy totpUsage: kdbx totp [OPTIONS] --database [ENTRY]
Arguments:
[ENTRY]Options:
-G, --no-group Show entries without group(s)
-n, --no-interaction Do not ask any interactive question
-v, --preview Preview entry during picking
--raw Show the secret instead of code
-f, --full-screen Use all available screen for picker
-p, --use-keyring Store password for the database in the OS's keyring
-P, --remove-key Remove database's password from OS's keyring and exit
-d, --database KDBX file path [env: KDBX_DATABASE=]
-k, --key-file Path to the key file unlocking the database [env: KDBX_KEY_FILE=]
-h, --help Print help
```### show
```
Display entry's infoUsage: kdbx show [OPTIONS] --database [ENTRY]
Arguments:
[ENTRY]Options:
-G, --no-group Show entries without group(s)
-n, --no-interaction Do not ask any interactive question
-v, --preview Preview entry during picking
-f, --full-screen Use all available screen for picker
-p, --use-keyring Store password for the database in the OS's keyring
-P, --remove-key Remove database's password from OS's keyring and exit
-d, --database KDBX file path [env: KDBX_DATABASE=]
-k, --key-file Path to the key file unlocking the database [env: KDBX_KEY_FILE=]
-h, --help Print help
```### add
```
Add new entryUsage: kdbx add [OPTIONS] --database
Options:
-p, --use-keyring Store password for the database in the OS's keyring
-P, --remove-key Remove database's password from OS's keyring and exit
-d, --database KDBX file path [env: KDBX_DATABASE=]
-k, --key-file Path to the key file unlocking the database [env: KDBX_KEY_FILE=]
-h, --help Print help
```### init
```
Init new databaseUsage: kdbx init [OPTIONS] --database
Options:
-d, --database KDBX file path [env: KDBX_DATABASE=]
-k, --key-file Path to the key file unlocking the database [env: KDBX_KEY_FILE=]
-h, --help Print help
```### list
```
List all entriesUsage: kdbx list [OPTIONS] --database
Options:
-G, --no-group Show entries without group(s)
-p, --use-keyring Store password for the database in the OS's keyring
-P, --remove-key Remove database's password from OS's keyring and exit
-d, --database KDBX file path [env: KDBX_DATABASE=]
-k, --key-file Path to the key file unlocking the database [env: KDBX_KEY_FILE=]
-h, --help Print help
```### completion
```
Outputs the completion file for given shellUsage: kdbx completion --shell
Options:
-s, --shell [possible values: bash, elvish, fish, powershell, zsh]
-h, --help Print help
```## Configuration
kdbx can be configured using environment variables.
| name | type | default | options |
|----------------|--------|---------|---------------------|
| KDBX_LOG | string | 'error' | ... |
| KDBX_LOG_STYLE | string | 'auto' | auto, always, never |## License
MIT