cli

module
v0.0.0-...-46775db Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2026 License: MIT

README

Upsun CLI

The command-line interface for Upsun.

Use it to manage Upsun projects from the terminal: generate and validate project configuration, create and branch environments, deploy with Git, SSH into apps, view logs, open tunnels to services, and manage backups, variables, domains and users.

Install

Installer script

On Linux, macOS, or the Windows Subsystem for Linux (WSL), run:

curl -fsSL https://raw.githubusercontent.com/upsun/cli/main/installer.sh | bash

The script uses apt, yum, or apk on Linux, or Homebrew on macOS, if available, or else downloads the binary. For its options, and to add the package repositories yourself, see docs/install.md.

Windows

On Windows, install the CLI in WSL with the installer script above.

To install it on Windows itself, use Scoop. Scoop needs Git to add a bucket:

scoop install git
scoop bucket add upsun https://github.com/upsun/homebrew-tap.git
scoop install upsun
Homebrew
brew install upsun/tap/upsun-cli
npm
npm install -g upsun

npm installs don't set up shell completion. For the package's requirements, see docs/install.md.

Nix
nix profile install nixpkgs#upsun
Docker
docker run --rm -it ghcr.io/upsun/cli
Manual installation

For manual installation, you can also download the latest binaries.

To try unreleased changes, install the nightly build with VERSION=nightly (see docs/install.md).

Getting started

upsun login            # Log in, in a browser
upsun projects         # List your projects
upsun get <project>    # Clone a project's repository
upsun list             # List all commands

For more, see the CLI documentation.

Upgrade

Upgrade with the tool you installed the CLI with:

Method Command
Installer script curl -fsSL https://raw.githubusercontent.com/upsun/cli/main/installer.sh | bash
Scoop scoop update upsun
Homebrew brew update && brew upgrade upsun/tap/upsun-cli
npm npm install -g upsun@latest
apt, dnf/yum, apk Your system's package manager: see docs/install.md

Regular system package updates (e.g. sudo apt update && sudo apt upgrade) also upgrade the CLI.

Update notifications

When a newer release is available, the CLI prints the upgrade command for your install method, in an interactive terminal. A release is announced once, then at most once a week.

  • UPSUN_CLI_UPDATES_CHECK=0 disables update checks.
  • UPSUN_CLI_INSTALL_METHOD=<method> overrides the detected install method: homebrew, scoop, npm, winget, apt, dnf, yum, apk, package (a system package, with an unknown package manager), or script.

Configuration

You can override configuration in the user config file, ~/.upsun-cli/config.yaml. The available keys are in legacy/config-defaults.yaml. For environment variables, see docs/configuration.md.

Development

To build or release the CLI, see docs/development.md.

Licenses

This product includes PHP software, freely available from the PHP website. The CLI redistributes PHP in binary form, under the PHP License.

Directories

Path Synopsis
cmd
platform command
Package tests contains integration tests, which run the CLI as a shell command and verify its output.
Package tests contains integration tests, which run the CLI as a shell command and verify its output.
api
auth/store
Package store saves OAuth 2.0 credentials, one entry per session ID, in the system keychain or in files.
Package store saves OAuth 2.0 credentials, one entry per session ID, in the system keychain or in files.
authchannel
Package authchannel serves auth requests from the legacy CLI, over a channel that only its process can use.
Package authchannel serves auth requests from the legacy CLI, over a channel that only its process can use.
config/alt
Package alt manages instances of alternative CLI configurations.
Package alt manages instances of alternative CLI configurations.
md
platformify
Package platformify generates a starter configuration for a project, by detecting its stack and asking a few questions (the guided mode of "init").
Package platformify generates a starter configuration for a project, by detecting its stack and asking a few questions (the guided mode of "init").
schema
Package schema provides the embedded JSON schemas for Upsun configuration (Flex, and Fixed via an overlay).
Package schema provides the embedded JSON schemas for Upsun configuration (Flex, and Fixed via an overlay).
table
Package table renders tabular output with the legacy CLI's --format, --columns and --no-header options.
Package table renders tabular output with the legacy CLI's --format, --columns and --no-header options.
pkg
lint
Package lint validates Upsun configuration (Flex and Fixed).
Package lint validates Upsun configuration (Flex and Fixed).
mockapi
Package mockapi provides mocks of the HTTP API for use in integration tests.
Package mockapi provides mocks of the HTTP API for use in integration tests.
registry
Package registry provides the embedded Upsun image registry (runtime and service types and versions).
Package registry provides the embedded Upsun image registry (runtime and service types and versions).
scripts
coverage-report command
Command coverage-report prints a Markdown report of integration test coverage: Go statement coverage per package, and which commands and command-specific options the tests run.
Command coverage-report prints a Markdown report of integration test coverage: Go statement coverage per package, and which commands and command-specific options the tests run.
env-prefix command
Command env-prefix prints the application's environment variable prefix from a CLI config file.
Command env-prefix prints the application's environment variable prefix from a CLI config file.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL