This provides an Emacs major mode to open KeePass DB files, navigate through them, show their entries, and copy the passwords to the clipboard.
I’ve been using it for some months without major issues, but the code needs better testing and structure.
This Emacs mode requires you to have keepassxc-cli
2.6.x or
newer, in your $PATH
. You can get this program installed by
visiting KeePassXC web page.
If you use MELPA you’ll find it there. Alternatively, you can just
clone this repository into your $HOME/.emacs.d/elpa
as
keepass-20200101-001
.
To enable it in your setup, you must add the following line to your Emacs configuration:
(require 'keepass-mode)
Open a file using standard C-x C-f
, and you’ll be asked for the
KeePass DB’s master password. On a successful password, it will show
you the root group for your KeePass DB.
You can use arrows to move up and down the entry list. When clicking
RET
, you’ll open the entry. If it was a group, you’ll get the entry
list refreshed with the entry’s entry list. If it was a key entry,
then you’ll get a new buffer open with its details.
To go back from a group, you must use <backspace>
. To close an entry
detail view, you can use standard buffer kill, i.e. C-x C-k
.
When having your point on a key entry, you can copy fields to kill-ring using:
- `u`: URL
- `b`: user name
- `c`: password
You’ll need to get Cask setup in your development machine. Once you
cloned this repository, you’ll need to run cask
in your working
copy.
To run tests on your code, you can use cask exec buttercup -L .
,
from a terminal in the repository root.