Twhidden Bitwarden
Bitwarden & Vaultwarden password manager integration.
- Rating
- 4.1 (116 reviews)
- Downloads
- 14,827 downloads
- Version
- 1.0.0
Overview
Bitwarden & Vaultwarden password manager integration.
Complete Documentation
View Source →
Bitwarden & Vaultwarden
Bitwarden/Vaultwarden CLI (bw) wrapper with automatic login, session caching, and convenient commands. Works seamlessly with both official Bitwarden (vault.bitwarden.com) and self-hosted Vaultwarden instances.
Requirements
- Bitwarden CLI (
bw) installed:npm install -g @bitwarden/cli - A Bitwarden or Vaultwarden server instance
- Credentials configured (see Configuration below)
Configuration
Set credentials via environment variables or a credentials file:
# Environment variables (preferred)
export BW_SERVER="https://vault.bitwarden.com" # Official Bitwarden
# OR
export BW_SERVER="https://your-vaultwarden-instance.example.com" # Vaultwarden
export BW_EMAIL="[email protected]"
export BW_MASTER_PASSWORD="your-master-password"
# Or use a credentials file (default: secrets/bitwarden.env)
export CREDS_FILE="/path/to/your/bitwarden.env"
The credentials file should contain:
BW_SERVER=https://vault.bitwarden.com
[email protected]
BW_MASTER_PASSWORD=your-master-password
Invocation
bash skills/bitwarden/bw.sh <command> [args...]
Commands
| Command | Description | Example | |
|---|---|---|---|
| register [email] [pass] [name] | Register new account | bw.sh register [email protected] pass123 "My Name" | |
| login | Login & unlock vault | bw.sh login | |
| status | Show vault status | bw.sh status | |
| list [search] | List/search items | bw.sh list github | |
get | |||
get-password | |||
get-username | |||
| create | Create login | bw.sh create "GitHub" user pass https://github.com | |
| generate [length] | Generate password | bw.sh generate 32 | |
| delete | Delete item | bw.sh delete | |
| lock | Lock vault | bw.sh lock |
Workflow
- First call per session:
bw.sh login(auto-authenticates from configured credentials) - Session token cached at
/tmp/.bw_session - All subsequent commands auto-use the cached session
- After reboot/restart: run
loginagain
Storing New Credentials
# Generate + store
PASS=$(bash skills/bitwarden/bw.sh generate 32)
bash skills/bitwarden/bw.sh create "New Service" "[email protected]" "$PASS" "https://service.com"
Account Registration
Register a new account on your Bitwarden/Vaultwarden server directly from the CLI:
# Register using configured credentials (from env/credentials file)
bash skills/bitwarden/bw.sh register
# Register with explicit credentials
bash skills/bitwarden/bw.sh register "[email protected]" "SecurePass123!" "Display Name"
How it works:
- Derives a master key using PBKDF2-SHA256 (600,000 iterations) with the email as salt
- Creates a master password hash for server authentication
- Generates a 64-byte symmetric key, encrypted with AES-256-CBC + HMAC-SHA256
- Submits registration to the server's
/api/accounts/registerendpoint
Note: The master password must be at least 12 characters. Works with both official Bitwarden and Vaultwarden servers.
Guardrails
- Never paste secrets into logs, chat, or code.
- Keep
bitwarden.envout of version control. - Use
chmod 600on credential files. - Session tokens are stored in
/tmpand cleared on lock/logout.
External Endpoints
| Endpoint | Purpose | Data Sent |
|---|---|---|
| User-configured BW_SERVER | Bitwarden/Vaultwarden API | Encrypted vault data, authentication credentials |
BW_SERVER. For official Bitwarden, this is https://vault.bitwarden.com. For Vaultwarden, this is your self-hosted instance URL.Security & Privacy
What leaves your machine:
- Authentication requests (email, master password) to your configured Bitwarden server
- Encrypted vault data (create/read/update/delete operations)
- All communication uses HTTPS/TLS
- Session tokens (cached in
/tmp/.bw_session) - Credential files (if using
bitwarden.env) - Decrypted passwords (only in memory, never written to disk)
Model Invocation
This skill can be invoked autonomously by your OpenClaw agent when it needs to:
- Store credentials securely
- Retrieve passwords for automation tasks
- Generate secure passwords
Security Best Practices
- Credentials file: Use
chmod 600onsecrets/bitwarden.env - Environment isolation: Don't share credential files across systems
- Session tokens: Automatically expire; run
bw.sh lockwhen done - Git: The
.gitignoreexcludes all secrets (secrets/,*.env,.bw_session) - Master password: Never hardcode or log your master password
Installation
openclaw install twhidden-bitwarden
💻Code Examples
bash skills/bitwarden/bw.sh <command> [args...]
## Commands
| Command | Description | Example |
|---------|-------------|---------|
| `register [email] [pass] [name]` | Register new account | `bw.sh register [email protected] pass123 "My Name"` |
| `login` | Login & unlock vault | `bw.sh login` |
| `status` | Show vault status | `bw.sh status` |
| `list [search]` | List/search items | `bw.sh list github` |
| `get <name\|id>` | Get full item JSON | `bw.sh get "GitHub"` |
| `get-password <name\|id>` | Get password only | `bw.sh get-password "GitHub"` |
| `get-username <name\|id>` | Get username only | `bw.sh get-username "GitHub"` |
| `create <name> <user> <pass> [uri] [notes]` | Create login | `bw.sh create "GitHub" user pass https://github.com` |
| `generate [length]` | Generate password | `bw.sh generate 32` |
| `delete <id>` | Delete item | `bw.sh delete <uuid>` |
| `lock` | Lock vault | `bw.sh lock` |
## Workflow
1. First call per session: `bw.sh login` (auto-authenticates from configured credentials)
2. Session token cached at `/tmp/.bw_session`
3. All subsequent commands auto-use the cached session
4. After reboot/restart: run `login` again
## Storing New Credentialsbash skills/bitwarden/bw.sh create "New Service" "[email protected]" "$PASS" "https://service.com"
## Account Registration
Register a new account on your Bitwarden/Vaultwarden server directly from the CLI:# Environment variables (preferred)
export BW_SERVER="https://vault.bitwarden.com" # Official Bitwarden
# OR
export BW_SERVER="https://your-vaultwarden-instance.example.com" # Vaultwarden
export BW_EMAIL="[email protected]"
export BW_MASTER_PASSWORD="your-master-password"
# Or use a credentials file (default: secrets/bitwarden.env)
export CREDS_FILE="/path/to/your/bitwarden.env"BW_SERVER=https://vault.bitwarden.com
[email protected]
BW_MASTER_PASSWORD=your-master-password# Generate + store
PASS=$(bash skills/bitwarden/bw.sh generate 32)
bash skills/bitwarden/bw.sh create "New Service" "[email protected]" "$PASS" "https://service.com"# Register using configured credentials (from env/credentials file)
bash skills/bitwarden/bw.sh register
# Register with explicit credentials
bash skills/bitwarden/bw.sh register "[email protected]" "SecurePass123!" "Display Name"⚙️Configuration Options
| Option | Type | Default | Description |
|---|---|---|---|
BW_SERVER | string | https://vault.bitwarden.com | - |
BW_SERVER | string | https://your-vaultwarden-instance.example.com | - |
BW_EMAIL | string | [email protected] | - |
BW_MASTER_PASSWORD | string | your-master-password | - |
CREDS_FILE | string | /path/to/your/bitwarden.env | - |
BW_SERVER | string | https://vault.bitwarden.com | - |
BW_EMAIL | string | [email protected] | - |
BW_MASTER_PASSWORD | string | your-master-password | - |
Tags
Quick Info
Ready to Install?
Get started with this skill in seconds
Related Skills
4claw
4claw — a moderated imageboard for AI agents.
Aap Passport
Agent Attestation Protocol - The Reverse Turing Test.
Acestep Lyrics Transcription
Transcribe audio to timestamped lyrics using OpenAI Whisper or ElevenLabs Scribe API.
Adaptive Suite
A continuously adaptive skill suite that empowers Clawdbot.