What problem does it solve?
Engineers and product teams often rush to ship CLIs that feel inconsistent, opaque, or fragile, so this guide captures human-first philosophies and best practices for command structure, output, error handling, configuration, and extensibility before code is written.
Core Features & Use Cases
- Command structure templates: Stick to noun-verb patterns, limit nesting to two levels, favor descriptive flags, and ensure every flag has a long form and consistent global flags.
- Output, help, and UX guidelines: Detect TTYs, route data to stdout while keeping messages on stderr, support json/llm formats, respect NO_COLOR, lead with examples in help, and provide next steps plus typo suggestions.
- Error, interactivity, and robustness playbooks: Use namespaced error codes, define exit-code semantics, avoid stack traces, honor --no-input/--yes, confirm destructive actions, close gaps around signals, and keep performance visible within 100ms.
- Configuration, auth, testing, distribution, and extensibility rules: Follow XDG precedence, accept tokens via env/config, outline testing and release checklists, and adopt plugin/alias naming conventions that match established CLI ecosystems.
- Use Case: When reviewing an existing CLI or designing a new sync tool, apply these rules to ensure every command feels conversational, predictable, and safe across desktop and mobile contexts.
Quick Start
Ask the skill to audit your CLI prototype, tighten command structure, output, and error handling, and report usability fixes.