This document maps the principles and patterns in this repository to their original sources, showing how we've synthesized best practices from industry leaders.
URL: https://clig.dev
Focus: Comprehensive modern CLI design principles
Key Contributions:
- Human-first design philosophy
- Composability and modularity principles
- Progressive disclosure pattern
- Robustness and error handling guidelines
- "Abandon a standard when it is demonstrably harmful" philosophy
URL: https://devcenter.heroku.com/articles/cli-style-guide
Focus: Technical implementation and conventions
Key Contributions:
- "CLI is for humans before machines" principle
- Naming conventions (topics as plural nouns, commands as verbs)
- Color usage and terminal detection patterns
- Output formatting (human vs machine-readable)
- Flag design preferences over positional arguments
URL: https://www.atlassian.com/blog/it-teams/10-design-principles-for-delightful-clis
Focus: User experience and delight
Key Contributions:
- Align with established conventions
- Build --help into the CLI
- Show progress visually
- Create a reaction for every action
- Craft human-readable error messages
- Support skim-readers
- Suggest the next best step
- Consider your options (prompting)
- Provide an easy way out
- Flags over args
URL: https://www.gnu.org/prep/standards/standards.html
Focus: Traditional UNIX philosophy and conventions
Key Contributions:
- Standard options (--help, --version)
- Exit code conventions
- Option parsing standards (getopt_long)
- Device-independence principle
- Stdout/stderr separation
Sources:
- Atlassian: "Align with established conventions" (#1)
- clig.dev: "Ease of discovery" and consistency principles
- GNU: Standard option conventions
Sources:
- Atlassian: "Craft human-readable error messages" (#5), "Suggest the next best step" (#7)
- clig.dev: "Empathy" principle, comprehensive error handling
- Heroku: Human-first output philosophy
Sources:
- GNU: Uniform option parsing and naming
- Heroku: Consistent naming conventions
- clig.dev: "Consistency across programs"
Sources:
- Heroku: "CLI is for humans before machines"
- clig.dev: Human-first design with machine-readable options
- Atlassian: Visual progress (#3), skim-reader support (#6)
- Subcommands: Git-style (popularized by Git, documented in Heroku guide)
- Resource-oriented: Kubernetes kubectl pattern
- Flag preferences: Heroku ("flags over args") and Atlassian (#10)
- Structured errors: clig.dev (human-friendly messages)
- Actionable messages: Atlassian (#5) and clig.dev
- Exit codes: GNU standards and POSIX conventions
- Progress indicators: Atlassian (#3)
- Color usage: Heroku (with NO_COLOR respect)
- Format detection: clig.dev and Heroku (TTY detection)
- Prompting: Atlassian (#8 "Consider your options")
- Confirmations: clig.dev (dangerous operations)
- Easy exit: Atlassian (#9)
When citing principles, use this format:
This principle derives from Heroku's "CLI is for humans before machines" philosophy,
combined with clig.dev's emphasis on human-first design.Or for inline attribution:
### Progress Indicators (via Atlassian #3)
Always show progress for operations lasting more than one second...All referenced materials are used in accordance with their licenses:
- clig.dev: Open source guidelines
- Heroku: Public developer documentation
- Atlassian: Published blog content
- GNU: Free documentation license
This attribution guide ensures proper credit while showing how we've synthesized and extended these principles for modern CLI design.