Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

HashiCorp Vault CLI

$ vault Official High Risk
HashiCorp · Security & Secrets · BSL-1.1 · macos / linux / windows

vault 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.

FCRS-1.0 Score
83 /100
Good
Medium Confidence
Zero-Friction Install
brew install hashicorp/tap/vault
CLI vs MCP Decision CLI Preferred vs MCP

vault CLI offers complete -format=json and -field= coverage across every secret engine without building custom MCP schemas.

Agent-Readiness Checklist

✓ JSON Output
✓ Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 23 / 25

Supports -format=json (VAULT_FORMAT=json), -field=, vault path-help, and headless VAULT_TOKEN env auth.

  • Global -format=json and -field= projection flags
Trust & Safety 16 / 25

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 on delete/destroy
Setup & Portability 13 / 15

Single Go binary via HashiCorp tap (brew), official Apt/Yum repos, and downloads.

  • Static Go binary across macOS, Linux, and Windows
Utility & Efficiency 13 / 15

Covers KV, dynamic DB leases, transit KMS, and PKI from one uniform path-based API.

  • Unified REST-mapped CLI across all Vault secret engines
Maintenance & Lineage 9 / 10

Official HashiCorp binary (note 2023 switch from MPL-2.0 to BSL-1.1 license).

  • First-party hashicorp/vault upstream
Docs & Verifiability 9 / 10

Extensive docs plus built-in vault path-help self-description.

  • Online command docs and runtime path-help introspection

Security, Auth & Guardrails

Auth Modes
Env API Key Config File Service Account OAuth Browser
Credential Storage

Reads VAULT_ADDR and VAULT_TOKEN env vars, or caches token in ~/.vault-token after vault login.

Side Effects
Read-Only Local Write Remote Write Destructive
Cost & Quotas

CLI is free (BSL-1.1); Vault Enterprise / HCP Vault Dedicated have commercial tiers.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# 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

Inspect Vault seal status and active token metadata
vault status -format=json && vault token lookup -format=json

Verifies cluster health and checks token policies/TTL without dumping secret payloads.

List KV secret paths and version metadata without reading values
vault kv metadata get -format=json secret/app/config

Reads version history and custom metadata without exposing plaintext secret data.

Controlled Writes & Previews

Write a non-sensitive config key with Check-And-Set (-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) and vault kv metadata get safe inspection.
  • + Built-in vault path-help documents mounted secret engine endpoints dynamically.

Caveats & Pitfalls

  • ! Running vault kv get prints raw secret values into stdout unless policies restrict access.
  • ! Licensed under BSL-1.1 (source-available, not OSI open source).

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI