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 ExtensionName
This creates a YAML file containing your extension's title, description, localization, highlights, and tags. Edit locally, then push changes back:
shopware-cli account producer extension info push ExtensionName
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 uses esbuild, a Go-based bundler that builds extension assets in complete isolation. Unlike traditional builds, it doesn't need the Shopware codebase at all:
# Build extension assets (both admin and storefront)
shopware-cli extension build ./path/to/extension
# Build only administration assets
shopware-cli extension build ./path/to/extension --admin-only
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
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 --release flag automatically:
node_modules and vendor directories
Avoid failed uploads by validating your plugin locally before submitting to the store:
# Validate plugin ZIP locally
shopware-cli extension zip validate ./path/to/plugin.zip
This runs the same checks the Shopware store performs:
Best Practice: Add validation to your CI pipeline before uploading. This catches issues early and prevents failed releases.
Traditional Shopware project initialization requires running multiple commands in sequence: composer install, database setup, asset compilation, file cleanup, and cache warming. The CLI consolidates all of this:
# Initialize a Shopware project from Git repository
shopware-cli project init
# This automatically:
# 1. Installs Composer dependencies
# 2. Configures database access
# 3. Builds assets (when necessary)
# 4. Cleans up development files
# 5. 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 refactoring that modernizes your codebase when upgrading Shopware versions. It uses industry-standard tools:
For project-wide refactoring, the CLI automatically detects your target Shopware version from composer.json and applies appropriate upgrade rules:
# Refactor entire Shopware project
shopware-cli project refactor
# Refactor a specific extension
shopware-cli extension refactor ./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:
GEMINI_API_KEYOPENROUTER_API_KEYOLLAMA_HOSTCritical Warning: Automatic refactoring modifies files in-place. Before running:
git diffWhen developing payment plugins or webhook integrations, you need a publicly accessible URL for testing. The CLI provides this functionality:
# Create a public tunnel to your local Shopware instance
shopware-cli project tunnel
This creates a temporary public URL that forwards requests to your local development environment, perfect for testing payment provider webhooks.
Create MySQL dumps with anonymized customer data without requiring MySQL installed locally:
# Create an anonymized database dump
shopware-cli project dump --anonymize
Manage Shopware system configuration, theme configuration, and mail templates using YAML files instead of clicking through the admin:
Pull current configuration:
shopware-cli project config pull
Edit the YAML file, then push changes:
shopware-cli project config push
This approach makes configuration version-controllable and deployable via CI/CD.
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