Original credit goes to CGenie and vshl. This fork only has modifications to my liking, including:
-
Transient copy of password, so that clipboard managers do not store the passwords (vshl).
-
Notification after the password is copied (vshl).
-
Commands
pass
,user
andlink
to retrieve either the password, username or link of the entry. My password manager entries have the following format:
Password
Username
URL
Grouping / Name
This is Alfred 2 integration with Pass - the standard Unix password manager. I took the idea for this from passmenu which is available for Linux.
To make this work you need:
- pass (obviously) -- needs to be set up with password store in
~/.password-store/
. gpg-agent
-- install withbrew
pinentry-mac
-- also install withbrew
(this is GUI frontend forgpg-agent
).
Next configure gpg-agent
to use pinentry-mac
and not the bundled one, editing ~/.gnupg/gpg-agent.conf
:
pinentry-program /usr/local/bin/pinentry-mac
After your system is set up as described above, download the latest package from
Packal. Locate the file in Finder, right-click
on it and choose 'Open With -> Alfred'. You will be prompted to install the workflow, so go ahead.
Next fire up the Alfred console (Alt-Space
by default) and type one of the commands described below.
Basic Alfred commands:
This will search through your passwords using the filter terms you provided.
The password will be copied to clipboard and cleared after 45 seconds (this is the default
pass -c
behavior). You can change that time by modifying the env variable
PASSWORD_STORE_CLIP_TIME
. Or in the pass-show.sh
file you can change this line
pass show -c $QUERY
into this one
pass show $QUERY | awk 'BEGIN{ORS=""} {print; exit}' | pbcopy
to aviod auto-clearing of clipboard.
Calls pass generate
to add a new password with default length of 20 chars.
To generate the pass.alfredworkflow
file (which you can import to Alfred), just use
make