Skip to content

Other Installation Options

Other Installation Options

If you haven’t already, see the Shopware CLI overview for a quick start and the most common installation methods (Homebrew, APT, and Docker). This page covers additional or advanced options for other package managers, CI/CD environments, or building from source.

Package-manager installs

Shopware CLI is available through several community and distribution channels.

Fedora, CentOS, openSUSE, RHEL (YUM/DNF)
bash
curl -1sLf \
  'https://dl.cloudsmith.io/public/friendsofshopware/stable/setup.rpm.sh' \
  | sudo -E bash
sudo dnf install shopware-cli
Arch Linux (AUR)
bash
yay -S shopware-cli-bin
Nix / NUR packages
bash
nix profile install nixpkgs#shopware-cli
# or latest from FriendsOfShopware
nix profile install github:FriendsOfShopware/nur-packages#shopware-cli
Devenv (Nix-based)

Update devenv.yaml with:

yaml
inputs:
  nixpkgs:
    url: github:NixOS/nixpkgs/nixpkgs-unstable
  froshpkgs:
    url: github:FriendsOfShopware/nur-packages
    inputs:
      nixpkgs:
        follows: "nixpkgs"

Then reference the input in devenv.nix:

nix
{ pkgs, inputs, ... }: {
  packages = [
    inputs.froshpkgs.packages.${pkgs.system}.shopware-cli
  ];
}

Manual installation from releases

Download the appropriate .deb, .rpm, or .apk file from the GitHub Releases page and install it manually:

bash
sudo dpkg -i shopware-cli_<version>_linux_amd64.deb   # Debian/Ubuntu
sudo rpm -i shopware-cli_<version>_linux_arm64.rpm    # Fedora/RHEL
sudo apk add shopware-cli-<version>.apk               # Alpine

Alternatively, download the binary and move it into your $PATH:

bash
curl -L -o shopware-cli https://github.com/shopware/shopware-cli/releases/latest/download/shopware-cli-linux-amd64
chmod +x shopware-cli
sudo mv shopware-cli /usr/local/bin/

CI/CD and development environments

These options let you use the CLI automatically in hosted environments. The main page lists Docker and GitHub Actions, which are popular.

GitHub Codespaces
json
{
    "image": "mcr.microsoft.com/devcontainers/base:ubuntu",
    "features": {
        "ghcr.io/shyim/devcontainers-features/shopware-cli:latest": {}
    }
}
GitLab CI
yaml
build:
  stage: build
  image:
    name: ghcr.io/shopware/shopware-cli:latest
    entrypoint: [ "/bin/sh", "-c" ]
  script:
    - shopware-cli --version
ddev integration

Add a file .ddev/web-build/Dockerfile.shopware-cli

Dockerfile
# .ddev/web-build/Dockerfile.shopware-cli
COPY --from=ghcr.io/shopware/shopware-cli:bin /shopware-cli /usr/local/bin/shopware-cli

Docker image

To copy the binary in your Docker image, add the following line:

Dockerfile
# Dockerfile
COPY --from=ghcr.io/shopware/shopware-cli:bin /shopware-cli /usr/local/bin/shopware-cli

Add binary manually

Download the pre-compiled binaries from the releases page and copy them to the desired location.

Running with Docker

You can also use it within a Docker container. To do that, you will need to execute something more or less like the examples below.

Registries:

Example usage: Build assets of an extension

bash
docker run \
    --rm \
    -v $(pwd):$(pwd) \
    -w $(pwd) \
    -u $(id -u) \
    ghcr.io/shopware/shopware-cli \
    extension build FroshPlatformAdminer

Building from source

If you prefer to compile the CLI yourself (requires Go 1.20+ and Git):

bash
git clone https://github.com/shopware/shopware-cli
cd shopware-cli

go mod tidy

go build -o shopware-cli .

./shopware-cli --version