Install
openclaw skills install credential-vaultEncrypted credential storage for OpenClaw agents. Stop storing API keys in plaintext.
openclaw skills install credential-vaultEncrypted credential storage for OpenClaw agents. Stop storing API keys in plaintext.
Credential Vault provides AES-256-GCM encrypted local storage for API keys, tokens, and other secrets. Instead of scattering credentials across .env files, centralize them in an encrypted vault with audit logging and expiry tracking.
cd ~/ubik-collective/systems/ubik-pm/skills/credential-vault
uv sync
# Initialize vault (one-time setup)
uv run vault init
# Unlock vault
uv run vault unlock
# Add credentials
uv run vault add OPENAI_API_KEY "sk-..." --tag openai
uv run vault add TAVILY_API_KEY "tvly-..." --tag tavily --expires 2026-12-31
# List credentials
uv run vault list
# Get a credential
uv run vault get OPENAI_API_KEY
# Export for a skill
eval $(uv run vault env --tag tavily)
# Lock when done
uv run vault lock
~/.openclaw/vault/vault.enc.json (encrypted)~/.openclaw/vault/audit.log (plaintext, no values)~/.openclaw/vault/session (temporary, cleared on lock)0600 (owner read/write only)vault lockProtects against:
.env filesDoes NOT protect against:
See EXAMPLE.md for detailed usage patterns.
vault initInitialize a new vault with a master password.
vault unlockUnlock the vault for the current session.
vault lockLock the vault and clear session key.
vault statusShow vault status (locked/unlocked, credential count).
vault add KEY_NAME [VALUE] [--tag TAG] [--expires DATE]Add or update a credential. If VALUE is omitted, prompts securely.
vault get KEY_NAMERetrieve and decrypt a credential.
vault list [--tag TAG]List all credentials (values masked). Optionally filter by tag.
vault remove KEY_NAME [-y]Remove a credential. Prompts for confirmation unless -y is passed.
vault env [--tag TAG]Export credentials as KEY=VALUE for environment injection.
Example:
eval $(uv run vault env --tag openai)
echo $OPENAI_API_KEY # Now available
vault audit [--last N]View recent audit log entries.
vault expiring [--days N]Check for credentials expiring within N days (default: 7).
vault rotate KEY_NAME [NEW_VALUE]Replace a credential with a new value (preserves tags/metadata).
# Tavily search skill
eval $(uv run vault env --tag tavily)
uv run scripts/search.py "OpenClaw release date"
from lib.store import Store
store = Store()
# Assumes vault is unlocked by user beforehand
api_key = store.get("TAVILY_API_KEY")
# HEARTBEAT.md
Check if vault is locked. If so, prompt user to unlock before running daily checks.
vault lock when not actively using credentialsvault expiring to track upcoming expirationsvault audit periodically~/.openclaw/vault/vault unlock stores decryption key until vault lockRun uv run vault unlock and enter your master password.
Double-check your password. If forgotten, you'll need to reinitialize (losing all credentials).
Run uv run vault init to create a new vault.
Session file is cleared on vault lock, but not automatically on reboot. Run vault lock explicitly.
uv run pytest
See tests/test_roundtrip.py for examples.
MIT-0 (public domain equivalent)