bitwarden
Set up and use Bitwarden CLI (bw). Use when installing the CLI, unlocking vault, or reading/generating secrets via bw. Handles session management with BW_SESSION.
- License 许可
- MIT
- 最近更新
- 2026-04-05
- Stars
- ★ 7
- Forks
- 1
01 前言 Front Matter
- name
- bitwarden
- homepage
- https://bitwarden.com/help/cli/
- metadata
- { "openclaw": { "emoji": "?", "install": [ { "id": "brew-bw", "bins": [ "bw" ], "kind": "brew", "label": "Install Bitwarden CLI (brew)", "formula": "bitwarden-cli" }, { "id": "brew-tmux", "bins": [ "tmux" ], "kind": "brew", "label": "Install tmux (brew)", "formula": "tmux" } ], "requires": { "bins": [ "bw", "tmux" ] } } }
- description
- Set up and use Bitwarden CLI (bw). Use when installing the CLI, unlocking vault, or reading/generating secrets via bw. Handles session management with BW_SESSION.
02 资源文件 1
- 参考文档_meta.json282 B
03 SKILL.md 正文
Bitwarden CLI
Manage passwords and secrets via the Bitwarden CLI.
References
references/get-started.md(install + login + unlock flow)references/cli-examples.md(realbwexamples)
Workflow
- Check CLI present:
bw --version. - Check login status:
bw status(returns JSON with status field). - If not logged in:
bw login(stores API key, prompts for master password). - REQUIRED: create a fresh tmux session for all
bwcommands. - Unlock vault inside tmux:
bw unlock(outputs session key). - Export session key:
export BW_SESSION="<key>". - Verify access:
bw syncthenbw list items --search test.
REQUIRED tmux session
The Bitwarden CLI requires the BW_SESSION environment variable for authenticated commands. To persist the session across commands, always run bw inside a dedicated tmux session.
Example (see tmux skill for socket conventions):
SOCKET_DIR="${CLAWDBOT_TMUX_SOCKET_DIR:-${TMPDIR:-/tmp}/openclaw-tmux-sockets}"
mkdir -p "$SOCKET_DIR"
SOCKET="$SOCKET_DIR/openclaw-bw.sock"
SESSION="bw-auth-$(date +%Y%m%d-%H%M%S)"
tmux -S "$SOCKET" new -d -s "$SESSION" -n shell
# Unlock and capture session key
tmux -S "$SOCKET" send-keys -t "$SESSION":0.0 -- 'export BW_SESSION=$(bw unlock --raw)' Enter
tmux -S "$SOCKET" send-keys -t "$SESSION":0.0 -- 'bw sync' Enter
tmux -S "$SOCKET" send-keys -t "$SESSION":0.0 -- 'bw list items --search github' Enter
# Capture output
tmux -S "$SOCKET" capture-pane -p -J -t "$SESSION":0.0 -S -200
# Cleanup when done
tmux -S "$SOCKET" kill-session -t "$SESSION"
Common Commands
| Command | Description |
|---|---|
bw status |
Check login/lock status (JSON) |
bw login |
Login with email/password or API key |
bw unlock |
Unlock vault, returns session key |
bw lock |
Lock vault |
bw sync |
Sync vault with server |
bw list items |
List all items |
bw list items --search <query> |
Search items |
bw get item <id-or-name> |
Get specific item (JSON) |
bw get password <id-or-name> |
Get just the password |
bw get username <id-or-name> |
Get just the username |
bw get totp <id-or-name> |
Get TOTP code |
bw generate -ulns --length 32 |
Generate password |
Guardrails
- Never paste secrets into logs, chat, or code.
- Always use tmux to maintain BW_SESSION across commands.
- Prefer
bw get passwordover parsing full item JSON when only password needed. - If command returns "Vault is locked", re-run
bw unlockinside tmux. - Do not run authenticated
bwcommands outside tmux; the session won't persist. - Lock vault when done:
bw lock.
Testing with Vaultwarden
This skill includes a Docker Compose setup for local testing with Vaultwarden (self-hosted Bitwarden-compatible server).
Quick Start
# Install mkcert and generate local certs (one-time)
brew install mkcert
mkcert -install
cd /path/to/openclaw-bitwarden
mkdir -p certs && cd certs
mkcert localhost 127.0.0.1 ::1
cd ..
# Start Vaultwarden + Caddy
docker compose up -d
# Configure bw CLI to use local server
bw config server https://localhost:8443
# Create a test account via web UI at https://localhost:8443
# Or run the setup script:
./scripts/setup-test-account.sh
# Test the skill workflow
./scripts/test-skill-workflow.sh
Test Credentials
- Server URL: https://localhost:8443
- Admin Panel: https://localhost:8443/admin (token:
test-admin-token-12345) - Suggested test account: test@example.com / TestPassword123!
Node.js CA Trust
The bw CLI requires the mkcert CA to be trusted. Export before running bw commands:
export NODE_EXTRA_CA_CERTS="$(mkcert -CAROOT)/rootCA.pem"
Or add to your shell profile for persistence.
Cleanup
docker compose down -v # Remove container and data
04 同仓库更多 Skills
zyfai
Earn yield on any Ethereum wallet on Base, Arbitrum, and Plasma. Use when a user wants passive DeFi yield on their funds. Deploys a non-custodial subaccount (Safe) linked to their EOA, enables automated yield optimization, and lets them deposit/withdraw anytime.
zerion-api
暂无简介
zerion-api-skill
暂无简介
zerion-api-mcp
暂无简介
yahoo-finance-forex
Fetches real-time FOREX news and market data from Yahoo Finance for major currency pairs (EUR/USD, GBP/USD, USD/JPY, etc.). Analyzes sentiment and provides trading context.
yahoo-finance
This skill should be used when the user asks to "get stock prices", "check stock quotes", "look up earnings", "get financial data", "find trending stocks", or needs stock market data from Yahoo Finance.