Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Bitwarden CLI

$ bw Official High Risk
Bitwarden · Security & Secrets · GPL-3.0 · macos / linux / windows

bw 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.

FCRS-1.0 Score
76 /100
Good
Medium Confidence
Zero-Friction Install
brew install bitwarden-cli
CLI vs MCP Decision CLI Preferred vs MCP

Direct bw invocations avoid copying vault credentials across an extra MCP server boundary, though strict stdout redaction is still required.

Agent-Readiness Checklist

✓ JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
— Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 19 / 25

Outputs JSON on status/list/get, but prompts interactively for master passwords unless BW_SESSION or --passwordenv + --raw is wired carefully.

  • Requires BW_SESSION / --raw to avoid interactive prompts
Trust & Safety 15 / 25

No built-in subprocess injector (op run equivalent), so retrieving secrets via bw get almost inevitably exposes plaintext in shell stdout.

  • bw list items and bw get emit plaintext secret fields to stdout
Setup & Portability 12 / 15

Packaged via brew, npm install -g @bitwarden/cli, and standalone binaries.

  • Cross-platform Node/standalone distributions
Utility & Efficiency 12 / 15

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 run env-wrapper
Maintenance & Lineage 9 / 10

Official Bitwarden CLI maintained in bitwarden/clients under GPL-3.0.

  • Official vendor repository
Docs & Verifiability 9 / 10

Well-documented CLI guide at bitwarden.com/help/cli/.

  • Official help docs covering API key login and BW_SESSION

Security, Auth & Guardrails

Auth Modes
Env API Key Config File
Credential Storage

Stores encrypted vault cache in ~/.config/Bitwarden CLI/data.json; uses BW_CLIENTID/BW_CLIENTSECRET for API login and BW_SESSION for unlocked commands.

Side Effects
Read-Only Local Write Remote Write Destructive
Cost & Quotas

100% free and open-source (GPL-3.0); enterprise org vaults have paid tiers.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# 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

Check Bitwarden CLI lock and login status
bw status

Returns JSON showing server URL, user email, and vault locked/unlocked state without touching secrets.

Sync local encrypted vault cache
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 status and queries.
  • + Supports API-key login (BW_CLIENTID/BW_CLIENTSECRET) for CI automation.

Caveats & Pitfalls

  • ! Lacks a native run command to inject secrets into subprocesses without exposing them to stdout.
  • ! Interactive prompts hang headless shells whenever BW_SESSION is missing or expired.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI