What problem does it solve?
This Skill simplifies the creation of powerful and type-safe command-line interfaces (CLIs) in TypeScript, eliminating the boilerplate and complexity often associated with argument parsing, subcommand management, and plugin integration. It ensures your CLI tools are robust, maintainable, and easy to use.
Core Features & Use Cases
- Type-Safe Argument Parsing: Define arguments with rich types (string, number, boolean, enum, positional, custom) and get automatic type inference, reducing runtime errors.
- Subcommand & Lazy Loading: Organize complex CLIs with subcommands and improve performance by lazy loading heavy modules only when needed.
- Extensible Plugin System: Easily add global options, decorate command execution, and extend the command context with custom functionality through a powerful plugin API.
- Use Case: Develop a new CLI tool for managing project configurations, including subcommands for
create, update, and delete, with robust argument validation and clear help messages.
Quick Start
Create a new gunshi-cli command in TypeScript that takes a --name argument (string, required) and a --times argument (number, default 1), then prints a greeting message.