Skip to Content
Xeonr Developer Docs

The CLI

Install upl, sign in, move files, and keep it up to date.

upl is the command-line client for upl.im. It manages buckets, uploads and downloads files, and publishes pipeline steps and renderers.

Install

curl -fsSL https://updater.xeonr.io/76/install.sh | sh

No credential is needed. Releases are served by the Xeonr Updater. Builds exist for Linux and macOS on amd64 and arm64. The script verifies the published checksum, then installs into /usr/local/bin, or ~/.local/bin when that is not writable. Use this address. The older one on git.prod.wtf no longer works without a git.prod.wtf sign-in.

Pin a version with UPL_VERSION=1.21.1, install the stage channel with UPL_TARGET=prerelease, or choose where it lands with UPL_INSTALL_DIR.

Xeonr members can also build from source, with a git.prod.wtf credential:

GOPRIVATE=git.prod.wtf go install git.prod.wtf/xeonr/upl-im/cli/cmd/upl@latest

Sign in

upl auth login              # device-code flow against prod
upl auth login --env stage  # sign in to stage; later commands use it
upl auth status             # which environment and account are active

upl auth login always prints the verification URL and code, so you can finish signing in on another device. It opens a browser only when it can, and --no-browser stops it trying. The token is stored in ~/.config/upl/auth.json, readable only by you.

The CLI renews its access token by itself. Several upl commands running at once (a script, CI) share one renewal rather than racing for it. If Xeonr Auth refuses the renewal for good (the session was revoked or has expired), the CLI deletes the stored session and tells you to run upl auth login again; a network error keeps the session for the next command. A token stored with --token is never renewed.

Everyday commands

upl bucket list
upl bucket use <name>        # the bucket later commands act on
upl upload <src...> [dest]   # files or directories
upl download <src> [dest]
upl ls [path]
upl sync <local-dir> <dest>

--bucket or UPL_BUCKET overrides the active bucket for one command. Run any command with --help for its flags.

Upgrade

upl upgrade              # update in place
upl upgrade --check      # only report whether there is a newer one
upl upgrade --prerelease # track the stage channel

upl upgrade checks the download against the published checksum and runs the new binary once before it replaces the old one. If the install directory is not writable, it re-runs itself under sudo when you are at a terminal.

Versions before 1.21.0 cannot upgrade in place any more, because they look for releases somewhere that is no longer public. Run the install command above once to replace one; upl upgrade works from then on.

Once a day, upl also checks whether a newer release is out. If there is one, it prints a single line on stderr after a command succeeds. Only that daily check can delay a command, by at most a second. It stays quiet when stderr is not a terminal, under CI, and for development builds. To turn it off, set "skip_update_check": true in ~/.config/upl/config.json.

In CI

Sign in with a personal access token instead of the device flow. Store it as a masked CI/CD variable:

deploy:
  script:
    - curl -fsSL https://updater.xeonr.io/76/install.sh | sh
    - upl auth login --env stage --token "$UPL_PAT"
    - upl upload ./build.tar.gz --bucket releases

On this page