home / security / bw

Bitwarden CLI

Official · Bitwarden
1.7k

Official Bitwarden CLI for vault login, credential retrieval, item management, and Bitwarden Send from the terminal.

$npm install -g @bitwarden/cli
Language
TypeScript
Stars
1,673
Category
Security
Agent
Ready
Agent Compatibility
JSON Output
Agent Skill
MCP Support
AI Analysis

Bitwarden CLI is Bitwarden's command line for working with personal or organization vault data from the shell. It covers login and unlock flows, credential retrieval, item management, imports and exports, password generation, Bitwarden Send, and an optional local API mode.

What It Enables
  • Log in, unlock, sync, and query vault items, then retrieve usernames, passwords, notes, attachments, exposed-password checks, and TOTP codes.
  • Create, edit, archive, restore, delete, import, and export items, folders, org collections, and related vault data without opening the web app.
  • Generate passwords or passphrases, create or receive Bitwarden Sends, and optionally expose the same operations through the local bw serve REST API.
Agent Fit
  • Most inspect and mutate commands are non-TUI and stdout-oriented, and list, object, and template outputs are JSON by default; --response returns a full JSON response envelope when you need status metadata too.
  • It works well for credential retrieval and vault automation once auth is established, especially when a skill standardizes item names, org IDs, and server configuration.
  • Automation gets weaker around login and unlock: SSO can open a browser, 2FA and new-device verification may prompt, and locked-vault flows require a valid BW_SESSION or interactive unlock.
Caveats
  • Requires a Bitwarden account plus an authenticated, synced, unlocked vault for most useful commands.
  • Bitwarden's current README says the Homebrew build is not recommended for all users because it omits device approval commands for some Enterprise SSO flows.