use Roots\Acorn\Sage\SageServiceProvider;
use WP_CLI;
class MyCoolProvider extends SageServiceProvider
{
public function boot(): void {
if (defined('WP_CLI') && WP_CLI) {
WP_CLI::add_command('my_command_name', $this);
}
}
public function test_command() {
WP_CLI::log('its me');
}
}