Skip to main content
ubx update checks the latest release on GitHub and updates the ubx binary in place. The update is atomic — it writes to a temp file in the same directory, then renames.

Usage

ubx update [flags]

Flags

FlagDescription
--checkExit 1 if an update is available; exit 0 if already up to date (CI mode)
--forceUpdate even if already on the latest version

Examples

ubx update                 # check and install if newer version available
ubx update --check         # CI mode: exit 1 if newer available
ubx update --force         # reinstall even if already up to date

Supported platforms

PlatformArchitecture
macOSamd64, arm64
Linuxamd64, arm64
Windowsamd64 (.exe)
For unsupported platforms, ubx prints the GitHub releases URL for manual download.

How the update works

  1. Fetches the latest release tag from https://api.github.com/repos/ubiquex/ubx/releases/latest
  2. Compares semantic versions (ignoring pre-release suffixes)
  3. Downloads the platform-specific binary asset
  4. Writes it to a temp file adjacent to the current binary
  5. Sets execute permission (0755)
  6. Atomically renames (replaces) the current binary

After updating

  ✓  updated to v0.x.y — restart ubx to use the new version
The shell must restart (or re-exec) to pick up the new binary if the path was cached.

CI mode

ubx update --check && echo "up to date" || echo "update available"
Exit codes:
CodeMeaning
0Already on the latest version
1A newer version is available (with --check)

See also