Distribute a CLI
Ship a command-line tool through the Updater, with an install one-liner, pinned versions, private channels and a manifest for self-update.
A CLI on the Updater ships one executable per platform. Users install it with one line, and installed copies check a JSON manifest to update themselves.
curl -fsSL https://updater.xeonr.io/<bucket>/install.sh | shOn Windows, in PowerShell:
irm https://updater.xeonr.io/<bucket>/install.ps1 | iexThe app's Overview in the console shows both lines with its bucket id filled in, plus a copy button.
What a release holds
Platforms are named <goos>-<goarch>, as Go spells them: linux-amd64,
darwin-arm64, windows-amd64. Each platform of a release carries two files.
| File | Name | Used by |
|---|---|---|
| The binary | <app>-<goos>-<goarch>, with .exe on Windows | Self-updaters that replace the executable in place |
| An archive of it | <app>_<version>_<goos>_<goarch>.tar.gz, or .zip on Windows | The install scripts |
The archive holds the executable at its root, named <app> (or <app>.exe).
<app> is the app's name in lower case, with anything but letters and digits
turned into hyphens, so an app called "Updater CLI" ships updater-cli. The
Updater records each file's SHA-256 when it is uploaded.
A release holds binaries or Electron artifacts, never both. The console reads an app's kind off its latest release and groups a binary release's files by platform.
Releases are usually published from CI with updater-cli publish --kind binary,
which reads the platform and version off these filenames. See
Publish from CI for a pipeline that builds and
publishes them.
Installing
The install scripts are generated per app. Each one:
- picks the platform from
uname(orPROCESSOR_ARCHITECTUREon Windows); - asks the target for its newest release on that platform, as a checksum line that names the archive;
- downloads exactly that archive and checks its SHA-256;
- puts the executable in
/usr/local/binwhen that is writable orsudois available, else in~/.local/bin. On Windows it uses%LOCALAPPDATA%\<app>and adds that to the user'sPATH, with no Administrator prompt.
By default a script installs from the app's public stable target, or its
first public target when there is no stable.
Environment variables change what it does. Their prefix is the app's name in
upper case, with hyphens turned into underscores, so updater-cli reads
UPDATER_CLI_VERSION.
| Variable | Effect |
|---|---|
<APP>_VERSION | Install this version instead of the newest. A leading v is ignored. |
<APP>_INSTALL_DIR | Install into this directory. |
<APP>_TARGET | Install from this target instead of the default. |
<APP>_TOKEN | An updater token, for a private target. |
Set them on the side of the pipe that runs the script:
curl -fsSL https://updater.xeonr.io/<bucket>/install.sh | BURROW_VERSION=0.9.1 sh$env:BURROW_VERSION = '0.9.1'; irm https://updater.xeonr.io/<bucket>/install.ps1 | iexPinning a version
With <APP>_VERSION set, the script downloads the archive by name:
https://updater.xeonr.io/<bucket>/update/<target>/<goos>-<goarch>/<app>_<version>_<goos>_<goarch>.tar.gzThe version must still be published on that target. A rescinded release, or
one that was never on the target, does not download. When the release carries
a <archive>.sha256 file the script checks against it; otherwise it says it
is skipping verification.
Private targets
A private target answers only requests that carry an updater token whose
targets claim names it. The scripts send <APP>_TOKEN as a bearer header, so
the token stays out of URLs and logs:
curl -fsSL https://updater.xeonr.io/<bucket>/install.sh \
| BURROW_TARGET=internal BURROW_TOKEN="$UPDATER_TOKEN" shThe script itself is public, and never names a private target. An app with no
public target gets a script that stops and asks for <APP>_TARGET and
<APP>_TOKEN.
Anything else that reads a private target can send the token as
Authorization: Bearer <token>, or as ?token=<token> where a header cannot
be set.
The manifest, for a custom updater
Each target serves a manifest per platform:
GET https://updater.xeonr.io/<bucket>/update/<target>/<goos>-<goarch>/manifest.json{
"app": "burrow",
"version": "0.9.2",
"platform": "linux/amd64",
"sha256": "9f2c…",
"size": 14260224,
"url": "https://updater.xeonr.io/<bucket>/update/stable/linux-amd64/burrow-linux-amd64",
"notes": "## 0.9.2\n\n### Fixed\n- …",
"pub_date": "2026-10-15T23:49:00Z",
"archive": {
"url": "https://updater.xeonr.io/<bucket>/update/stable/linux-amd64/burrow_0.9.2_linux_amd64.tar.gz",
"sha256": "41d0…",
"size": 6186598
}
}The top-level url, sha256 and size describe the raw binary. platform
uses a slash, as Go's GOOS/GOARCH does. Apart from notes, pub_date and
archive, the shape is the one the shared CI's binary release channel
publishes, so a consumer of that channel can point at the Updater unchanged.
To update in place, compare version with your own, download url, check
its SHA-256 against sha256, and replace the running executable. The console
lists each target's manifest URL on the app's Overview.
A Go CLI does not need to write this itself. The
Go SDK does it, and adds an upgrade
command, a once-a-day update banner and rollback for daemons.
Three more routes need no release id, for scripts and links:
| Route | Answer |
|---|---|
…/<goos>-<goarch>/latest | A redirect to the newest archive |
…/<goos>-<goarch>/latest.sha256 | <sha256> <archive filename>, in sha256sum format |
…/<goos>-<goarch>/latest.bin | A redirect to the newest raw binary |
Prefer latest.sha256 and then the named archive over latest, as the install
scripts do. A release published between two requests then cannot leave you
verifying one file against another's checksum.
The update protocol
The plain-HTTP endpoints installed apps read, from electron-updater and Squirrel feeds, the check endpoint the SDK calls, release notes, downloads and private targets.
Self-update from Go
Give a Go CLI an upgrade command and a once-a-day update banner that read its channel on the Updater, with checksums, rollback for daemons, and an offline test server.