Bitwarden CLI
$ bw Official High Riskbw provides full read/write access to personal and organization Bitwarden vaults from the shell. Because bw defaults to interactive password prompts and lacks a built-in run env-injector like op run, agents must handle BW_SESSION and avoid printing raw secrets.
brew install bitwarden-cli Direct bw invocations avoid copying vault credentials across an extra MCP server boundary, though strict stdout redaction is still required.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Outputs JSON on status/list/get, but prompts interactively for master passwords unless BW_SESSION or --passwordenv + --raw is wired carefully.
- Requires
BW_SESSION/--rawto avoid interactive prompts
No built-in subprocess injector (op run equivalent), so retrieving secrets via bw get almost inevitably exposes plaintext in shell stdout.
bw list itemsandbw getemit plaintext secret fields to stdout
Packaged via brew, npm install -g @bitwarden/cli, and standalone binaries.
- Cross-platform Node/standalone distributions
Useful for checking vault status and CI key retrieval, though less ergonomic for secretless runtime injection than op or doppler.
- Full vault CRUD via CLI, lacking native
runenv-wrapper
Official Bitwarden CLI maintained in bitwarden/clients under GPL-3.0.
- Official vendor repository
Well-documented CLI guide at bitwarden.com/help/cli/.
- Official help docs covering API key login and
BW_SESSION
Security, Auth & Guardrails
Stores encrypted vault cache in ~/.config/Bitwarden CLI/data.json; uses BW_CLIENTID/BW_CLIENTSECRET for API login and BW_SESSION for unlocked commands.
100% free and open-source (GPL-3.0); enterprise org vaults have paid tiers.
# Bitwarden CLI (bw) Agent Rules - Never run `bw get password`, `bw get item`, or `bw list items` directly to stdout—fields contain plaintext passwords. - Require pre-minted `BW_SESSION` (never pass master passwords on the CLI) and lock with `bw lock` when done.
Agent-Ready Command Recipes
Safe Read-Only Queries
bw status
Returns JSON showing server URL, user email, and vault locked/unlocked state without touching secrets.
bw sync --session "$BW_SESSION"
Refreshes local vault state non-interactively using an existing BW_SESSION token.
Strengths for Agents
- + Open-source official vault CLI with structured JSON responses on
statusand queries. - + Supports API-key login (
BW_CLIENTID/BW_CLIENTSECRET) for CI automation.
Caveats & Pitfalls
- ! Lacks a native
runcommand to inject secrets into subprocesses without exposing them to stdout. - ! Interactive prompts hang headless shells whenever
BW_SESSIONis missing or expired.