What problem does it solve?
Webiny projects often need custom automation such as data migrations, code generators, deployment scripts, or health checks, but the default CLI does not include these project-specific commands. This Skill shows how to extend the Webiny CLI with your own typed commands using the CliCommandFactory pattern.
Core Features & Use Cases
- Custom Command Definition: Implement CliCommandFactory.Interface with a name, description, examples, typed params, and an async handler.
- Terminal Output via Ui Service: Inject the Ui service to print info, success, warning, and error messages with consistent formatting.
- Registration in webiny.config.tsx: Register commands declaratively with the <Cli.Command> component, including the required .ts file extension.
- Use Case: Build a data migration command that seeds CMS content, then run it with
yarn webiny my-custom-command "World" like any built-in CLI command.
Quick Start
Ask the AI to create a custom Webiny CLI command using CliCommandFactory and register it in webiny.config.tsx.