/install hashicorp-vault
HashiCorp Vault CLI
Use the vault CLI for Vault work. Prefer read-only inspection first, then confirm before writing secrets, changing auth methods, enabling engines, or editing policies.
Quick checks
vault version
vault status
vault auth list
vault secrets list
vault token lookup
If VAULT_ADDR is missing, set it first:
export VAULT_ADDR='https://vault.example.com'
For a local lab Vault, an example endpoint is:
export VAULT_ADDR='http://192.168.1.101:8200'
vault status
curl -s "$VAULT_ADDR/v1/sys/health"
Notes:
- Replace the example address with your actual Vault endpoint.
- Some local test deployments use plain HTTP instead of HTTPS.
- Prefer reading tokens from a local file or environment variable instead of echoing them in chat.
Verify auth before assuming a path is missing:
vault token lookup
vault kv get secret/my-app
Read secrets
For KV v2 paths, use vault kv commands instead of raw API-style paths.
vault kv get secret/my-app
vault kv get -field=password secret/my-app
vault kv list secret/
If output is unclear, use JSON:
vault kv get -format=json secret/my-app
vault secrets list -format=json
Helper scripts
This skill includes simple wrappers that auto-load local settings:
{baseDir}/scripts/vault-list.sh secret/openclaw
{baseDir}/scripts/vault-get.sh secret/openclaw/openclaw-test
{baseDir}/scripts/vault-put.sh secret/openclaw/demo status=ok source=openclaw
Behavior:
- Defaults
VAULT_ADDRtohttp://192.168.1.101:8200 - Loads
VAULT_TOKENfrom~/.vault-tokenif not already exported - Uses
vault kvcommands for the common KV v2 workflow
Write secrets
Confirm before overwriting or deleting anything.
vault kv put secret/my-app username=app password='s3cr3t'
vault kv patch secret/my-app password='rotated'
Prefer patch when updating a subset of keys on KV v2.
Policies and mounts
Inspect first:
vault policy list
vault policy read my-policy
vault secrets list -detailed
Change only with explicit user intent:
vault policy write my-policy ./policy.hcl
vault secrets enable -path=secret kv-v2
vault secrets tune -max-versions=10 secret/
Authentication helpers
Common login flows:
vault login
vault login -method=userpass username=\x3Cuser>
vault write auth/approle/login role_id=\x3Crole_id> secret_id=\x3Csecret_id>
When troubleshooting auth, inspect enabled auth backends and token details first:
vault auth list -detailed
vault token lookup
Troubleshooting workflow
- Check
vault statusandVAULT_ADDR. - Check auth with
vault token lookupor the intended login flow. - Confirm mount names with
vault secrets list. - For KV access, verify whether the engine is KV v1 or KV v2 before choosing commands.
- Prefer
-format=jsonwhen output will be parsed or compared. - Read
references/kv-and-troubleshooting.mdfor command patterns and common errors when the task is non-trivial.
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install hashicorp-vault - 安装完成后,直接呼叫该 Skill 的名称或使用
/hashicorp-vault触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
HashiCorp Vault 是什么?
Work with HashiCorp Vault using the `vault` CLI for authentication checks, KV secret reads and writes, listing paths, enabling and tuning secrets engines, po... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 288 次。
如何安装 HashiCorp Vault?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install hashicorp-vault」即可一键安装,无需额外配置。
HashiCorp Vault 是免费的吗?
是的,HashiCorp Vault 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
HashiCorp Vault 支持哪些平台?
HashiCorp Vault 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 HashiCorp Vault?
由 jimpang8(@jimpang8)开发并维护,当前版本 v0.2.1。