
Cli Design
This is a complete design system for building CLIs that agents can actually use. Every command returns structured JSON with HATEOAS-style next_actions arrays that tell the agent what to run next, using POSIX templates with pre-filled context values. No plain text, no tables, no --json flags. The envelope format is strict (ok/command/result/next_actions for success, plus error/fix for failures) and backed by Effect CLI with Bun. Output is context-protecting by default, auto-truncating logs and large responses to avoid blowing up token budgets. Use this when building new CLIs or adding commands to existing ones like joelclaw or slog. The opinionated constraints make it narrow but extremely practical for agentic workflows.
- skills.sh installs
- 149
- GitHub stars
- 65
- last updated
- Aug 21, 2026
Install
$ npx -y skills add joelhooks/joelclaw --skill cli-design --agent claude-codeInstalls into .claude/skills of the current project.
Files
Agent-First CLI Design
CLIs in this system are agent-first, human-distant-second. Every command returns structured JSON that an agent can parse, act on, and follow. Humans are welcome to pipe through jq.
Core Principles
1. JSON always
Every command returns JSON. No plain text. No tables. No color codes. Agents parse JSON; they don't parse prose.
# This is the ONLY output format
joelclaw status
# → { "ok": true, "command": "joelclaw status", "result": {...}, "next_actions": [...] }
No --json flag. No --human flag. JSON is the default and only format.
2. HATEOAS — every response tells you what to do next
Every response includes next_actions — an array of command templates the agent can run next. Templates use standard POSIX/docopt placeholder syntax:
<placeholder>— required argument[--flag <value>]— optional flag with value[--flag]— optional boolean flag- No
paramsfield — literal command (run as-is) paramspresent — template (agent fills placeholders)params.*.value— pre-filled from context (agent can override)params.*.default— value if omittedparams.*.enum— valid choices
Sponsors
Details
- Repository
- github.com/joelhooks/joelclaw
- Categories
- DevOps & CI/CD, AI & Agent Building, Design & UI/UX, CLI & Terminal
- First seen
- Jun 3, 2026