Operate bay
Update
Keep bay current with bay update, an hourly background check, and version pins.
bay update installs a newer bay release. It verifies the signed SHA256SUMS, the signed VERSION, and the sha256 before it replaces the program. It runs the new program once, then renames it over ~/.local/bin/bay (bay.exe on Windows), whichever copy ran the update. Then it runs bay install --machine. That copies the matching skill into every Claude config directory, and changes no repository.
It refuses a downgrade unless a pin names the older version. Update settings belong to the machine, not to a repository.
bay update # the newest release with a build for this machine
bay update --version <x.y.z> # one exact version, newer than this one
bay update --check # report only; changes nothingUpdate while a runner runs
bay update and the hourly check never wait for a runner to stop. bay keeps each version it installs, and each version a runner runs, at $XDG_DATA_HOME/bay/versions/<version>/bay. Without XDG_DATA_HOME, that folder is under ~/.local/share. An update keeps the newest three versions there, its own version, and each live runner's version. A runner's operation starts each child bay from its own version, so it ends on the version it started with. Between operations, bay runner run runs the new version in the same process, and names the move in detail.reexec.
Automatic updates
At most once an hour, bay status or bay doctor starts bay update in the background. A looping bay runner run starts it too. A newer release installs on its own, never during a merge. The check downloads from GitHub only, and sends no repository data.
Set bay.updateAuto to false in your global Git config to turn it off. BAY_DISABLE_AUTOUPDATE=1 turns it off too, and it wins over every setting. A pinned machine still follows every newer release.
git config --global bay.updateAuto falseWhich release
bay update takes the newest release that has a build for this machine. When the newest release has no build for it, bay skips back to the newest one that has. It reads GitHub's release list with GH_TOKEN or GITHUB_TOKEN when one is set. When GitHub turns that read away, bay reads the newest version from the release page. Version numbers are 0.x, so a minor release can still change a command. The changelog names each change.
Release keys
bay update trusts a list of release keys, so a key can roll over. It trusts two: the release key, held in hardware, and the 0.x build key. While bay is 0.x, the build key signs each release on the machine that builds it. The build key goes before 1.0. The install script trusts the same two keys.
After a key rollover
bay update steps through a release-key rollover on its own. When it cannot verify the newest release's signature, it tries older releases, newest first. It installs the newest one it can verify that is newer than the installed bay. detail.stepped is then true, and detail.next says to run bay update again. --version never steps, and neither does a pin newer than every release. bay refuses a release whose sha256 does not match.
Pins
A pin is the oldest version a machine runs. A pin is bay.updateVersion in global Git config, or BAY_UPDATE_VERSION for one process. With the variable, one agent on a shared login can choose its own version. A pinned machine follows every newer release, so a pin left behind never holds it back. A build that was never released never moves a pinned machine. A repository cannot pin the machine, so a cloned repository never moves or downgrades bay.
git config --global bay.updateVersion <x.y.z>Refusals
| Code | Meaning | What to do next |
|---|---|---|
UPDATE_UNVERIFIED | The signature, sha256 or VERSION did not verify, or the new program did not run. Nothing changed. | Keep the installed bay and tell the user; run bay update again once the release is republished. |
UPDATE_PINNED | The target is older than the pin of this machine, or older than the installed version. | Keep this version: bay update moves only after this machine's pin moves. |
UPDATE_UNAVAILABLE | No release could be read: the network is down, GitHub turned the read away, or no release matches this platform or version. | Run bay update again later, once a release is reachable. |