HashiCorp Vault CLI
$ vault Official High Riskvault manages dynamic secrets, KV stores, encryption transit keys, and PKI certificates against HashiCorp Vault clusters. Virtually every command supports -format=json (VAULT_FORMAT=json), while vault kv metadata get lets agents inspect versions without reading secret values.
brew install hashicorp/tap/vault vault CLI offers complete -format=json and -field= coverage across every secret engine without building custom MCP schemas.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Supports -format=json (VAULT_FORMAT=json), -field=, vault path-help, and headless VAULT_TOKEN env auth.
- Global
-format=jsonand-field=projection flags
Strong ACL/policy model and -cas optimistic locking, but vault kv get / read emits raw secrets to stdout if permitted by token.
- Plaintext secret exposure risk on
kv get; high blast radius ondelete/destroy
Single Go binary via HashiCorp tap (brew), official Apt/Yum repos, and downloads.
- Static Go binary across macOS, Linux, and Windows
Covers KV, dynamic DB leases, transit KMS, and PKI from one uniform path-based API.
- Unified REST-mapped CLI across all Vault secret engines
Official HashiCorp binary (note 2023 switch from MPL-2.0 to BSL-1.1 license).
- First-party
hashicorp/vaultupstream
Extensive docs plus built-in vault path-help self-description.
- Online command docs and runtime
path-helpintrospection
Security, Auth & Guardrails
Reads VAULT_ADDR and VAULT_TOKEN env vars, or caches token in ~/.vault-token after vault login.
CLI is free (BSL-1.1); Vault Enterprise / HCP Vault Dedicated have commercial tiers.
# HashiCorp Vault CLI Agent Rules - Set `VAULT_FORMAT=json` (or pass `-format=json`); use `vault kv metadata get` instead of `kv get` whenever only existence/versions matter. - Never print `vault kv get` output into LLM transcripts for production paths; scope `VAULT_TOKEN` to read-only metadata or dev mounts.
Agent-Ready Command Recipes
Safe Read-Only Queries
vault status -format=json && vault token lookup -format=json
Verifies cluster health and checks token policies/TTL without dumping secret payloads.
vault kv metadata get -format=json secret/app/config
Reads version history and custom metadata without exposing plaintext secret data.
Controlled Writes & Previews
-cas) vault kv put -cas=0 -format=json secret/dev/feature-flag enabled=true
Uses -cas=0 so creation fails safely if the secret path already exists.
Strengths for Agents
- + Universal
-format=json(VAULT_FORMAT=json) andvault kv metadata getsafe inspection. - + Built-in
vault path-helpdocuments mounted secret engine endpoints dynamically.
Caveats & Pitfalls
- ! Running
vault kv getprints raw secret values into stdout unless policies restrict access. - ! Licensed under BSL-1.1 (source-available, not OSI open source).