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)"

 

Variables

 

ClipboardTimeout

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

 

lppath

Location of the LastPass CLI program

 

lpuser

Your LastPass username

 

Commands

 

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.

 

lpout

Logout of LastPass.

 

 

lpstat

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

 

 

lpass

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 comment

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 comment
  • 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 comment
On 10/28/2020 at 8:55 PM, Andy Rosen said:

I'd love to see a JSON option for ls and export.  Unfortunately I don't see that happening any time soon.  The last merge was over a year ago.

 

But Version 1.1.0 properly escapes backslashes and double-quotes.  I'm storing sanitized fields in separate files, then merging and formatting them with awk.

Yeah, I just pulled and merge locally so I can have that support. Thanks. I’ll test tomorrow. 

Link to comment
  • 2 weeks later...
On 9/15/2020 at 5:05 PM, Andy Rosen said:

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!

 

Thanks mate, now everything looks amazing!

 

Best regards,

Vitor Jr.

Link to comment
  • 2 weeks later...

Version 1.3.0 is now available!

 

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

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

 

What's New?

  • A new command lpconfigure lets you view and change the workflow's variables.

188403563_ScreenShot2020-12-01at9_29_44AM.thumb.png.3fd291e3a4b6eefd337c9c648f92c1d4.png

 

210535838_ScreenShot2020-12-01at9_30_01AM.png.91b5c86365673f0ed4fe66d01fd71b63.png

 

  • If you login as a different user with lpin that user will be saved as the default.

770751174_ScreenShot2020-12-01at9_31_00AM.thumb.png.436781bd5a6c74358b2d66c6fb355595.png

 

  • A new command lpgen generates random passwords.
  • Changed the icon so the LastPass desktop app stands out.

494993258_ScreenShot2020-12-01at9_33_50AM.thumb.png.ebb0e4672fdb61ba7f675a9d30a07489.png

Link to comment
  • 3 weeks later...

Version 2.0

 

What's new?

  • A new command lpmanage provides access to account-wide commands
    • Change your password
    • Import items from a file into your vault
    • Export items in your vault to a file

1196222410_ScreenShot2020-12-17at2_38_24PM.thumb.png.29338e18045639138aff0d05dff1d564.png

 

  • Use the Option key to per form additional actions on a selected item
    • Share is not yet implemented

more.thumb.png.0fb1c98a8232aa21fcd1419459166ed6.png

 

634512247_ScreenShot2020-12-17at2_38_09PM.thumb.png.6d3d206f9bf0dd0e025e603c162bb332.png

 

  • Logging in (lpin) checks for the trusted_id file and skips prompting for MFA if it exists
Link to comment
  • 2 weeks later...
  • 3 weeks later...

Version 2.2

 

What's new?

 

  • Improved results filtering
    • Items match anywhere in the text, not just from the start, and regardless of word boundaries
    • Items are filtered on an item's path (the title in Alfred's results), user and URL fields

Eg., this matched the URL field https://www.alfredforum.com/

 

503422349_ScreenShot2021-01-19at8_16_46PM.thumb.png.61a521ee2915f97908429602b3fce8ed.png

 

 

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

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

Link to comment
  • 3 months later...

I'm pretty excited about this release 😃

 

Version 3.0

 

What's new?

 

  • Secure Notes

Now you can view the Secure Notes in your vault.  The item is shown in a dialog window where you can copy/paste.

 

 

1270898841_ScreenShot2021-05-03at8_10_02PM.png.96be9df4644718c445b488b71aa10d4f.png

 

  • Folders

You'll also see folders in the search results.  Actioning a folder will filter results to that folder.

 

  • ShowFolders variable

Disabled by default, to stay consistent with current behavior, this changes the initial display to show only the folders in your vault.  Actioning a result, or typing in an argument, will then show passwords, notes, and folders.

 

1442666718_ScreenShot2021-05-04at9_17_55AM.thumb.png.c7bfad7153806a436a83bc7382c39761.png

 

  • Performance enhancements and bug fixes
Link to comment
  • 3 weeks later...

Version 3.2

 

What's new?

  • Browser integration

If your browser is the front-most application, then any items that match the current URL's hostname will be included at the top of the results list.  Supported browsers:

  • Safari
  • Chrome
  • Opera
  • Edge

I use Firefox.  As frequenters of this forum know, Firefox does not support Applescript 😠

 

What about Version 3.1.0?

 

Selecting a Secure Note was copying the entire note's contents to the clipboard and not restoring the clipboard.  Now the clipboard is undisturbed.  I didn't post an announcement since it was "just" a bug fix.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...