Design and implement CLI commands, subcommands, flags, and output following clig.dev best practices. Use when adding new CLI commands, designing command interfaces, improving help text, or reviewing CLI ergonomics.
Follow these guidelines when designing or implementing CLI interfaces.
-h shows concise help: usage line, one-line description, common flags, pointer to --help--help shows extended help: full flag/arg reference, examples, link to docs--json for structured output; scripts and tools depend on thisNO_COLOR env var, TERM=dumb, and --no-color flag--workspace foo) over positional arguments for clarity and extensibility--long and -s short forms for frequently-used flags-h, --help / -V, --version-v, --verbose / -q, --quiet-f, --force / -n, --dry-run-o, --output / -p, --portps, shell history, logs. Use interactive prompts or --key-file- to read from stdin or write to stdout where it makes senseworkspaces create, not create-workspace--no-input flag to disable all prompts (for scripts and CI)--force or interactive confirmationPrecedence (highest to lowest):
APPNAME_*)~/.config/appname/)Follow XDG Base Directory Specification. Never store secrets in env vars (leaks via logs, child processes, crash reports).
NO_COLOR, DEBUG, EDITOR, HTTP_PROXY, TERM, HOME, PAGER, TMPDIR--json in scripts so human output can evolve freelyFor the feature described in $ARGUMENTS: