Skip to content

Docs · 02

CLI reference

Every gw command, flag, environment variable and exit code. For a first upload, start with the quick start.

7 min readUpdated 7 Oct 2026

Documentation sections

Overview

gw signs you in, checks a build folder, uploads it and moves branches. It never changes your files. Human-readable output is the default; add --json for one JSON event per line, which is what scripts and CI should read.

Text
usage: gw <command> [options]

  gw login | gw logout | gw whoami
  gw init [--app <app>] [--depot <depot>=<path> …] [--notes <file>] [--force]
  gw doctor
  gw app list | gw app info <app>
  gw depot list <app> | gw depot create <app> --os macos|windows|linux --arch arm64|x64|universal [--kind client|server]
  gw inspect <path> [--os <os>] [--arch <arch>] [--exclude <glob>] [--exe <relpath>]
  gw build push <app> --depot <depot>=<path> … --label <v> [options]
  gw build list <app> | gw build info <buildId>
  gw branch list <app> | gw branch set <app> <branch> <buildId> | gw branch rollback <app> <branch>
  gw verify <path> --build <buildId> --depot <depot>
  gw server list|create|update|rotate-key|delete …

<app> is the app id (the number from 1000 up) or its short name. <depot> is the depot name you made in the portal.

Download

Download the archive for your system, check that its SHA-256 matches, unpack it and move the gw file (gw.exe on Windows) to a folder that is on your PATH. The quick start goes through it step by step.

Download the CLI

Loading the list of downloads…

Global options

OptionWhat it does
--jsonOne JSON event per line on standard output instead of the human text.
--dry-runShow what would happen and change nothing.
-q, -vQuieter or more detailed output.
--no-colorNo colours. The NO_COLOR variable does the same.
--strictTreat every warning as a failure: nothing is uploaded when a check warns.
--yesDo not ask for confirmation (an interactive terminal asks before going live).
--api <url>, --web <url>Where the API and the website are (for login; saved afterwards).

Signing in

gw login

Opens your browser on the Gameway consent page, which names your account and this computer, and waits for you to press Continue. The answer returns to a port on 127.0.0.1 that only this computer can reach, so the browser must run on the same computer. If nothing opens, copy the link the tool prints. The wait ends after five minutes (GW_LOGIN_TIMEOUT_S changes it).

The sign-in is stored encrypted for this computer, and the key that opens it lives in a separate folder that backups skip. Developers need two-factor authentication on the account, and the session must have used it.

gw logout, gw whoami

logout ends this computer's session. whoami prints who you are and which teams you belong to, or the key prefix when GW_API_KEY is set.

Headless use

A build machine can use an API key instead of a person: set GW_API_KEY to the key and every command uses it. A key has scopes (upload, release, servers) and is limited to the apps it names. Creating keys is a team admin's action that asks for a second factor: in the developer portal open your app, then Servers, API keys. The secret is shown once.

Setting up

gw doctor

Checks the API address, the clock (sign-in proofs need it within five minutes), your sign-in and a gw.toml in the current folder, and says which one fails.

gw init

Asks which app you mean and which folder goes into which depot, and writes the answers to gw.toml so the push command gets short.

gw app list, gw app info

Lists the apps of your teams, or shows one: id, kind, status and branches.

gw depot list, gw depot create

A depot holds the files of one platform. depot create takes the operating system, the architecture and the kind (client, which players download, or server, which they never see). The portal does the same from Depots.

Terminal
gw depot create <app> --os windows --arch x64 --kind client

Checking a build

gw inspect <path>

Reads a build folder and prints what the upload would see, with no network:

  • files, size and executables,
  • whether Unity data is compressed (a warning when it is: see the store assets guide),
  • the program that will launch, or no launch executable found when it cannot tell,
  • on macOS, whether the app bundle signature is intact,
  • a dry run of the chunking, so you can see how much of the folder is unique.
OptionWhat it does
--os, --archTell it the platform when the folder does not show it.
--exclude <glob>Leave files out (repeat the option). Handy for logs and crash dumps.
--exe <relpath>The launch program, as a path inside the folder.

Pushing a build

gw build push

Terminal
gw build push <app> --depot <depot>=<path> [--depot <depot>=<path> …] --label 0.1.0 [options]

Chunks the folders, asks the server which chunks it lacks, uploads only those and waits for the server to verify and sign the build. The build is private until you release it.

OptionWhat it does
--depot <name>=<path>A depot and the folder (or macOS .app) that fills it. Repeat for each platform.
--label <version>The version players see, up to 64 characters. Required.
--desc <text> or --notes <file>Patch notes: a line of text, or a Markdown file whose section matching the label is used. Not both.
--set-live <branch>Release the build to a branch when it is ready. An interactive terminal shows the download size and asks first.
--expect-current <id>With --set-live: only if the branch still serves that build (or none). A mismatch exits 3 and changes nothing.
--exe <relpath>The launch program inside the folder when the tool cannot find it.
--exclude <glob>Leave files out.
--allow-unsignedPush a macOS bundle whose code signature is missing (a test build).
--allow-drop-depotRelease a build that lacks a depot the branch serves now.
--parallel N, --threads NHow many uploads and hashing threads to use.
--resume <session>Continue an interrupted upload.
--release-key <file>The team's release key, for apps that require a co-signature.

Interrupted? The tool prints the resume line (--resume <session>). Running the original command again also works: it uploads only what the server still lacks.

gw build list, gw build info

build list <app> shows recent builds with their status. build info <buildId> shows one build: depots, sizes, how much was new and the warnings.

Branches

Branches are named pointers to a build: players on a branch get what it points at. A new app has a private stable branch. Create more in the portal (Branches), including ones guarded by an access code for testers.

Terminal
gw branch list <app>
gw branch set <app> <branch> <buildId> [--expect-current <id>]
gw branch rollback <app> <branch>

Setting a build live and rolling back need the Admin role, or an API key with the release scope. Releasing to a public branch also asks for your second factor in the portal. rollback returns the branch to its previous build and keeps the history.

Verifying a folder

Terminal
gw verify <path> --build <buildId> --depot <depot> [--manifest <file>]

Compares a local folder with a build's manifest and lists files that differ or are missing. Exit code 5 means they differ.

Dedicated servers

Registers a dedicated game server so it can check online passes, and prints its secret key once. See Online passes on dedicated servers.

Terminal
gw server create <app> --name eu-1 --endpoint 203.0.113.5:27777
gw server list <app>
gw server update <app> <serverId> [--name <name>] [--endpoint <ip:port> …] [--disable | --enable]
gw server rotate-key <app> <serverId> --yes
gw server delete <app> <serverId> --yes

Environment variables

VariableMeaning
GW_API_URLThe API address. login --api saves it; this overrides the saved one.
GW_WEB_URLThe website address, for the browser sign-in.
GW_API_KEYAn API key: used instead of a signed-in person.
GW_RELEASE_KEY_FILE, GW_RELEASE_KEY_PASSPHRASEThe team's release key and its passphrase, for co-signing.
GW_CLI_HOMEWhere the tool keeps its state (default: a hidden folder in your home directory).
GW_LOGIN_TIMEOUT_SHow long login waits for the browser, in seconds (default 300).
GW_COMMIT_WAIT_SHow long build push waits for the server to finish a build.

The project file

An optional gw.toml in the folder you run from keeps the repeated parts of a push. Flags on the command line override it.

TOML
app = "1000"

[depots.windows-x64]
path = "Builds/Windows"

[depots.macos-universal]
path = "Builds/Mac/MyGame.app"

[push]
notes = "CHANGELOG.md"   # the section whose heading matches --label becomes the patch notes

With that file, a release is gw build push --label 0.2.0 --set-live beta.

Exit codes

CodeMeaning
0Success.
1Failure, including network errors and warnings under --strict.
2Usage mistake: an unknown option or a missing value.
3Conflict: the branch changed while you were setting it. Nothing was changed.
4Sign-in or permission problem: not signed in, a missing role or scope.
5Verification failed.

Gameway · 2026-10-07