Code Monkey home page Code Monkey logo

alfred-4-pass's Introduction

An Alfred 2/3 Workflow for Pass

Pacmax Page

Alfred forum page

This is an Alfred 2/3 workflow for Pass - the standard Unix password manager. It's based on passmenu, which is available for Linux.

Setup

To make this work you need:

  • Pass (obviously) -- needs to be set up with password store in ~/.password-store/.
  • gpg-agent -- install with brew
  • pinentry-mac -- also install with brew (this is GUI frontend for gpg-agent).
  • (optionally) the fuzzywuzzy and (also optionally) python-Levenshtein Python modules (install with pip install --user fuzzywuzzy python-Levenshtein)

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

If you prefer to keep the terminal version of pinentry you can use the pinentry.sh wrapper from this repository as the pinentry-program. This will use the ncurses version when in console and the GUI version for Alfred etc.

You can also take a look at this blog post from @bshiller.

GPG tweaking

You can tweak some of the gpg-agent settings in ~/.gnupg/gpg-agent.conf:

max-cache-ttl 7200

After 7200 seconds, GPG will forget your master password.

Installation

After your system is set up as described above, download the latest package from Pacmax. 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.

Usage

Basic Alfred commands:

pass <filter terms>

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.

pg <id>

Calls pass generate to add a new password with default length of 20 chars.

po <filter terms>

This will search through your OTP passwords (requires pass-otp) using the filter terms you provided.

Development

To generate the pass.alfredworkflow file (which you can import to Alfred), just use

make

alfred-4-pass's People

Contributors

amirilovic avatar cgenie avatar chipsenkbeil avatar d3n14l avatar lilyinstarlight avatar shtrom avatar sorbits avatar styts avatar tilblechschmidt avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.