CLI Command Wiring

Wire TypeScript CLI commands into cli-entry.ts routing and help text.

209|27|Updated Mar 10, 2026
One-click install
npx skills add https://github.com/dotnet/maui-labs --skill cli-command-wiring-dotnet
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: CLI Command Wiring
Source: https://github.com/dotnet/maui-labs/tree/main/src/Comet/.copilot/skills/cli-wiring
Command: npx skills add https://github.com/dotnet/maui-labs --skill cli-command-wiring-dotnet

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you fix a common CLI bug where a command implementation exists but is never reachable because it is missing from the CLI entry-point routing and help text.

Core Features & Use Cases

  • Routing verification: Confirms new command modules are added to the main() dispatch logic in cli-entry.ts so the command can actually run.
  • Help text consistency: Ensures the new command appears under the Commands: section with correct usage so users can discover it.
  • Wiring pattern guidance: Covers different command types (standard commands, placeholder commands, utility/check modules, and subcommands) and the correct wiring approach for each.

Quick Start

Tell your AI to review a new command foo and then produce the exact cli-entry.ts wiring and help-text lines needed so maui squad foo dispatches correctly.

Frequently Asked Questions about CLI Command Wiring

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

FAQPage Schema
Why is my TypeScript CLI command not found when invoked from the entry point?

Your TypeScript CLI command is not found because the new command module is missing from the main() dispatch routing in cli-entry.ts. You must add lazy dynamic imports and wire the args-to-run function so the entry point can resolve it.

How do I add a new command to a TypeScript CLI dispatch logic?

To add a new command to a TypeScript CLI, implement the module in the commands directory, then update the main() routing in cli-entry.ts to include lazy dynamic imports and map the incoming arguments to the run function.

How do I update the CLI help text to show a newly added command?

To update the CLI help text, add the new command to the Commands help section in cli-entry.ts. Include the correct usage syntax and description so users can discover and properly invoke the command.

Does command routing in a TypeScript CLI require dynamic imports?

Yes, command routing in this TypeScript CLI requires lazy dynamic imports within the main() function. This ensures the command modules are loaded on demand when invoked, keeping the entry point efficient.

How do I wire different command types like subcommands or utility modules in a CLI?

Wiring different command types requires applying the correct routing approach for standard commands, placeholder commands, utility modules, and subcommands in cli-entry.ts. Each type needs specific args-to-run function wiring to dispatch correctly.