Jump to content
ke7fze

Pass - wrapper for the pass Password manager

Recommended Posts

The pass password manager (http://www.passwordstore.org) is a password manager that aims to use primarily existing unix tools such as GPG and git to store and sync passwords. What attracted me to pass is that I want my passwords to sync between my phone and my computer, and I want that syncing to be free (I have used LastPass for a while, but have just been opening the mobile website whenever I needed a password—not a great solution). Pass offers that, with a standard format usable by an Android app and an iOS app.

 

Pass has a quite good user interface for a command-line tool, including a helpful bash autocomplete. However, I spend most of my time away from the command-line, and was looking for a way that I could use it without having to open up a terminal. Enter Alfred. This is my first workflow, and it has a few rough edges, but it provides just about everything I need.

 

Pass for Alfred provides a few simple pieces of functionality. It operates on the keyword pass as a script filter, and has several possible responses. First, if the argument is "edit", it provides autocomplete functionality to select which password in the store to edit. Second, if the argument is recognized as another different keyword, it is passed through to pass. Third, if the argument does not match one of the pass commands, it will be treated as a fuzzy search for the name of the password in the archive. If actioned, it will open a terminal, which will ask the user to enter their passphrase for the GPG key used in encrypting. If successful, it will copy the password to the clipboard. If no matches are found and the user enters another word, the workflow assumes the user is entering a command to pass, and it will be used when pass is called on the terminal.

 

Requirements (for it to be useful):

  • pass  — easiest installed with brew install pass (brew.sh)
  • GPG  — while GPG will be installed by brew, there's a very nice graphical interface to GPG that you can get at (https://gpgtools.org)
  • A setup and working pass environment (see man pass).
  • For syncing, a working git remote environment.

 

Places that need improvement:

  • Commands such as cp and mv that use existing passwords should autocomplete those
  • Copying to the clipboard is somewhat dangerous. Even though pass does automatically clear it after 45 seconds, clipboard history applications (such as Alfred) can hang on to it longer.
  • Some refactoring in the code
  • Currently only handles passwords stores found in their default location (~/.password-store)
  • It'd be nice to automatically sync the git repository any time changes are made.

It does everything I need it to, so I probably won't be touching it for a while unless it breaks. However, if you make some changes that make it work better for you, I'll be more than happy to accept pull requests!

 

Github: https://github.com/MatthewWest/pass-alfred

Direct link: Raw

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...