ajrosen / Bitwarden-Accelerator

Alfred Workflow to make using Bitwarden faster and smoother with all applications
GNU General Public License v3.0
44 stars 1 forks source link

Bitwarden Accelerator

Interact with Bitwarden CLI.


Table of Contents


Key Features

Logging in

Selecting items

Selecting fields

Editig fields

Miscellaneous


Installing

  1. Download the workflow here
  2. Open the downloaded file to add it to Alfred
  3. Install the Bitwarden CLI(1) from the Bitwarden website, with brew install bitwarden-cli, or with port -N install bitwarden-cli.
  4. Install jq(2) from from the website, with brew install jq, or port -N install jq.

Options

Bitwarden user

Your Bitwarden email address.

Auto Sync

Installs a macOS Launch Agent that automatically syncs your vault every Sync Interval minutes.

Login method

Choose whether to be prompted for your Password or use an API Key to login. SSO is not yet supported.

Client ID and Client Secret

These are the Client ID and Client Secret used for API Key logins. They are ignored when using the Password login method. See Personal API Key for CLI Authentication for more information.

Two-step login method

Choose Authenticator app, YubiKey OTP, or Email. FIDO2 and Duo are not supported by the CLI. This is ignored when using the API Key login method. See Two-step Login Methods for more information.

Vault timeout

How long Bitwarden can be inactive before timing out. Inactivity is determined by the time since invoking the workflow.

Custom timeout

Sets the timeout value when Vault timeout is Custom.

Vault timeout action

What Bitwarden will do once the vault timeout is reached. Choices are Lock vault and Logout.

Bitwarden server

The Bitwarden server hosting your vault. The default is bitwarden.com, the US server.

Downloads Folder

Where to save attachments downloaded from your vault. The default is your Downloads folder. If you leave this blank, Bitwarden Accelerator will ask you to choose a folder each time.

Clipboard time

How many seconds Bitwarden Accelerator will keep your password (or other field) in the clipboard. Afterwards, the previous contents of the clipboard are restored.

Sync Interval

Bitwarden Accelerator will sync your vault when you load the worfklow if it has not been synced in this many minutes.

Notifications

Uncheck this to keep Bitwarden Accelerator from displaying a notification when copying your password (or other field) to the clipboard.

Workflow Keyword

Keyword used to bring up Bitwarden Accelerator's main menu

Search Keyword

Keyword used to bring up Bitwarden Accelerator's search menu

Trash Keyword

Keyword used to search deleted items


Invoking

There are three ways to invoke Bitwarden Accelerator.

  1. Using the Workflow Keyword (default: bw) will provide a list of operations. The list depends on whether you are logged into or logged out of Bitwarden, and whether your vault is locked or unlocked.
  2. Typing the hotkey will start a search of your vault. This is the same as choosing the Search Vault operation from the main menu.
  3. As a Universal Action, you can view an item's fields directly in Alfred.

The default hotkey is Control-Command-L, because the Bitwarden browser extension uses Shift-Command-L. If you wish to change or disable the hotkey, open the workflow in Alfred Preferences. The hotkey trigger is in the top-left corner.

Trash

Use the Trash Keyword (default: .bwtrash) will list any deleted items. Select an item to restore it.


Main Menu

The options you see in the main menu depend on the state of your vault.

Unauthenticated

If you are completely logged out of Bitwarden, you will see two options.

Log into Bitwarden, with your vault locked.

Opens Alfred Preferences to the Bitwarden Accelerator configuration screen.

Vault is locked

If you are logged in, but your vault is locked, you will see three options.

Unlocks your vault.

Locks your vault and logs out of Bitwarden.

Opens Alfred Preferences to the Bitwarden Accelerator configuration screen.

Vault is unlocked

If your vault is unlocked, you will see many options.

Lists all items in your vault.

Shows a list of all the folders in your vault, then searches your vault for items in the selected folder.

Locks your Bitwarden vault.

Filter searches to a specific Vault (Organization), My Vault, or All Vaults. Or, set the default Organization for future searches with the Command modifier on the next screen.

Note that changing this setting with the Command modifier will also revert Default Collection to All Collections.

Filters searches to a specific Collection, or All Collections. Or, set the default Collection for future searches with the Command modifier on the next screen.

Tells the workflow to synchronize your vault now.

Locks your vault and logs out of Bitwarden.

Opens Alfred Preferences to the Bitwarden Accelerator configuration screen.


Item List

All items in your vault are shown, sorted by each item's name. If your web browser is the front-most window, items that match the current tab's domain will be listed first. Favorited items will be listed next, followed by all remaining items.

Supported browsers:

The default behavior when selecting an item depends on its type.

Copy a login item's password to the clipboard. Use these modifiers to copy other fields instead.

Control         Username
Shift           TOTP code
Command         Notes

Option          Opens a new menu with additional actions
Fn          Show all fields in a dialog window

Control + Command   Open URL in your default browser
Command + Option    View all fields in Alfred

Automatic field rotation

When selecting the same login item within Sync Interval seconds, and the password was the last field copied, the TOTP code will be copied to the clipboard instead of the password.

The note is copied to the clipboard, as if the Command modifier were used.

All fields will be shown in a dialog window, as if the Fn modifier were used.


More Menu

Move item to a Folder

Moves the item to the Folder you select and syncs your vault.

Mark/Unmark Favorite

Marks or unmarks the item as a Favorite and syncs your vault.

Download Attachments

If an item has attachments, this will show you a list with their names and sizes. Select one to save that attachment to the Downloads Folder.

Edit Item

Lets you edit the username, password, or name of the item.

Delete Item

Deletes the item from your vault.

You will get a warning that THIS ACTION CANNOT BE UNDONE. This is not technically true; the item is moved to your vault's Trash.


Reporting Bugs

When reporting bugs, please include the following information:


  1. If the Bitwarden CLI is not installed, Bitwarden Accelerator will ask to install it using Homebrew or MacPorts. Homebrew or MacPorts must already be installed.
  2. macOS 15.1 (Sequoia) includes jq, so it is not neccessary to install separately.
  3. Integration with Firefox requires the Alfred Integration extension.