A developer maps out six design rules for CLIs that humans and AI agents can both use
yujiezha · reddit · 2026-07-21
A builder breaks down what changes when a CLI has to work for both humans and AI agents running through a bash tool.
- Use a compiled single-binary language to avoid runtime dependencies in unpredictable agent environments.
- Prefer device-flow auth over localhost OAuth redirects, and split polling so it doesn’t block the agent loop.
- Default to clean JSON for non-TTY output, send logs to stderr, add --dry-run, and use structured exit codes with next-step hints.
- Provide a flat companion skill doc so the agent can learn the CLI without brute-forcing --help.
- Keep install paths simple, and tighten security with least-privilege scopes, keychain storage, device-bound tokens, and filtering dangerous characters.
More from coding & agent
- TWSE MCP Server brings Taiwan stock data into natural-language workflows — modelcontextprotocol · 2026-07-21
- The hardest part of agent execution may be permissions, approvals and failure handling — marcelk231 · 2026-07-21
- Business chatbots should add RAG only when answers depend on company-specific documents — recro69 · 2026-07-21
- A privacy email provider is building email for AI agents, with JMAP, PoW signups and 2,000 accounts — Atomic_Ke · 2026-07-21
- Open-source PenEcho AI whiteboard now renders interactive animated explanations — Civil-Direction-6981 · 2026-07-21
- AI agents are making full UI specs obsolete, so teams should build a “baby” app first — haltakov · 2026-07-21