15 个版本 (9 个破坏性更新)
0.9.0 | 2024 年 3 月 8 日 |
---|---|
0.7.0 | 2023 年 12 月 3 日 |
0.6.0 | 2023 年 11 月 18 日 |
#184 在 命令行工具
每月下载 33 次
52KB
1.5K SLoC
Keepass CLI
您密码的安全港湾(Keepass CLI)
功能
- MacOS, Linux
- 主密码存储在操作系统的密钥链中
安装
手册
Cargo
cargo install kdbx
脚本
curl -fsSL https://raw.githubusercontent.com/daxartio/kdbx/master/install.sh | sh -s
Homebrew
brew install daxartio/tap/kdbx
在更新应用程序之前,请备份您的数据库。
用法
示例
显示选择器然后打印条目信息
kdbx show
如果找到单个条目则复制密码/totp,否则显示选择器
kdbx pwd /root/emails/gmail
kdbx totp /root/emails/gmail
将密码/totp打印到标准输出
kdbx pwd github.com | cat
kdbx totp github.com | cat
从标准输入读取密码
cat /mnt/usb/key | kdbx pwd
生成 shell 完整性
kdbx completion --shell=zsh > /usr/local/share/zsh/site-functions/_kdbx
kdbx completion --shell=fish > ~/.config/fish/completions/kdbx.fish
命令
A secure hole for your passwords (Keepass CLI)
Usage: kdbx <COMMAND>
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 time
Usage: kdbx pwd [OPTIONS] --database <DATABASE> [ENTRY]
Arguments:
[ENTRY]
Options:
-t, --timeout <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 <DATABASE> KDBX file path [env: KDBX_DATABASE=]
-k, --key-file <KEY_FILE> Path to the key file unlocking the database [env: KDBX_KEY_FILE=]
-h, --help Print help
totp
Copy totp
Usage: kdbx totp [OPTIONS] --database <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 <DATABASE> KDBX file path [env: KDBX_DATABASE=]
-k, --key-file <KEY_FILE> Path to the key file unlocking the database [env: KDBX_KEY_FILE=]
-h, --help Print help
显示
Display entry's info
Usage: kdbx show [OPTIONS] --database <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 <DATABASE> KDBX file path [env: KDBX_DATABASE=]
-k, --key-file <KEY_FILE> Path to the key file unlocking the database [env: KDBX_KEY_FILE=]
-h, --help Print help
添加
Add new entry
Usage: kdbx add [OPTIONS] --database <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 <DATABASE> KDBX file path [env: KDBX_DATABASE=]
-k, --key-file <KEY_FILE> Path to the key file unlocking the database [env: KDBX_KEY_FILE=]
-h, --help Print help
初始化
Init new database
Usage: kdbx init [OPTIONS] --database <DATABASE>
Options:
-d, --database <DATABASE> KDBX file path [env: KDBX_DATABASE=]
-k, --key-file <KEY_FILE> Path to the key file unlocking the database [env: KDBX_KEY_FILE=]
-h, --help Print help
列表
List all entries
Usage: kdbx list [OPTIONS] --database <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 <DATABASE> KDBX file path [env: KDBX_DATABASE=]
-k, --key-file <KEY_FILE> Path to the key file unlocking the database [env: KDBX_KEY_FILE=]
-h, --help Print help
完整性
Outputs the completion file for given shell
Usage: kdbx completion --shell <SHELL>
Options:
-s, --shell <SHELL> [possible values: bash, elvish, fish, powershell, zsh]
-h, --help Print help
配置
kdbx 可以使用环境变量进行配置。
名称 | 类型 | 默认值 | 选项 |
---|---|---|---|
KDBX_LOG | 字符串 | '错误' | ... |
KDBX_LOG_STYLE | 字符串 | '自动' | 自动、始终、从不 |
许可证
MIT
依赖关系
~18–33MB
~563K SLoC