scaffold_wp_cli_command
Create a WP-CLI command class with arguments, synopsis, progress bar support, and automatic ServiceProvider registration.
Instructions
Generate a WP-CLI command class with arguments, synopsis, progress bar support, and ServiceProvider registration.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"rootNamespace": "<rootNamespace>",
"commandName": "<commandName>",
"textDomain": "<textDomain>",
"description": "<description>"
},
"name": "scaffold_wp_cli_command"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rootNamespace | Yes | Plugin root namespace | |
| commandName | Yes | Command name (e.g., "sync-products") | |
| parentCommand | No | Parent command namespace (default: plugin text domain) | |
| textDomain | Yes | Plugin text domain | |
| description | Yes | Command description | |
| args | No | Arguments as "name:type:description" (e.g., "batch_size:int:Items per batch,dry_run:flag:Simulate only") |