Add Custom CLI Commands
Shopware CLI commands are based on Symfony Console. This means that creating custom commands in Shopware plugins follows the standard Symfony approach.
To add a custom command in a Shopware plugin, you must register it as a service in your plugin’s src/Resources/config/services.xml and tag it with console.command:
html
<services>
<!-- ... -->
<service id="Swag\BasicExample\Command\ExampleCommand">
<tag name="console.command"/>
</service>
</services>
<!-- ... -->Commands registered as services in a Shopware plugin are automatically available via bin/console.