pacmax beta

Alfred Pac by Angoll on GitHub

KPass

KeepassXC integration with Alfred

From their README

KPass

An Alfred KeePassXC Workflow

Screenshot

Features

  • List all entries from a KeePassXC database
  • Get the password for the selected entry, and put it in the clipboard
  • The password is copied to the transient clipboard.
  • Allow to cache the keys to a file. Default disabled
  • By holding ⌘ will copy the username (Thanks )

Setup

Prerequisites

  • Alfred 4 or 5
  • KeePassXC
  • A created KeePassXC database
  • homebrew installed( )
  • jq installed ( )

Configuration

Run kpassinit KPass Setup and follow the instructions:

  1. Select the KeePassXC database file
  2. [Optinally] If need it full path to the keychain file to use, leave it blank otherwise
  3. Select which keychain will be used to store the database password
  4. Enter the password for the KeePassXC database selected
  5. Done!

Enable the cache

In order to enable the cache, go to the Alfred workflow and into environment [x] set the env var cacheFile to a full file path where to store the cache. As an example /Users/my_user/Library/Caches/kpass.cache

Finally the env var cacheTimeout controlls the recreation of cache in seconds.

Known problems

Slowness to load database

Try reconfiguring the format and number of transform rounds of your database (KDF), increasing the format value and reduce the transformation rounds.

This Alfred workflow integrate with keepassxc using keepassxc cli, the script add a very low overhead and all time is spend in opening the database.

Having a high transformation rounds allows to slow down bruteforce attacks so pickup a number that is seems right for you.

More information:

Keepass file appears unselectable

Open the Alfred workflow from the Alfred App, double click the Run Script /usr/bin/osascript connected to the kpassinit. And remove the following line (on line 20)

    ofType: ["dyn.ah62d4rv4ge8003dcta"] //.kdbx extension type identifier

This will make any file selectable.

References

Any feedback is welcome!

Love it? Give it a ⭐️ or a tweet to help spread the word!

Latest release

  • 2.64 years agoDownload

    Release notes:

    Given the solution proposed in #28 , by holding ⌘ the username will be copied to the clipboard.

    Fixes:

    #22 removed -q option when not using key file

6 earlier releases
  • 2.54 years agoDownload

    Release notes:

    This release fix the deprecation of locate https://github.com/keepassxreboot/keepassxc/pull/6805

    Fixes:

    #27 use search -

  • 2.44 years ago, 558 KBDownload

    Release notes:

    This release fix the v2.2 issues listing the databases

    Fixes:

    Added to path homebrew bin path and a few more Added the option to enable the use of a cache file for the keys Removed the first / of the name, this allow alfred to improve in the seach

  • 2.35 years ago, 558 KBDownload

    Release notes:

    This release fix the v2.2 issues listing the databases

    Fixes:

    Issue with the new locate command fixes #19 Setup not escaping the password correctly #12

  • 2.25 years ago, 558 KBDownload

    Release notes:

    • Added @atttx123 changes KPass enhancement #17

    Fixes:

    • Added keepassxc-cli binary path to the path environment
    • Failed to load key file #12

    Improvements:

    • Use of keepassxc-cli locate to query the database data, speed up the search
    • Use awk to build the json items for alfred are build
    • Documented ways to improve opening times of the database

    Thanks to @atttx123 for all the work and research

  • 2.16 years ago, 558 KBDownload

    Release notes:

    • Added support to enter a key file during the configuration process.

    • Use jq for generating the list of passwords

    • Improved error logs, if an error occurs it will be copied to the clipboard to easy debuging

    • Fixed key names with spaces, now are treaded correctly

    • fix entry with spaces

  • 1.06 years ago, 557 KBDownload

    First release

    • Easy initial configuration following instructions
    • Allows to list the entries from the KeePassXC database
    • Retrieves the password of an entry from the KeePassXC database and copy it to the transient clipboard

    Note:

    • Due to some issues issue-1 I upload the file KPass.without_extensionfilter.alfredworkflow is the same code but when selecting the KeePassXC database you will be able to select any file, it up to the user to select a database.