bitwarden

Set up and use Bitwarden CLI (bw). Use when installing the CLI, authenticating (login/unlock), or reading secrets from your vault. Supports email/password, API key, and SSO authentication methods.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "bitwarden" with this command: npx skills add StartupBros/bitwarden-vault

Bitwarden CLI Skill

The Bitwarden command-line interface (CLI) provides full access to your Bitwarden vault for retrieving passwords, secure notes, and other secrets programmatically.

Workflow Requirements

CRITICAL: Always run bw commands inside a dedicated tmux session. The CLI requires a session key (BW_SESSION) for all vault operations after authentication. A tmux session preserves this environment variable across commands.

Required Workflow

  1. Verify CLI installation: Run bw --version to confirm the CLI is available
  2. Create a dedicated tmux session: tmux new-session -d -s bw-session
  3. Attach and authenticate: Run bw login or bw unlock inside the session
  4. Export session key: After unlock, export BW_SESSION as instructed by the CLI
  5. Execute vault commands: Use bw get, bw list, etc. within the same session

Authentication Methods

MethodCommandUse Case
Email/Passwordbw loginInteractive sessions, first-time setup
API Keybw login --apikeyAutomation, scripts (requires separate unlock)
SSObw login --ssoEnterprise/organization accounts

After bw login with email/password, your vault is automatically unlocked. For API key or SSO login, you must subsequently run bw unlock to decrypt the vault.

Session Key Management

The unlock command outputs a session key. You must export it:

# Bash/Zsh
export BW_SESSION="<session_key_from_unlock>"

# Or capture automatically
export BW_SESSION=$(bw unlock --raw)

Session keys remain valid until you run bw lock or bw logout. They do not persist across terminal windows—hence the tmux requirement.

Reading Secrets

# Get password by item name
bw get password "GitHub"

# Get username
bw get username "GitHub"

# Get TOTP code
bw get totp "GitHub"

# Get full item as JSON
bw get item "GitHub"

# Get specific field
bw get item "GitHub" | jq -r '.fields[] | select(.name=="api_key") | .value'

# List all items
bw list items

# Search items
bw list items --search "github"

Security Guardrails

  • NEVER expose secrets in logs, code, or command output visible to users
  • NEVER write secrets to disk unless absolutely necessary
  • ALWAYS use bw lock when finished with vault operations
  • PREFER reading secrets directly into environment variables or piping to commands
  • If you receive "Vault is locked" errors, re-authenticate with bw unlock
  • If you receive "You are not logged in" errors, run bw login first
  • Stop and request assistance if tmux is unavailable on the system

Environment Variables

VariablePurpose
BW_SESSIONSession key for vault decryption (required for all vault commands)
BW_CLIENTIDAPI key client ID (for --apikey login)
BW_CLIENTSECRETAPI key client secret (for --apikey login)
BITWARDENCLI_APPDATA_DIRCustom config directory (enables multi-account setups)

Self-Hosted Servers

For Vaultwarden or self-hosted Bitwarden:

bw config server https://your-bitwarden-server.com

Reference Documentation

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

Ai Freelancing Guide

Provides a complete guide to AI freelancing including niche analysis, pricing, client acquisition, proposal templates, and delivery workflows.

Registry SourceRecently Updated
Coding

Ai Code Assistant

提供多语言AI智能代码处理与批量自动化,显著提升开发效率,适合企业、团队及自由职业者。

Registry SourceRecently Updated
Coding

Life Control

Orchestrate the Life Control CLI skill for OpenClaw agent fleets: initialize the Life Control database, register agent personas, wire Telegram bots, and run daily routines (Morning Alignment, Body Protocol, Financial Pulse, Social Radar, Work Priming, Shutdown). Use when a user asks to create or run a Life Control system, OpenClaw skill integration, or agent persona automation for personal life tracking.

Registry SourceRecently Updated