HashiCorp Consul
$ consul Official High RiskHashiCorp Consul CLI (consul) inspects and manages Consul service catalogs, health checks, KV stores, ACLs, and service-mesh configs, emitting JSON on kv export, config read, and acl ... -format=json under CONSUL_HTTP_TOKEN auth.
brew install hashicorp/tap/consul consul talks directly to the local or remote Consul HTTP agent via a fast single Go binary.
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
kv export, config read, and acl subcommands emit JSON, while older commands like members and catalog services only emit plain text.
- JSON on
kv export,config read, andacl -format=json; plain text onmembers
Fine-grained ACL tokens (CONSUL_HTTP_TOKEN) protect reads/writes cleanly, though recursive KV deletes carry high risk.
- Supports
CONSUL_HTTP_TOKENACL scoping; lacks universal--dry-run
Single static Go binary via Homebrew or official downloads across macOS, Linux, and Windows.
- Single Go binary via
brew install hashicorp/tap/consul
Useful for quick operator checks, though Consul's REST API (/v1/*) is more consistent for pure JSON automation.
- Quick operator CLI; REST API offers fuller JSON parity
Official hashicorp/consul repository maintained under BSL-1.1.
- Official
hashicorp/consulrepository
Well-documented HashiCorp Developer CLI commands and --help.
- Official docs at developer.hashicorp.com/consul
Security, Auth & Guardrails
Reads CONSUL_HTTP_ADDR, CONSUL_HTTP_TOKEN, CONSUL_NAMESPACE, and TLS env vars (CONSUL_CACERT) from the shell environment.
CLI binary is free under BSL-1.1; runs against your own Consul cluster.
# Consul CLI Agent Rules - Verify `CONSUL_HTTP_ADDR` and use a read-only `CONSUL_HTTP_TOKEN` during investigation. - Remember `consul kv export` returns base64-encoded values and `members` emits plain text (use `/v1/catalog/...` HTTP API if full JSON is needed). - Never run `consul kv delete -recurse` or `consul force-leave` without explicit human approval.
Agent-Ready Command Recipes
Safe Read-Only Queries
consul kv export app/config/
Exports matching KV keys and base64-encoded values as a JSON array.
consul config read -kind service-defaults -name web
Prints the active Consul configuration entry as JSON.
Strengths for Agents
- + Fast single Go binary with clean
CONSUL_HTTP_TOKENACL scoping. - +
consul kv exportandconsul config reademit clean JSON natively. - + Supports TLS mTLS client configuration via standard
CONSUL_*env vars.
Caveats & Pitfalls
- !
-format=jsonis not supported on older commands likeconsul membersorconsul catalog services. - ! Lacks a built-in
--dry-runflag forkv put,kv delete, orconfig write.