Token导航 LogoToken导航TokenDH.com
研究检索敏感数据clawhub未标认证来源可访问clear审计提醒

bw-cliBW CLI 搜索

Agent Skill

bw-cli 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

48,748

周安装

1,972

GitHub Stars

公开资料未说明

下载量

15,303
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:bw-cli(BW CLI 搜索)
来源仓库:https://github.com/0x7466/bw-cli
安装命令:
openclaw skills install bw-cli
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install bw-cli

简介

通过 bw CLI 安全操作 Bitwarden 密码管理器,涵盖登录、解锁与保管库管理。

  • 适用于需要自动化凭据管理与安全审计集成的开发场景。
  • 支持条目增删改查与批量导入导出操作。bw-cli 属于研究检索类 Skill,可作为该场景下的辅助能力补充。
  • 使用时应确保本地环境可信,避免密钥泄露风险。
  • 建议结合来源仓库 README 核验命令行参数与权限模型。

SKILL.md

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/

Bitwarden CLI

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

Quick Reference

Installation

# 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

Authentication Flow (Preferred: Unlock First)

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

Session & Configuration Commands

status

Check authentication and vault status:

bw status

Returns: unauthenticated, locked, or unlocked.

config

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

Sync local vault with server (always run before vault operations):

bw sync                     # Full sync
bw sync --last             # Show last sync timestamp

update

Check for updates (does not auto-install):

bw update

serve

Start REST API server:

bw serve --port 8087 --hostname localhost

Vault Item Commands

list

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>

get

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

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="user@example.com" | .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.

edit

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>

delete

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

restore

Recover from trash:

bw restore item <id>

Password Generation

generate

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

Send Commands (Secure Sharing)

send

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

receive

Access received Sends:

bw receive <url> --password <pass>

Organization Commands

move

Share items to organization:

echo '["collection-uuid"]' | bw encode | bw move <item-id> <organization-id>

confirm

Confirm invited members:

bw get fingerprint <user-id>
bw confirm org-member <user-id> --organizationid <id>

device-approval

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 & Export

import

Import from other password managers:

bw import --formats                          # List supported formats
bw import lastpasscsv ./export.csv
bw import bitwardencsv ./import.csv --organizationid <id>

export

Export vault data:

bw export                                    # CSV format
bw export --format json
bw export --format encrypted_json
bw export --format encrypted_json --password <custom-pass>
bw export --format zip                       # Includes attachments
bw export --output /path/ --raw              # Output to file or stdout
bw export --organizationid <id> --format json

Utilities

encode

Base64 encode JSON for create/edit operations:

bw get template folder | jq '.name="Test"' | bw encode | bw create folder

generate (password)

See Password Generation.

Global Options

Available on all commands:

--pretty                     # Format JSON output with tabs
--raw                        # Return raw output
--response                   # JSON formatted response
--quiet                      # No stdout (use for piping secrets)
--nointeraction             # Don't prompt for input
--session <key>             # Pass session key directly
--version                   # CLI version
--help                      # Command help

Security Reference

Secure Password Storage (Workspace .secrets)

Store the master password in a .secrets file in the workspace root and auto-load it:

# Create .secrets file
mkdir -p ~/.openclaw/workspace
echo "BW_PASSWORD=your_master_password" > ~/.openclaw/workspace/.secrets
chmod 600 ~/.openclaw/workspace/.secrets

# Add to .gitignore
echo ".secrets" >> ~/.openclaw/workspace/.gitignore

# Auto-source in shell config (run once)
echo 'source ~/.openclaw/workspace/.secrets 2>/dev/null' >> ~/.bashrc
# OR for zsh:
echo 'source ~/.openclaw/workspace/.secrets 2>/dev/null' >> ~/.zshrc

Now BW_PASSWORD is always available:

bw unlock --passwordenv BW_PASSWORD

Security requirements:

  • File must be mode 600 (user read/write only)
  • Must add .secrets to .gitignore
  • Never commit the .secrets file
  • Auto-sourcing happens on new shell sessions; run source ~/.openclaw/workspace/.secrets for current session

API Key Authentication (Workspace .secrets)

For automated/API key login, store credentials in the same .secrets file:

# Add API credentials to .secrets
echo "BW_CLIENTID=user.xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" >> ~/.openclaw/workspace/.secrets
echo "BW_CLIENTSECRET=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" >> ~/.openclaw/workspace/.secrets
chmod 600 ~/.openclaw/workspace/.secrets

Login with API key:

bw login --apikey

⚠️ Known Issue / Workaround

On some self-hosted Vaultwarden instances, bw login --apikey may fail with:

User Decryption Options are required for client initialization

Workaround - Use Email/Password Login:

# Add EMAIL to .secrets
echo "BW_EMAIL=your@email.com" >> ~/.openclaw/workspace/.secrets

# Login with email + password (instead of --apikey)
bw login "$BW_EMAIL" "$BW_PASSWORD"

# Or as one-liner
set -a && source ~/.openclaw/workspace/.secrets && set +a && bw login "$BW_EMAIL" "$BW_PASSWORD"

# Then unlock as usual
bw unlock --passwordenv BW_PASSWORD

Full workflow (recommended for self-hosted):

# Source the .secrets file
set -a && source ~/.openclaw/workspace/.secrets && set +a

# Try unlock first (faster, works if already logged in)
export BW_SESSION=$(bw unlock --passwordenv BW_PASSWORD --raw 2>/dev/null)

# Only login if unlock failed (vault not initialized)
if [ -z "$BW_SESSION" ]; then
  bw login "$BW_EMAIL" "$BW_PASSWORD"
  export BW_SESSION=$(bw unlock --passwordenv BW_PASSWORD --raw)
fi

# Ready to use
bw sync
bw list items

Get your API key: https://bitwarden.com/help/personal-api-key/

Environment Variables

BW_CLIENTID                  # API key client_id
BW_CLIENTSECRET              # API key client_secret
BW_PASSWORD                  # Master password for unlock
BW_SESSION                   # Session key (auto-used by CLI)
BITWARDENCLI_DEBUG=true      # Enable debug output
NODE_EXTRA_CA_CERTS          # Self-signed certs path
BITWARDENCLI_APPDATA_DIR     # Custom config directory

Two-Step Login Methods

Method values: 0=Authenticator, 1=Email, 3=YubiKey.

bw login user@example.com password --method 0 --code 123456

URI Match Types

Values: 0=Domain, 1=Host, 2=Starts With, 3=Exact, 4=Regex, 5=Never.

Field Types

Values: 0=Text, 1=Hidden, 2=Boolean.

Organization User Types

0=Owner, 1=Admin, 2=User, 3=Manager, 4=Custom.

Organization User Statuses

0=Invited, 1=Accepted, 2=Confirmed, -1=Revoked.

Best Practices

  1. Unlock first, login only if needed: Try bw unlock first as it's faster; only run bw login if unlock fails (vault not initialized)
  2. Always sync: Run bw sync before any vault operation
  3. Secure session: Use bw lock when done
  4. Protect secrets: Never log BW_SESSION or BW_PASSWORD
  5. Secure storage: Keep .secrets file at mode 600, never commit it
  6. Auto-source: Add to ~/.bashrc or ~/.zshrc for persistent env vars
  7. Verify fingerprints: Before confirming org members

Troubleshooting

IssueSolution
"Bot detected"Use --apikey or provide client_secret
"Vault is locked"Run bw unlock and export BW_SESSION
Self-signed cert errorSet NODE_EXTRA_CA_CERTS
Need debug infoexport BITWARDENCLI_DEBUG=true

References:

  • HTML documentation: https://bitwarden.com/help/cli/
  • Markdown (fetchable): https://bitwarden.com/help/cli.md
  • Personal API Key: https://bitwarden.com/help/personal-api-key/

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

76.39%
按下载量换算11,690

安全审计

VirusTotal

可疑

ClawScan

可疑

Static analysis

未展示

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills