bitwarden-cli
TLDR
Log in to Bitwarden
SYNOPSIS
bw command [options]
DESCRIPTION
bw is the official command-line interface for Bitwarden, an open-source password manager. It provides full access to your encrypted vault from the terminal, enabling password retrieval, item management, and integration with scripts and automation.
After login, the vault must be unlocked with your master password. This returns a session key that must be provided to subsequent commands via --session or the BW_SESSION environment variable. The vault locks automatically after a timeout.
Items are represented as JSON, making the CLI suitable for scripting and integration with other tools. The generate command creates secure passwords without storing them.
PARAMETERS
login [email]
Authenticate with Bitwarden server.unlock
Unlock the vault with master password.lock
Lock the vault.sync
Synchronize with the Bitwarden server.list object
List items (items, folders, collections, organizations).get object id
Get a specific item (item, password, username, totp, notes).create object
Create a new item (accepts JSON from stdin).edit object id
Edit an existing item.delete object id
Delete an item.generate
Generate a secure password.--session key
Session key from unlock (or set BW_SESSION env var).--search query
Search filter for list commands.-u, -l, -n, -s
Password generation: uppercase, lowercase, numbers, special.--length n
Password length for generation.
CAVEATS
The session key provides full access to your vault; protect it accordingly. Commands output JSON by default, which may require parsing with jq. The vault must be unlocked before most operations. API rate limits may apply to self-hosted instances.
HISTORY
Bitwarden was founded by Kyle Spearrin and launched in 2016 as an open-source alternative to proprietary password managers. The CLI was introduced to complement the web, desktop, and mobile applications. Bitwarden has grown to become one of the most popular password managers, valued for its transparent open-source model and affordable pricing.
SEE ALSO
pass(1), gopass(1), keepassxc-cli(1), 1password(1)


