Securely interact with Bitwarden password manager via the bw CLI. Covers authentication (login/unlock/logout), vault operations (list/get/create/edit/delete...
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install bw-cli或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install bw-cli⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/bw-cli/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: bw-cli description: Interact with Bitwarden password manager using the bw CLI. Covers authentication (login/unlock/logout/status), vault operations (list/get/create/edit/delete/restore items, folders, attachments, collections), password/passphrase generation, organization management, and Send/receive. Use for "bitwarden", "bw", "password safe", "vaultwarden", "vault", "password manager", "generate password", "get password", "unlock vault", "share send". metadata: author: tfm version: "1.9.0" docs: https://bitwarden.com/help/cli/ docs-md: https://bitwarden.com/help/cli.md api-key-docs: https://bitwarden.com/help/personal-api-key/ ---
Complete reference for interacting with Bitwarden via the command-line interface.
Official documentation: https://bitwarden.com/help/cli/ Markdown version (for agents): https://bitwarden.com/help/cli.md
# Native executable (recommended)
# https://bitwarden.com/download/?app=cli
# npm
npm install -g @bitwarden/cli
# Linux package managers
choco install bitwarden-cli # Windows via Chocolatey
snap install bw # Linux via Snap
Standard-Workflow (unlock-first):
# 1. Try unlock first (fast, most common case)
export BW_SESSION=$(bw unlock --passwordenv BW_PASSWORD --raw 2>/dev/null)
# 2. Only if unlock fails, fall back to login
if [ -z "$BW_SESSION" ]; then
bw login "$BW_EMAIL" "$BW_PASSWORD"
export BW_SESSION=$(bw unlock --passwordenv BW_PASSWORD --raw)
fi
# 3. Sync before any vault operation
bw sync
# 4. End session
bw lock # Lock (keep login)
bw logout # Complete logout
Alternative: Direct login methods
bw login # Interactive login (email + password)
bw login --apikey # API key login (uses BW_CLIENTID/BW_CLIENTSECRET from .secrets)
bw login --sso # SSO login
bw unlock # Interactive unlock
bw unlock --passwordenv BW_PASSWORD # Auto-available from sourced .secrets
Check authentication and vault status:
bw status
Returns: unauthenticated, locked, or unlocked.
Configure CLI settings:
# Set server (self-hosted or regional)
bw config server https://vault.example.com
bw config server https://vault.bitwarden.eu # EU cloud
bw config server # Check current
# Individual service URLs
bw config server --web-vault <url> --api <url> --identity <url>
Sync local vault with server (always run before vault operations):
bw sync # Full sync
bw sync --last # Show last sync timestamp
Check for updates (does not auto-install):
bw update
Start REST API server:
bw serve --port 8087 --hostname localhost
List vault objects:
# Items
bw list items
bw list items --search github
bw list items --folderid <id> --collectionid <id>
bw list items --url https://example.com
bw list items --trash # Items in trash
# Folders
bw list folders
# Collections
bw list collections # All collections
bw list org-collections --organizationid <id> # Org collections
# Organizations
bw list organizations
bw list org-members --organizationid <id>
Retrieve single values or items:
# Get specific fields (by name or ID)
bw get password "GitHub"
bw get username "GitHub"
bw get totp "GitHub" # 2FA code
bw get notes "GitHub"
bw get uri "GitHub"
# Get full item JSON
bw get item "GitHub"
bw get item <uuid> --pretty
# Other objects
bw get folder <id>
bw get collection <id>
bw get organization <id>
bw get org-collection <id> --organizationid <id>
# Templates for create operations
bw get template item
bw get template item.login
bw get template item.card
bw get template item.identity
bw get template item.securenote
bw get template folder
bw get template collection
bw get template item-collections
# Security
bw get fingerprint <user-id>
bw get fingerprint me
bw get exposed <password> # Check if password is breached
# Attachments
bw get attachment <filename> --itemid <id> --output /path/
Create new objects:
# Create folder
bw get template folder | jq '.name="Work"' | bw encode | bw create folder
# Create login item
bw get template item | jq \
'.name="Service" | .login=$(bw get template item.login | jq '.username="[email protected]" | .password="secret"')' \
| bw encode | bw create item
# Create secure note (type=2)
bw get template item | jq \
'.type=2 | .secureNote.type=0 | .name="Note" | .notes="Content"' \
| bw encode | bw create item
# Create card (type=3)
bw get template item | jq \
'.type=3 | .name="My Card" | .card=$(bw get template item.card | jq '.number="4111..."')' \
| bw encode | bw create item
# Create identity (type=4)
bw get template item | jq \
'.type=4 | .name="My Identity" | .identity=$(bw get template item.identity)' \
| bw encode | bw create item
# Create SSH key (type=5)
bw get template item | jq \
'.type=5 | .name="My SSH Key"' \
| bw encode | bw create item
# Attach file to existing item
bw create attachment --file ./doc.pdf --itemid <uuid>
Item types: 1=Login, 2=Secure Note, 3=Card, 4=Identity, 5=SSH Key.
Modify existing objects:
# Edit item
bw get item <id> | jq '.login.password="newpass"' | bw encode | bw edit item <id>
# Edit folder
bw get folder <id> | jq '.name="New Name"' | bw encode | bw edit folder <id>
# Edit item collections
echo '["collection-uuid"]' | bw encode | bw edit item-collections <item-id> --organizationid <id>
# Edit org collection
bw get org-collection <id> --organizationid <id> | jq '.name="New Name"' | bw encode | bw edit org-collection <id> --organizationid <id>
Remove objects:
# Send to trash (recoverable 30 days)
bw delete item <id>
bw delete folder <id>
bw delete attachment <id> --itemid <id>
bw delete org-collection <id> --organizationid <id>
# Permanent delete (irreversible!)
bw delete item <id> --permanent
Recover from trash:
bw restore item <id>
Generate passwords or passphrases:
# Password (default: 14 chars)
bw generate
bw generate --uppercase --lowercase --number --special --length 20
bw generate -ulns --length 32
# Passphrase
bw generate --passphrase --words 4 --separator "-" --capitalize --includeNumber
Create ephemeral shares:
# Text Send
bw send -n "Secret" -d 7 --hidden "This text vanishes in 7 days"
# File Send
bw send -n "Doc" -d 14 -f /path/to/file.pdf
# Advanced options
bw send --password accesspass -f file.txt
Access received Sends:
bw receive <url> --password <pass>
Share items to organization:
echo '["collection-uuid"]' | bw encode | bw move <item-id> <organization-id>
Confirm invited members:
bw get fingerprint <user-id>
bw confirm org-member <user-id> --organizationid <id>
Manage device approvals:
bw device-approval list --organizationid <id>
bw device-approval approve <request-id> --organizationid <id>
bw device-approval approve-all --organizationid <id>
bw device-approval deny <request-id> --organizationid <id>
bw device-approval deny-all --organizationid <id>
Import from other password managers:
bw import --formats # List supported formats
bw import lastpasscsv ./export.csv
bw import bitwardencsv ./import.csv --organizationid <id>
...
安装 Bitwarden CLI 后,可以对 AI 说这些话来触发它
Help me get started with Bitwarden CLI
Explains what Bitwarden CLI does, walks through the setup, and runs a quick demo based on your current project
Use Bitwarden CLI to securely interact with Bitwarden password manager via the bw CLI
Invokes Bitwarden CLI with the right parameters and returns the result directly in the conversation
What can I do with Bitwarden CLI in my finance & investment workflow?
Lists the top use cases for Bitwarden CLI, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/bw-cli/ 目录(个人级,所有项目可用),或 .claude/skills/bw-cli/(项目级)。重启 AI 客户端后,用 /bw-cli 主动调用,或让 AI 根据上下文自动发现并使用。
Bitwarden CLI 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Bitwarden CLI 可免费安装使用。请查阅仓库了解许可证信息。
Securely interact with Bitwarden password manager via the bw CLI. Covers authentication (login/unlock/logout), vault operations (list/get/create/edit/delete...
Bitwarden CLI 属于「Finance & Investment」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my finance & investment tasks using Bitwarden CLI
Identifies repetitive steps in your workflow and sets up Bitwarden CLI to handle them automatically