Command Types
Shopware CLI is organized into three main command scopes that cover the most common development and maintenance workflows:
- Project commands: interact with your Shopware project (e.g., build, dump DB, or sync configuration)
- Extension commands: build and validate Shopware extensions
- Store commands: publish or update extensions in the Shopware Store
Automatic refactoring
Shopware CLI also includes an automatic refactoring tool for PHP, JavaScript, and Admin Twig files. It uses:
You can run it on an extension or a full project:
# Example: refactor an extension
shopware-cli extension fix /path/to/your/extension
# Example: refactor an entire project
shopware-cli project fix /path/to/your/projectAlways back up or version your code before running refactoring commands, as they will modify files in place. Learn more here.
Project commands
Work directly with your Shopware project to automate setup and maintenance tasks. Available commands include:
shopware-cli project create # Create a new Shopware 6 project
shopware-cli project dump # Dumps the Shopware database
shopware-cli project ci # Build Shopware in the CI
shopware-cli project sbom # Generate a CycloneDX SBOM from composer.lockDuring CI/CD: Use shopware-cli project ci to build and prepare your deployment artifact (dependencies, compiled theme, built assets). Then, use the Deployment Helper at deploy time to install Shopware, manage extensions, and run database migrations on the target environment.
Extension commands
Create, build, and validate Shopware extensions and prepare them for the Shopware Store or for distribution. Available commands include:
shopware-cli extension fix # Fix an extension
shopware-cli extension build # Builds assets for extensions
shopware-cli extension validate # Validate an extensionStore commands
Publish and manage your extensions in the Store, with commands such as:
shopware-cli account login # Log in to the Shopware Store (account.shopware.com)
shopware-cli token # Manage tokens for Store authenticationRun any command with --help to see its available options. Example: shopware-cli extension --help