# cli-guidelines/cli-guidelines

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/cli-guidelines-cli-guidelines).**

3,677 stars · 121 forks · CSS · CC-BY-SA-4.0

## Links

- GitHub: https://github.com/cli-guidelines/cli-guidelines
- Homepage: https://clig.dev
- awesome-repositories: https://awesome-repositories.com/repository/cli-guidelines-cli-guidelines.md

## Description

This project is a set of design guidelines and a usability framework for building modern command-line interfaces based on updated Unix principles. It serves as a technical reference and manual for creating composable terminal applications that prioritize modularity and text-based communication.

The guidelines cover human-centric design rules for managing interactive prompts, output formatting, and user configuration. It provides a standards-based approach to terminal application ergonomics, ensuring tools remain intuitive for humans while remaining functional for automation.

The framework addresses several core capability areas, including argument and flag management, the organization of complex functionality via subcommands, and the implementation of structured error reporting. It also defines methods for coordinating tool settings through a hierarchy of flags, environment variables, and configuration files.

The documentation includes guidance on producing both human-readable and machine-parseable output formats, handling process signals, and implementing comprehensive help systems.

## Tags

### User Interface & Experience

- [Command Line Interface Design](https://awesome-repositories.com/f/user-interface-experience/command-line-interface-design.md) — Provides a comprehensive set of usability guidelines for designing human-centric and composable command-line interfaces. ([source](https://clig.dev/))
- [CLI](https://awesome-repositories.com/f/user-interface-experience/ui-architecture/design-utilities/design-guidelines/cli.md) — Defines a comprehensive set of standards and best practices for building modern, human-centric command-line interfaces.
- [Terminal Application Ergonomics](https://awesome-repositories.com/f/user-interface-experience/terminal-application-ergonomics.md) — Guides the improvement of user experience in terminal tools through consistent argument handling and optimized output formatting.
- [Usability Frameworks](https://awesome-repositories.com/f/user-interface-experience/ui-architecture/command-line-interface-development/cli-frameworks/usability-frameworks.md) — Offers a framework of human-centric design rules for managing interactive prompts, output formatting, and configuration.

### Part of an Awesome List

- [CLI and Argument Parsing](https://awesome-repositories.com/f/awesome-lists/devtools/cli-and-argument-parsing.md) — Standardizes the use of positional arguments and named flags with short and long versions. ([source](https://clig.dev/))
- [User-Facing Error Reporting](https://awesome-repositories.com/f/awesome-lists/devtools/error-handling/user-facing-error-reporting.md) — Provides methods for catching unexpected inputs to deliver grouped, actionable error messages to the user. ([source](https://clig.dev/))

### Development Tools & Productivity

- [Argument Parsing](https://awesome-repositories.com/f/development-tools-productivity/cli-command-frameworks/argument-parsing.md) — Establishes standards for mapping short and long flags to internal settings with consistent priority.
- [CLI Tooling Standards](https://awesome-repositories.com/f/development-tools-productivity/cli-tooling-standards.md) — Provides a technical reference for building robust CLI programs with consistent argument and error handling.
- [Modular Subcommand Integrators](https://awesome-repositories.com/f/development-tools-productivity/code-organization/modular-subcommand-integrators.md) — Guides the organization of complex functionality into modular, hierarchical subcommand structures. ([source](https://clig.dev/))
- [Command Line Interface Frameworks](https://awesome-repositories.com/f/development-tools-productivity/command-line-interface-frameworks.md) — Provides a structured approach and rules for building professional terminal applications.
- [Subcommand Structuring](https://awesome-repositories.com/f/development-tools-productivity/subcommand-registration/subcommand-parsers/subcommand-structuring.md) — Provides a framework for organizing complex functionality into a nested tree of noun-verb subcommands.
- [Tool Configuration Management](https://awesome-repositories.com/f/development-tools-productivity/tool-configuration-management.md) — Provides a framework for coordinating tool settings via flags, environment variables, and configuration files. ([source](https://clig.dev/))
- [Implementation Manuals](https://awesome-repositories.com/f/development-tools-productivity/command-line-references/implementation-manuals.md) — Serves as a technical reference for implementing consistent flag handling, subcommand structures, and error reporting.
- [Help & Support Systems](https://awesome-repositories.com/f/development-tools-productivity/help-support-systems.md) — Outlines how to implement detailed documentation and usage examples accessible via help flags. ([source](https://clig.dev/))
- [Interactive Prompts](https://awesome-repositories.com/f/development-tools-productivity/human-in-the-loop-interfaces/interactive-prompts.md) — Defines rules for designing interactive prompts that respect terminal sessions and automation flags. ([source](https://clig.dev/))
- [Interactive Prompt Detection](https://awesome-repositories.com/f/development-tools-productivity/interactive-input-interfaces/interactive-prompt-detection.md) — Describes how to detect TTY capabilities to enable interactive prompts for humans while disabling them for scripts.
- [Machine-Readable CLI Outputs](https://awesome-repositories.com/f/development-tools-productivity/machine-readable-cli-outputs.md) — Standardizes the production of structured, machine-readable output for programmatic consumption and automation. ([source](https://clig.dev/))

### Graphics & Multimedia

- [Terminal Interaction](https://awesome-repositories.com/f/graphics-multimedia/immersive-interactive-systems/user-interaction/terminal-interaction.md) — Improves user interaction with terminal tools through optimized output formatting and interactive prompting guidelines.

### Security & Cryptography

- [Configuration Hierarchy Loading](https://awesome-repositories.com/f/security-cryptography/file-based-configuration/local-configuration-files/configuration-hierarchy-loading.md) — Defines a prioritized resolution system for settings across command line flags, environment variables, and configuration files.

### Software Engineering & Architecture

- [Unix Philosophy](https://awesome-repositories.com/f/software-engineering-architecture/software-development-philosophies/unix-philosophy.md) — Provides documentation on creating composable tools based on the core Unix tenets of modularity and text-based communication.
- [Unix Tool Integration](https://awesome-repositories.com/f/software-engineering-architecture/unix-tool-integration.md) — Provides guidelines for designing tools that integrate seamlessly with the Unix ecosystem through composable output and signal handling.
- [CLI Design Manuals](https://awesome-repositories.com/f/software-engineering-architecture/cli-design-manuals.md) — Implements a technical reference for creating composable terminal applications that follow modularity principles.
- [CLI Execution Robustness](https://awesome-repositories.com/f/software-engineering-architecture/robust-implementation-patterns/cli-execution-robustness.md) — Guides the implementation of input validation, progress indicators, and timeouts for long-running CLI tasks. ([source](https://clig.dev/))

### System Administration & Monitoring

- [CLI Configuration Management](https://awesome-repositories.com/f/system-administration-monitoring/cli-configuration-management.md) — Implements a reliable system for managing tool settings using a priority hierarchy of configuration sources.

### Data & Databases

- [Output Format Rendering](https://awesome-repositories.com/f/data-databases/data-serialization-formats/data-formats/output-format-rendering.md) — Provides guidelines for rendering application output in both human-readable text and machine-parseable formats like JSON.

### Operating Systems & Systems Programming

- [Process Signal Management](https://awesome-repositories.com/f/operating-systems-systems-programming/process-signal-management.md) — Guides the interception of system interrupts to ensure clean shutdowns and managed background operation completion.
