passhole

EvidloGPL-3.0活跃维护

在终端里管理 KeePass 密码库的命令行工具,把密码安全地藏在命令行里,适合习惯用 Unix 工具链、不想开图形界面的用户。

A secure hole for your passwords (KeePass CLI)

v1.10.1发布于 2025-11-09 21:43 UTC230star22fork同步于 2026-11-07 07:33 UTC

怎么上手

由 README 提炼,执行前请确认
pip install passhole
ph init
硬件要求按 README 说明

README 未说明

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

KeePass 命令行密码管理器,用快捷键把账号密码直接填进任意应用

在终端里管理 KeePass 密码库的命令行工具,把密码安全地藏在命令行里,适合习惯用 Unix 工具链、不想开图形界面的用户。

核心能力

  • 用键盘快捷键向任意应用填入用户名和密码
  • 支持增删改移条目与分组,并可重命名
  • 生成字母数字、符号或 correct horse 风格密码
  • 默认缓存数据库密码 10 分钟,支持多数据库
  • 兼容 KeePass v3/v4 数据库并支持 TOTP

容易踩的坑

图形密码提示需额外安装 zenity,否则只能用命令行输入;数据库需先用 ph init 初始化后才能使用;部分系统需先装编译依赖(如 Alpine 的 gcc、libffi-dev、py3-lxml 等)

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

1 个版本v1.10.1
  1. v1.10.1最新正式版2025-11-09 · 2025-11-09 21:43 UTC
    • add eval command
    • better totp handling

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    Passhole

    .. image:: https://img.shields.io/matrix/pykeepass:matrix.org.svg :target: https://matrix.to/#/#pykeepass:matrix.org

    passhole is a commandline password manager for KeePass inspired by pass_.

    .. _pass: https://www.passwordstore.org

    .. image:: https://i.imgur.com/lWLgbo3.gif

    • Manual_
    • Features_
    • Setup_
    • Example Usage_
    • Example i3wm Keybindings_
    • Testing and Development_

    Features

    • fill user/pass field in any application via keyboard shortcut
    • add, delete, move, edit, rename entries and groups
    • generate alphanumeric, symbolic, or correct horse battery staple_ style passwords
    • temporarily cache database password (by default for 10 minutes)
    • multiple databases
    • supports KeePass v3 and v4 databases
    • supports TOTP

    .. _correct horse battery staple: http://xkcd.com/936

    See below for examples and the manual_ (or man passhole) for a complete list of commands and options.

    .. _manual: https://github.com/evidlo/passhole/tree/master/MANUAL.rst

    Setup

    .. code:: bash

    pip install passhole ph init

    optionally install zenity for graphical password prompt

    sudo apt install zenity

    Example Usage

    .. code:: bash

    add a new entry with manually created password

    $ ph add github Username: Evidlo Password: Confirm: URL: github.com

    add an entry with a generated alphanumeric password

    $ ph add neopets -a Username: Evidlo URL: neopets.com

    add a new group

    $ ph add social/

    add an entry to social/ with a 32 character password (alphanumeric + symbols)

    $ ph add social/facebook -s 32 Username: [email protected] URL: facebook.com

    add an entry to social/ with a correct-horse-battery-staple type password

    $ ph add social/twitter -w Username: [email protected] URL: twitter.com

    list all entries

    $ ph list github neopets [social] ├── facebook └── twitter

    display contents of entry

    $ ph show social/twitter Title: twitter Username: Evidlo Password: inns.ambien.travelling.throw.force URL: twitter.com

    retrieve contents of specific field for use in scripts

    $ ph show social/twitter --field password inns.ambien.travelling.throw.force

    Example i3wm Keybindings

    .. code:: bash

    select entry using dmenu, then send password to keyboard

    bindsym $mod+p exec "ph type --prog dmenu"

    select entry using dmenu, then send username + password to keyboard

    bindsym $mod+Shift+p exec "ph type --tabbed --prog dmenu"

    Testing and Development

    Running tests

    .. code:: bash

    from repo root dir:

    python test/tests.py

    Isolated install in Docker

    .. code:: bash

    debian

    make docker_debian

    Building manpage and packaging

    .. code:: bash

    make man make dist

    See also

    • keepmenu_
    • kpcli_
    • keepassxc_
    • kdbxpasswordpwned_

    .. _keepmenu: https://github.com/firecat53/keepmenu/ .. _kpcli: http://kpcli.sourceforge.net/ .. _keepassxc: https://keepassxc.org/ .. _kdbxpasswordpwned: https://github.com/fopina/kdbxpasswordpwned

    Build Dependencies

    Alpine

    apk add gcc libffi-dev py3-lxml py3-pip python3-dev libc-dev