CLI for reading and writing etcd keys, checking cluster health, and managing members, auth, leases, and snapshots.
$brew install etcd
Agent Compatibility
JSON Output
Agent Skill
MCP Support
AI Analysis
etcdctl is the upstream CLI for interacting with and administering etcd v3 clusters over the network. It covers both application-facing key-value operations and operator tasks such as member management, authentication, health checks, snapshots, and diagnosis.
What It Enables
- Read, write, delete, and transactionally update keys, query ranges and revisions, watch changes, and manage leases from the shell.
- Inspect endpoint health, status, and hash consistency, manage cluster membership, take backend snapshots, and run diagnosis or performance checks.
- Enable authentication, manage users and roles, and use built-in distributed lock or leader-election helpers backed by etcd.
Agent Fit
- Most commands are direct subcommands with flags and exit codes against a live cluster, so they fit inspect, change, and verify loops once endpoints and TLS or auth settings are known.
- Machine-readable output is real through global
--write-outmodes including JSON, fields, protobuf, and table, which makes endpoint, member, and many RPC-backed responses script-friendly. - Automation fit is mixed by command: many paths are non-interactive, but watches, lease keep-alives, locks, elections, and interactive
txnsessions are streaming or session-oriented, and upstream only guarantees compatibility for the defaultsimpleoutput format.
Caveats
- Useful automation requires a reachable etcd cluster plus the right endpoint, TLS, and authentication configuration.
- JSON output exists, but the v3 README explicitly says backward compatibility is only guaranteed for normal commands in
simpleformat.