The Upsun CLI is the official command-line interface for Upsun.
This repository hosts the source code and releases of the CLI.
This product includes PHP software, freely available from the PHP website
To install the CLI, use either Homebrew (on Linux, macOS, or the Windows Subsystem for Linux) or Scoop (on Windows):
brew install upsun/tap/upsun-cliscoop bucket add upsun https://github.com/upsun/homebrew-tap.git
scoop install upsunUse the bash installer for an automated installation, using the most preferable way for your system.
curl -fsSL https://raw.githubusercontent.com/upsun/cli/main/installer.sh | bashThe installer is configurable using the following environment variables:
INSTALL_LOG- the install log fileINSTALL_METHOD- force a specific installation method, possible values arebrewandrawINSTALL_DIR- the installation directory for therawinstallation method, for example you can useINSTALL_DIR=$HOME/.local/binfor a single user installationVERSION- the version of the CLI to install, if you need a version other than the latest one
Outside CI, the raw method also installs shell completion for the current user, without editing shell configuration files: bash completion in ~/.local/share/bash-completion/completions (loaded by bash-completion 2), and fish completion in ~/.config/fish/completions when available. For zsh users (by $SHELL), it installs ~/.local/share/upsun/completion.zsh and prints the line to add to ~/.zshrc.
Force the CLI to be installed using the raw method
curl -fsSL https://raw.githubusercontent.com/upsun/cli/main/installer.sh | INSTALL_METHOD=raw bash
Install a specific version
curl -fsSL https://raw.githubusercontent.com/upsun/cli/main/installer.sh | VERSION=5.0.0 bash
Install the CLI in a user owned directory
curl -fsSL https://raw.githubusercontent.com/upsun/cli/main/installer.sh | INSTALL_METHOD=raw INSTALL_DIR=$HOME/.local/bin bash
Refer to the Nix documentation if you are not on NixOS.
nix profile install nixpkgs#upsun# Add the signing key and repository
sudo mkdir -p /etc/apk/keys
sudo curl -fsSL -o /etc/apk/keys/repositories-upsun-com.rsa.pub https://repositories.upsun.com/alpine/repositories-upsun-com.rsa.pub
echo "https://repositories.upsun.com/alpine" | sudo tee -a /etc/apk/repositories
# Install the CLI
sudo apk add upsun-cli# Add the signing key and repository
sudo mkdir -p /etc/apt/keyrings
sudo curl -fsSL https://repositories.upsun.com/gpg.key -o /etc/apt/keyrings/upsun.asc
echo "deb [signed-by=/etc/apt/keyrings/upsun.asc] https://repositories.upsun.com/debian stable main" | sudo tee /etc/apt/sources.list.d/upsun.list
# Install the CLI
sudo apt-get update
sudo apt-get install -y upsun-cli# Add the repository
sudo tee /etc/yum.repos.d/upsun.repo << 'EOF'
[upsun]
name=Upsun CLI
baseurl=https://repositories.upsun.com/rpm/$basearch
enabled=1
gpgcheck=1
gpgkey=https://repositories.upsun.com/gpg.key
EOF
# Install the CLI (use yum on older systems)
sudo dnf install -y upsun-cliFor manual installation, you can also download the latest binaries.
The CLI is also available as a Docker image:
docker run --rm -it ghcr.io/upsun/cliUpgrade using the same tool:
brew update && brew upgrade upsun/tap/upsun-cliscoop update upsuncurl -fsSL https://raw.githubusercontent.com/upsun/cli/main/installer.sh | bashsudo apk update && sudo apk upgrade upsun-clisudo apt-get update && sudo apt-get upgrade upsun-clisudo dnf upgrade -y upsun-cliWhen a newer release is available, the CLI prints a short notice with the upgrade command for the tool you installed it with. It detects the install method automatically and, for system package managers (apt, yum/dnf, apk), stays silent because those update the CLI through the OS.
The notice is shown at most once a week and only in an interactive terminal. To control it:
UPSUN_CLI_UPDATES_CHECK=0disables update checks and notices entirely.UPSUN_CLI_INSTALL_METHOD=<method>forces the detected install method, where<method>is one ofhomebrew,scoop,npm,package, orscript. Usepackageto silence the notice when the OS manages updates.
(For the platform command, the prefix is PLATFORMSH_CLI_ instead of
UPSUN_CLI_.)
Build a single binary:
make singleBuild a snapshot:
make snapshotBuild a snapshot for a vendor:
# Download the config file at internal/config/embedded-config.yaml
make vendor-snapshot VENDOR_NAME='Vendor Name' VENDOR_BINARY='vendorcli'Releases are automated via GitHub Actions. To create a new release:
-
Create and push a new tag:
git tag -m 'Release v5.0.0' 'v5.0.0' git push origin v5.0.0
-
The Release workflow will automatically:
- Build binaries for all platforms
- Sign packages (APK, DEB, RPM)
- Create a GitHub release with all artifacts
- Update package repositories at repositories.upsun.com
- Build and push Docker image to ghcr.io/upsun/cli
This binary redistributes PHP in a binary form, which comes with the PHP License.