Updating
ubihome update replaces the currently running executable in place. It works the same way whether UbiHome was installed as a service or is just a standalone binary you invoke directly - either way, run the command from (or pointed at) the location of the executable you want replaced.
Updating to the latest release
Section titled “Updating to the latest release”ubihome updateThis:
- Fetches the release list from the GitHub Releases page.
- Picks the newest release (normal releases only, unless
--include-pre-releaseis set - see below). - Prints the changelog for every release between your current version and that one.
- Asks you to confirm before overwriting the current executable.
- Downloads the build matching your current platform and replaces the running executable with it.
If you’re already on the latest version, it prints Already up to date! and exits without prompting.
Pre-releases
Section titled “Pre-releases”By default, only normal releases (tagged vX.Y.Z) are considered. To also update to pre-release/unstable tags (e.g. vX.Y.Z-next.N):
ubihome update --include-pre-releaseUpdating to a pull request preview build
Section titled “Updating to a pull request preview build”Every pull request’s CI run publishes a build of UbiHome for each supported platform as a workflow artifact. update pr downloads the artifact from that PR’s most recent successful CI run and installs it, which is useful for trying out a fix or feature before it’s merged and released.
ubihome update pr <pr_number> --token <github_token>The GitHub token
Section titled “The GitHub token”Downloading workflow artifacts always requires an authenticated GitHub API request, even for public repositories like this one - there’s no way around providing a token. The token needs at least:
- The
reposcope (classic personal access tokens), or actions:readandpull-requests:read(fine-grained personal access tokens).
You can pass it either as --token, or via the GITHUB_TOKEN environment variable (the --token flag reads from it by default).
Using an automatically minted token via the GitHub CLI
Section titled “Using an automatically minted token via the GitHub CLI”If you have the GitHub CLI (gh) installed and are logged in (gh auth login), you don’t need to create or manage a token yourself - gh auth token prints a valid token for your logged-in account on demand:
ubihome update pr 123 --token $(gh auth token)Or, equivalently, via the environment variable:
GITHUB_TOKEN=$(gh auth token) ubihome update pr 123This token is scoped to your own GitHub session and is never persisted by UbiHome - it’s only used for the duration of the update command.