#[CliCommand]

Attribute on classes.

use Saij\WpAppFramework\WpCli\CliCommand;

Marks a service as a group of WP-CLI commands: its #[CliSubcommand] methods become wp {namespace} {name} {subcommand}, where the namespace is the one of the theme or plugin (extra.wp-app-framework.namespace).

The name starts with a lowercase letter and contains lowercase letters, digits and "-". The description is the one-line summary in wp help (at most 80 characters).

Arguments

#[CliCommand(string $name, string $description)]
ParameterTypeDefaultDescription
namestringrequiredThe name of the command group, wp {namespace} {name}; starts with a lowercase letter and contains lowercase letters, digits and "-"; unique within the theme or plugin.
descriptionstringrequiredThe one-line summary in wp help: not empty, no line break, at most 80 characters.