cli-design
CLI Design Guidelines
Condensed from clig.dev — an open-source guide to writing better command-line programs, updating UNIX principles for the modern day.
When reviewing or building a CLI, work through each section below as a checklist. The examples are as important as the rules — they show what good looks like.
Core Philosophy
- Human-first design — If a command is used primarily by humans, design for humans first. Shed the baggage of machine-first UNIX conventions where they hurt usability.
- Simple parts that work together — Composability matters. Respect stdin/stdout/stderr, exit codes, signals, and line-based text. Use JSON when structure is needed. Your software will become a part in a larger system — your only choice is whether it will be a well-behaved part.
- Consistency across programs — Follow existing CLI conventions. Users have muscle memory. Break convention only with care and good reason. When convention would compromise usability, it might be time to break with it — but make the decision deliberately.
- Say just enough — A command hanging silently for minutes is as bad as dumping pages of debug output. Both leave the user confused. Clarity over volume.
- Ease of discovery — Comprehensive help, lots of examples, suggest next commands, suggest fixes on errors. Steal ideas from GUIs. Remember-and-type and see-and-point are not mutually exclusive.
- Conversation as the norm — CLI interaction is conversational. Users learn through trial-and-error, multi-step workflows (multiple
git adds thengit commit), exploration (cdandlsto understand a directory), and dry-runs before real runs. Guide users through the conversation — suggest corrections, show intermediate state, confirm before scary actions. At best, it's a pleasant exchange that speeds them on their way. At worst, it's hostile and makes them feel stupid. - Robustness — Both objective (handle unexpected input gracefully, be idempotent) and subjective (feel solid, not flimsy). Keep users informed, explain common errors, don't print scary stack traces. Simplicity breeds robustness.
- Empathy — Give users the feeling you're on their side, that you want them to succeed, that you've thought carefully about their problems. Delight means exceeding expectations at every turn.
- Chaos — The terminal is a mess. Inconsistencies are everywhere. Yet this chaos has been a source of power — few constraints means all manner of invention. Sometimes you should break the rules. Do so with intention and clarity of purpose. "Abandon a standard when it is demonstrably harmful to productivity or user satisfaction." — Jef Raskin
The Basics
More from michaelliv/dotskills
slack-cli
Interact with Slack from the command line. Send messages, read channel history, list channels and users, upload files, manage reminders, and more. Use when the user wants to communicate with Slack, check messages, or automate Slack workflows.
32jira-cli
Interact with Atlassian Jira from the command line. Create, update, and search issues, manage sprints and epics, transition statuses, and more. Use when the user wants to work with Jira tickets, check sprint progress, or automate project workflows.
8thinktank
Simulate an expert panel discussion on a topic. Suggests 3 relevant experts/personas based on context and has them debate approaches, trade-offs, and arrive at recommendations. Use when brainstorming, exploring design decisions, or wanting multiple expert perspectives on a problem.
6handoff
Generate a prompt for a fresh conversation to continue the current implementation. Use when hitting context limits, ending a session, or needing to hand off work to another agent/conversation.
1issue-plan
Break a design goal into detailed, dependency-ordered GitHub issues. Use when the user has a feature idea, architectural change, or refactor and wants a structured plan with issues ready for sprint execution. Triggers include "plan this", "break this down", "create issues for this", or presenting a design/architecture to implement.
1issue-sprint
Rapid iteration on GitHub issues — prioritize, create worktrees, generate prompts for subagents, review PRs, merge, repeat. Use when the user wants to work through multiple issues quickly, says "let's sprint", "batch these issues", or wants to parallelize work across multiple agents.
1