Arcjet shares how they designed their CLI in Go to serve both human developers and AI agents safely. Key decisions include treating commands and flags as a stable API contract (additive-only changes after 1.0), disabling fuzzy command suggestions to avoid agent confusion, using distinct exit codes and structured JSON errors on stderr, validating inputs locally before network calls, and implementing a confirmation envelope protocol for mutations instead of interactive prompts. The CLI also auto-detects TTY vs non-TTY to switch between human-friendly tables and machine-readable JSON output, supports token-based auth for headless environments, and shares the same domain model as their MCP server. The post frames CLIs as agent APIs that require the same rigor as HTTP APIs.