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.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install bw-vault或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install bw-vault⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/bw-vault/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: bitwarden description: 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. homepage: https://bitwarden.com/help/cli/ metadata: {"clawdbot":{"emoji":"🔒","requires":{"bins":["bw"]},"install":[{"id":"npm","kind":"npm","package":"@bitwarden/cli","bins":["bw"],"label":"Install Bitwarden CLI (npm)"},{"id":"brew","kind":"brew","formula":"bitwarden-cli","bins":["bw"],"label":"Install Bitwarden CLI (brew)"},{"id":"choco","kind":"choco","package":"bitwarden-cli","bins":["bw"],"label":"Install Bitwarden CLI (choco)"}]}} ---
The Bitwarden command-line interface (CLI) provides full access to your Bitwarden vault for retrieving passwords, secure notes, and other secrets programmatically.
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.
bw --version to confirm the CLI is availabletmux new-session -d -s bw-sessionbw login or bw unlock inside the sessionBW_SESSION as instructed by the CLIbw get, bw list, etc. within the same session| Method | Command | Use Case | |--------|---------|----------| | Email/Password | bw login | Interactive sessions, first-time setup | | API Key | bw login --apikey | Automation, scripts (requires separate unlock) | | SSO | bw login --sso | Enterprise/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.
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.
# 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"
bw lock when finished with vault operationsbw unlockbw login first| Variable | Purpose | |----------|---------| | BW_SESSION | Session key for vault decryption (required for all vault commands) | | BW_CLIENTID | API key client ID (for --apikey login) | | BW_CLIENTSECRET | API key client secret (for --apikey login) | | BITWARDENCLI_APPDATA_DIR | Custom config directory (enables multi-account setups) |
For Vaultwarden or self-hosted Bitwarden:
bw config server https://your-bitwarden-server.com
安装 Bitwarden CLI 后,可以对 AI 说这些话来触发它
Send a Slack message to the #engineering channel about the deployment
Formats and sends the message with relevant context, tagging the right people
Summarize all unread messages in my inbox from today
Reads messages across connected channels and returns a prioritized summary
Draft a reply to this customer complaint and send it for review
Writes an empathetic, professional response and routes it to the approval queue
将技能文件夹放到 ~/.claude/skills/bw-vault/ 目录(个人级,所有项目可用),或 .claude/skills/bw-vault/(项目级)。重启 AI 客户端后,用 /bw-vault 主动调用,或让 AI 根据上下文自动发现并使用。
Bitwarden CLI 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Bitwarden CLI 可免费安装使用。请查阅仓库了解许可证信息。
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.
Bitwarden CLI 属于「Communication」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。