bitwarden
Original:🇺🇸 English
Translated
Retrieves API keys, passwords, secrets from Bitwarden vault using bw CLI. Triggers on missing env variables, missing API keys, missing secrets, "secret not found", "env not set", or "use bw".
5installs
Added on
NPX Install
npx skill4agent add sebastiaanwouters/dotagents bitwardenTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Bitwarden CLI
Retrieve secrets when environment variables are missing.
CRITICAL: Source .env Before EVERY bw Command
EVERY command MUST be prefixed with sourcing .env to load :
bwBW_SESSIONbash
# Standard prefix for ALL bw commands - copy this pattern exactly:
source .env 2>/dev/null; bw <command>Example commands:
bash
source .env 2>/dev/null; bw status
source .env 2>/dev/null; bw list items --search "telegram"
source .env 2>/dev/null; bw get password "item-name"
source .env 2>/dev/null; bw get notes "item-name"If .env is in a parent directory, search up:
bash
for dir in . .. ../.. ../../..; do [[ -f "$dir/.env" ]] && source "$dir/.env" && break; done; bw statusSession Management
Check status (should show "unlocked" if BW_SESSION is valid):
bash
source .env 2>/dev/null; bw statusIf locked and BW_SESSION not in .env, unlock and save to .env:
bash
echo "BW_SESSION=$(bw unlock --raw)" >> .envFinding API Keys
API keys are often stored in notes - either in a login item's notes field or as a standalone secure note.
-
Search first to find the right item:bash
bw list items --search "openai" -
Check notes - API keys are commonly here:bash
bw get notes "item-name" -
Check custom fields if not in notes:bash
bw get item "item-name" | jq -r '.fields[] | select(.name=="API_KEY") | .value'
Common Patterns
| Need | Command |
|---|---|
| Search items | |
| Notes (API keys!) | |
| Password | |
| Username | |
| TOTP | |
| Custom field | |
CLI Help
bw [options] [command]
Commands:
login [email] [password] Log into account
unlock [password] Unlock vault, returns session key
lock Lock vault
status Show vault status
list <object> List objects (items, folders, collections)
get <object> <id> Get object (item, username, password, totp, notes)
sync Pull latest vault data