cli-developer

Build command-line interfaces with argument parsing, prompts, and shell completions.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/jsdfhasuh/emosonic --skill cli-developer-jsdfhasuh
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cli-developer
Source: https://github.com/jsdfhasuh/emosonic/tree/main/.agents/skills/cli-developer
Command: npx skills add https://github.com/jsdfhasuh/emosonic --skill cli-developer-jsdfhasuh

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It helps you design and implement CLI tools that feel consistent and polished, while avoiding common UX, validation, and performance pitfalls that frustrate users and break automation.

Core Features & Use Cases

  • Command UX design: Define a clear command hierarchy, arguments, flags, help text, and error messages that users can act on.
  • Interactive + non-interactive behavior: Support prompts for local use while safely failing fast in CI/CD or when stdin is not suitable for interaction.
  • Developer experience upgrades: Add shell completions, progress indicators/spinners, consistent output conventions, and graceful SIGINT handling.

Quick Start

Use the cli-developer skill to design a CLI subcommand with well-structured flags, interactive prompts for local runs, fast validation with clear non-zero exit codes, and shell completions for bash, zsh, and fish.

Frequently Asked Questions about cli-developer

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

FAQPage Schema
How do I design a CLI that supports both interactive prompts and non-interactive CI safety?

To design a CLI with interactive prompts and non-interactive CI safety, implement stdin detection to trigger interactive prompts locally while failing fast in CI/CD environments when stdin is unsuitable for interaction.

What's the best way to structure argument parsing and subcommands for a developer tool?

The best way to structure argument parsing and subcommands is to define a clear command hierarchy with well-structured flags, fast validation, clear non-zero exit codes, and actionable stderr error messages.

How does graceful SIGINT handling work in command-line interfaces?

Graceful SIGINT handling in command-line interfaces works by intercepting interruption signals to terminate ongoing processes cleanly, ensuring consistent output behavior and preventing data corruption when users cancel operations.

Can I add shell completions for bash, zsh, and fish to my custom CLI tool?

Yes, you can add shell completions for bash, zsh, and fish to your custom CLI tool by implementing completion scripts that integrate with the shell environment to provide command and flag suggestions.

Why does my CLI break automation when piped to stdout?

Your CLI breaks automation when piped to stdout because correct output behavior requires suppressing progress indicators and spinners in piped mode, ensuring only structured data is sent to standard output.

What are the performance expectations for fast startup time in command-line tools?

Performance expectations for fast startup time in command-line tools require minimizing initialization overhead and lazy-loading dependencies so the CLI executes commands instantly without noticeable delay.