moai-domain-cli-tool

Coordinate Claude Code workflows by delegating tasks to specialized agents.

1.2k|214|Updated Sep 16, 2025
One-click install
npx skills add https://github.com/modu-ai/moai-adk --skill moai-domain-cli-tool
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: moai-domain-cli-tool
Source: https://github.com/modu-ai/moai-adk/tree/main/.claude/skills/moai-domain-cli-tool
Command: npx skills add https://github.com/modu-ai/moai-adk --skill moai-domain-cli-tool

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires Click, Typer, Rich, and includes examples (resource) and references (resource) components.

What problem does it solve?

Developing robust command-line interface (CLI) tools with proper argument parsing, help messages, and cross-platform compatibility can be intricate. This Skill provides best practices and guidance for building professional-grade CLI tools that are intuitive and maintainable.

Core Features & Use Cases

  • Argument Parsing: Guides on using libraries like Click or Typer for efficient command-line argument handling.
  • POSIX Compliance: Ensures CLI tools adhere to industry standards for consistent behavior across different shells.
  • User-Friendly Output: Provides patterns for clear help messages, progress indicators, and rich terminal output using libraries like Rich.
  • Use Case: When creating a new internal utility script, this Skill can help you design its command structure, implement robust argument validation, and generate comprehensive help documentation automatically.

Quick Start

Example: Basic CLI tool with Click (Python)

import click

@click.command() @click.option('--count', default=1, help='Number of greetings.') @click.argument('name') def hello(count, name): for x in range(count): click.echo(f"Hello {name}!")

if name == 'main': hello()

Frequently Asked Questions about moai-domain-cli-tool

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

FAQPage Schema
How do I build a CLI tool with argument parsing and help messages?

Build CLI tools using Click or Typer for efficient argument parsing, automatic help generation, and POSIX-compliant command structure. Both libraries handle validation and user-friendly output automatically, reducing boilerplate code significantly.

What's the best way to create user-friendly terminal output in Python?

Use Rich library to generate formatted terminal output with progress indicators, colors, and structured help messages. Rich handles cross-platform compatibility and makes CLI tools more intuitive for end users without manual formatting.

Can I use Click or Typer to validate command-line arguments automatically?

Yes. Both Click and Typer provide built-in argument validation, type checking, and constraint enforcement. They validate inputs before your command function runs, catching errors early and providing clear error messages to users.

How do I ensure my CLI tool works consistently across different shells and operating systems?

Follow POSIX compliance standards for CLI design and use cross-platform libraries like Click or Typer that handle shell differences. These libraries abstract platform-specific behavior, ensuring consistent command structure and argument handling across systems.

What should I consider when designing a new internal utility script?

Design the command structure first, implement robust argument validation using Click or Typer, and generate comprehensive help documentation automatically. This approach makes scripts maintainable, discoverable, and professional-grade from inception.

Do I need multiple libraries to build a complete CLI tool?

Click or Typer handles argument parsing and command structure; Rich enhances terminal output. Using both together creates polished, user-friendly CLI tools with minimal additional code, though either can work independently for simpler tools.