create-cli

Design CLI command trees, flags, help text, and output contracts.

2|Updated Dec 8, 2018
One-click install
npx skills add https://github.com/indykish/dotfiles --skill create-cli-indykish
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-cli
Source: https://github.com/indykish/dotfiles/tree/main/skills/create-cli
Command: npx skills add https://github.com/indykish/dotfiles --skill create-cli-indykish

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Designing consistent, human-first, script-friendly CLI surfaces that are easy to learn, reason about, and evolve.

Core Features & Use Cases

  • Command tree design: plan subcommands and argument structure for clarity and composability.
  • Flags and options guide: standardize long/short flags, defaults, and help text.
  • Output & error contracts: specify stdout vs stderr, formats, and exit codes for automation.
  • Use Case: example: refactor an existing tool to provide --json output and a --no-input mode for non-interactive sessions.

Quick Start

Provide a compact CLI spec that includes a command tree, an args/flags table, and 5–10 example invocations.

Frequently Asked Questions about create-cli

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What is CLI surface area design and why does it matter for script-friendly tools?

CLI surface area design defines command trees, flags, outputs, and exit codes so interfaces are easy to learn and reuse. It ensures tools remain human-first while supporting reliable automation and script execution.

How do I design a CLI spec with subcommands and global flags?

Design a CLI spec by mapping a command tree, standardizing long and short flags, and defining output rules. Include a USAGE synopsis, subcommand flags, and 5 to 10 example invocations to clarify behavior.

How should I structure stdout, stderr, and exit codes for CLI automation?

Structure CLI automation outputs by separating stdout for data and stderr for errors. Define explicit error codes and output formats, such as JSON, to ensure scripts can parse responses and handle failures predictably.

What is the best way to refactor an existing CLI tool for non-interactive sessions?

Refactor CLI tools for non-interactive sessions by adding a --no-input mode and structured --json output. Update the CLI spec to document environment and config precedence, ensuring safe, automated execution.

Can I use this CLI design approach for early-stage command tree planning?

Yes, this CLI design approach applies to early-stage specs, refactoring projects, and design reviews. It enforces a compact spec covering command trees, argument surfaces, help text, and safety behavior for clear planning.

When should I not use a compact CLI spec for interface design?

Avoid a compact CLI spec when designing graphical interfaces or tools not requiring command-line automation. It is specifically tailored for human-first, script-friendly CLI surfaces involving flags, subcommands, and terminal outputs.