The shopware-cli is a Go-based command-line tool that streamlines Shopware development by automating repetitive tasks. It's Shopware version-independent and offers four major benefits:
If you're manually uploading extensions to the Shopware store, waiting for slow builds, or running multiple commands every deployment, you're wasting valuable development time. The shopware-cli addresses these pain points with a single, version-independent tool.
This guide covers the practical workflows where shopware-cli saves the most time, from extension development and store management to automated refactoring and project deployment.
The traditional plugin upload process requires logging into account.shopware.com, navigating through multiple pages, manually uploading ZIP files, filling out forms, and copying change logs. For developers who release updates frequently, this becomes a significant time sink.
The CLI eliminates the manual upload process entirely:
# Upload a plugin to the Shopware store
shopware-cli account producer extension upload path/to/plugin.zip
For CI/CD integration, create a dedicated Shopware account user with API credentials. Store these as environment variables to avoid interactive prompts:
# Set environment variables in your CI pipeline
export SHOPWARE_CLI_ACCOUNT_EMAIL="ci-user@yourcompany.com"
export SHOPWARE_CLI_ACCOUNT_PASSWORD="your-token"
# Upload runs non-interactively in CI
shopware-cli account producer extension upload dist/plugin.zip
Instead of manually editing plugin descriptions, highlights, and tags through the web interface, the CLI lets you manage everything through a local YAML file:
Pull current store configuration:
shopware-cli account producer extension info pull ./path/to/extension
This creates a .shopware-extension.yml file containing your extension's title, description, localization, highlights, and tags. Edit locally, then push changes back:
shopware-cli account producer extension info push ./path/to/extension
Writing change logs manually is tedious and error-prone. The CLI can extract change logs directly from your Git commit history using regex patterns:
Configure a regex pattern to extract ticket numbers or structured commit messages, then build a markdown template for your change log. This works particularly well if you follow conventional commit patterns like:
feat(SHOP-123): Add product comparison feature
fix(SHOP-456): Resolve cart calculation rounding error
The CLI can parse these patterns and generate formatted change logs automatically.
Pro Tip: Set up your CI/CD pipeline to automatically generate the change log, validate the plugin ZIP, and upload to the store when you tag a release. This creates a fully automated release workflow that requires zero manual intervention.
Building extension assets traditionally required the full Shopware codebase to resolve imports and dependencies. This made builds slow and tightly coupled to your Shopware version. Note that Shopware 6.7 has moved from Webpack to Vite for core administration builds, but the principles of slow, dependency-heavy builds remain for traditional approaches.
The CLI can build extension assets in complete isolation without needing the Shopware codebase. By default it uses Webpack, but you can opt into esbuild (a Go-based bundler) for significantly faster builds by adding this to your extension's .shopware-extension.yml:
# .shopware-extension.yml - enable esbuild for faster builds
build:
zip:
assets:
enable_es_build_for_admin: true
enable_es_build_for_storefront: true
# Build extension assets (both admin and storefront)
shopware-cli extension build ./path/to/extension
With esbuild enabled, build times drop significantly - from minutes to seconds in many cases. One documented example shows build time reduced from 2 minutes to 7 seconds. The performance improvement is particularly noticeable in CI environments where every second counts.
For administration development, the CLI provides a watcher that starts in under a second (compared to much longer initialization times with traditional watchers):
# Start admin watcher with hot reload
shopware-cli extension admin-watch ./path/to/extension https://your-shop.example.com
The watcher automatically rebuilds only changed files, giving you near-instant feedback when developing admin components.
Because the CLI builds assets standalone without the Shopware codebase, your builds become version-independent. This means:
Note on Shopware 6.7: While Shopware core has migrated from Webpack to Vite for administration builds as of June 2025, shopware-cli continues to use esbuild for extension builds. This approach keeps extension builds fast, standalone, and version-independent.
Creating a plugin ZIP file manually is error-prone. You might include unnecessary files like node_modules, forget to compile assets, or accidentally include sensitive files like .env. Each of these mistakes causes store validation to fail.
The CLI handles all ZIP requirements automatically:
# Create a production-ready ZIP file
shopware-cli extension zip ./path/to/plugin --release
The extension zip command automatically handles file exclusions, while the --release flag adds release-specific preparation:
node_modules, and unnecessary directories from the ZIP
extension prepare to install Composer dependencies and clean up
manifest.xml (critical for Shopware apps)
Avoid failed uploads by validating your plugin locally before submitting to the store:
# Validate extension locally
shopware-cli extension validate ./path/to/plugin
This runs validation checks against your extension:
Best Practice: Add validation to your CI pipeline before uploading. This catches issues early and prevents failed releases.
Traditional Shopware project builds require running multiple commands in sequence: composer install, asset compilation, file cleanup, and cache warming. The CLI consolidates this into a single CI-optimized command:
# Build Shopware project for CI/CD deployment
shopware-cli project ci
# This automatically:
# 1. Installs Composer dependencies
# 2. Builds administration and storefront assets
# 3. Cleans up unnecessary files
# 4. Warms up Shopware cache
The CLI's project commands automatically optimize deployments:
The CLI includes an experimental deployment helper Composer package that standardizes Shopware installations and updates:
When upgrading between Shopware versions, you often need to update deprecated APIs, adjust template syntax, and modernize code patterns. Doing this manually across hundreds or thousands of files is error-prone and time-consuming.
The CLI includes integrated automatic code fixing that modernizes your codebase when upgrading Shopware versions. It uses industry-standard tools:
For project-wide fixes, the CLI automatically detects your target Shopware version from composer.json and applies appropriate upgrade rules:
# Fix entire Shopware project
shopware-cli project fix
# Fix a specific extension
shopware-cli extension fix ./path/to/extension
The CLI includes experimental LLM-powered Twig template migration that uses AI to propose template adjustments between Shopware versions. This is particularly useful for complex template changes that are difficult to automate with regex rules.
Supported LLM providers:
OLLAMA_HOSTOPENAI_API_KEYGEMINI_API_KEYOPENROUTER_API_KEYCritical Warning: Automatic code fixing modifies files in-place. Before running:
git diffWhen debugging API issues or scripting admin operations, manually obtaining OAuth tokens is tedious. The CLI provides a pre-authenticated curl interface to the Admin API:
# Query the Admin API without manual authentication
shopware-cli project admin-api GET /api/product
# Create resources via API
shopware-cli project admin-api POST /api/product '{"name": "Test"}'
# Get just the access token for use in other tools
shopware-cli project admin-api --output-token
This handles OAuth token generation automatically, making it ideal for quick API queries during development or scripting batch operations.
Create MySQL dumps with anonymized customer data without requiring MySQL installed locally:
# Create an anonymized database dump
shopware-cli project dump --anonymize
The CLI uses a .shopware-project.yml file to manage project-level configuration, including database dump rules, deployment settings, and extension sync:
Initialize project configuration:
shopware-cli project config init
This creates a .shopware-project.yml in your project root. You can configure database dump anonymization rules, extension sync settings, and other project-level defaults in this file.
This approach makes project configuration version-controllable and consistent across development environments.
The CLI is distributed as a single binary with no dependencies. Download from the official GitHub releases:
# macOS (Homebrew)
brew install shopware/tap/shopware-cli
# Linux (download binary)
curl -L https://github.com/shopware/shopware-cli/releases/latest/download/shopware-cli-linux-amd64 -o shopware-cli
chmod +x shopware-cli
sudo mv shopware-cli /usr/local/bin/
# Windows (download from releases page)
# Visit: https://github.com/shopware/shopware-cli/releases
shopware-cli account login
shopware-cli extension build .
shopware-cli extension zip . --release
The shopware-cli eliminates repetitive manual work, letting you focus on solving actual development problems. If you're not using it yet, start with the asset building commands to see immediate performance improvements.
Explore more Shopware development topics:
Whether you're building custom plugins, migrating projects, or optimizing deployments, get expert guidance from a Certified Shopware Developer.
Talk to an Engineer