Jump to content

LastPass Accelerator

Recommended Posts

GitHub: https://github.com/ajrosen/Alfred

Packal: http://www.packal.org/workflow/lastpass-accelerator


LastPass Accelerator

Interact with LastPass CLI.  LastPass Accelerator uses the LastPass CLI. The easiest way to install it is with brew:


brew install lastpass-cli


If you have not installed brew, first run this:


/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"





Number of seconds a password is stored in the clipboard before restoring the clipboard to its previous contents



Location of the LastPass CLI program



Your LastPass username




lpin [username]

Login to LastPass. The username is taken from the workflow variable {lpuser}, unless provided here.


After you enter your LastPass password you will be prompted for your MFA code. If you have previously logged in with the CLI's --trust option you can leave this blank.


If you have not enabled MFA for LastPass do it now. Until then, you can leave this blank.



Logout of LastPass.




Show LastPass status. Either "Logged in as..." or "Not logged in."




Copy an item's password, username (with Control), URL (with Shift), or notes (with Command) to the clipboard.

Screen Shot 2020-09-05 at 11.01.52 AM.png

Screen Shot 2020-09-05 at 10.57.10 AM.png

Edited by Andy Rosen
Add link to Packal
Link to post

I've published a new version, 1.0.1, that adheres to JSON syntax more strictly in the script filter.  If Alfred doesn't like the format the filter outputs then it looks like you got no results.  Apparently a trailing comma after the last item in a list does not cause Alfred 4.1.1 [1172] problems.  Maybe older versions do?


And thanks for checking it out!

Link to post
2 hours ago, Andy Rosen said:

The filter is in bash.


Please don't try to generate JSON by smushing strings together. It never works. As you noted, Alfred does accept invalid JSON (trailing commas aren't actually allowed), but it's only so lenient. Use a language that has proper JSON support.

Link to post
  • 1 month later...
17 hours ago, Andy Rosen said:

Yup!  I'm trying to find a fix for that too, but the LastPass CLI isn't making it easy 🙁


@Andy RosenThe best approach I can think of is if you offer a v2 that utilizes the lastpass-cli that integrates last pass dumping out as json. Check the GitHub for the PR which supports this. It would make your workflow so much more fluid.

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.

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...