Skip to main content

CLI KeePass client with dmenu support

Project description

passhole is a CLI interface for KeePass 1.x (v3) and 2.x (v4) databases with support for dmenu inspired by pass.

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

Features

  • add, delete, move, rename entries and groups

  • generate correct horse battery staple style passwords

  • generate alphanumeric passwords

  • temporarily cache database password for 10 minutes

  • autofill selected forms via keyboard shortcut (using the type command)

See below for examples and the manual for a complete list of commands and options.

Setup

pip install passhole
ph init

libgpgme-dev must also be installed.

Example Usage

# 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: evan@evanw.org
URL: facebook.com

# add an entry to `social/` with a correct-horse-battery-staple type password
>>> ph add social/twitter -w
Username: evan@evanw.org
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 i3 Keybindings

# select entry using dmenu, then send password to keyboard
bindsym $mod+p exec "ph type dmenu"
# select entry using dmenu, then send username + password to keyboard
bindsym $mod+Shift+p exec "ph type dmenu --tabbed"

Troubleshooting GPG Keys

passhole uses gpg2 to store your database password encrypted on disk to take advantage of the password caching features of gpg-agent. By default passhole will use the first GPG key on your keyring, but this can be overridden. This key must have trust level 5 (ultimate) and should be created using gpg2. If you created your key with gpg, you can export your keys to gpg2 as shown below.

gpg --export | gpg2 --import
gpg --export-secret-keys | gpg2 --import

See also

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

passhole-1.7.3.tar.gz (36.8 kB view details)

Uploaded Source

File details

Details for the file passhole-1.7.3.tar.gz.

File metadata

  • Download URL: passhole-1.7.3.tar.gz
  • Upload date:
  • Size: 36.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5

File hashes

Hashes for passhole-1.7.3.tar.gz
Algorithm Hash digest
SHA256 e1bf000aabf8394f57f7a48bd1bcb12eccb21b9b8945b58a22534bc02ae41e88
MD5 841dc098893fff498eefb99281c99b24
BLAKE2b-256 f508a6e33f64895755d5a607044a906b7cdfcab6a59ab05b0265a8b9397227dc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page