Releases and hive update
On this page
How a machine gets Hive, and a newer Hive after that: by installing a published release (the release channel, this page), or by rebuilding from the brain project's checkout (the source channel, self-update).
Hive is released as a tagged version vX.Y.Z. Each release is a public
download at https://github.com/lamplitlabs/hive/releases, with prebuilt
programs for macOS and Linux: hive, and hive-hand, the small program
another machine runs to take work from your Hive
(machines.md).
Installing
curl -fsSL https://hivefleet.dev/install.sh | sh # macOS, Linux and WSL; installs ~/.hive/bin/hive
then
export PATH="$HOME/.hive/bin:$PATH" # add to your shell profile
hive version
hive hub # the console, at http://127.0.0.1:8765
The first hive hub on a machine makes the store, ~/.hive/hive.sqlite,
and says so in one line. hive init --store-only makes one without
starting the console, for a service or a script.
With Homebrew the line is brew install lamplitlabs/tap/hivefleet
(Homebrew, below). The rest of this section is about the
installer.
The script is scripts/install.sh in the repository, and the site serves
the same file. To read it before you run it, end the line with | less
in place of | sh. It never runs sudo and never edits a shell profile.
The same file can be taken straight from the repository, for when the site
cannot be reached:
curl -fsSL https://raw.githubusercontent.com/lamplitlabs/hive/main/scripts/install.sh | sh
What it does, in order:
- Finds the machine. macOS or Linux, on arm64 or x86_64 (the targets). The Linux that WSL runs on Windows is a Linux here. On anything else it names the machine, prints the line that builds Hive from source and stops. A Linux whose C library is musl (Alpine, for one) is told that the release is built for glibc. A Windows shell that is not WSL (Git Bash, MSYS, Cygwin) is told that Hive runs inside WSL, with the two lines that get it there (Windows).
- Finds the release. The latest one, or the one you name. It reads
the release's
SHA256SUMSfirst, and that file names the release's archives. So it makes no call to the GitHub API, and GitHub's hourly limit on API calls from one address does not stop an install. - Downloads and checks. It downloads the archive for the machine with
curl(orwgetwhere there is nocurl) into a temporary directory, and compares the archive's SHA-256 with its line inSHA256SUMS, usingsha256sumorshasum. A digest that differs stops it. So does a machine with neither tool: nothing is installed unchecked. With only BusyBox'swgetto download with it stops before it downloads anything, because thatwgetdoes not check a server's certificate. - Tries the program. It writes the program beside the place it will
go and runs it once (
hive version). A program that does not start on this machine is removed again, and the script says why: on Linux the usual reason is an older glibc than the release is built for. On macOS it first signshiveon your machine the wayhive updatedoes, with no certificate, so macOS does not ask about your folders again after an upgrade (runner.md). - Puts it in place.
~/.hive/bin/hive, mode 755, moved there in one step, so an olderhivestays whole until the new one takes its place. The temporary directory is removed when the script ends, and a run that fails leaves nothing behind. - Says what is next. Where the program is, whether that directory is
on your
PATH(with the line to add when it is not), and the command to run:hive hub.
Options go after sh -s -- when the script is piped, or after the file
name (sh install.sh --hand):
| Option | Variable | What it does |
|---|---|---|
--hand |
installs hive-hand in ~/.hive-hand/bin, and not hive |
|
--version TAG |
HIVE_VERSION |
installs the release TAG (v0.2.0), and not the latest one |
--dir DIR |
HIVE_INSTALL_DIR for hive, HIVE_HAND_INSTALL_DIR for hive-hand |
installs into DIR |
--help |
prints the options | |
HIVE_RELEASE_BASE |
reads releases from another address than https://github.com/lamplitlabs/hive/releases: a mirror, or with curl a folder (file:///...), laid out as below |
curl -fsSL https://hivefleet.dev/install.sh | sh -s -- --version v0.2.0
curl -fsSL https://hivefleet.dev/install.sh | sh -s -- --hand
Give HIVE_VERSION to that one command (... | HIVE_VERSION=v0.2.0 sh)
and do not export it: a build from source reads the same variable to stamp
the binary. HIVE_INSTALL_OS and HIVE_INSTALL_ARCH stand in for what
uname says; the installer's own test uses them.
Under HIVE_RELEASE_BASE the script reads three addresses:
latest/download/SHA256SUMS for the latest release, and for a release
TAG, download/TAG/SHA256SUMS and download/TAG/<archive>.
What the check proves. The archive you got is the one the release lists: a download that was damaged, cut short or swapped on the way is refused. It does not prove who built the release, because the checksums come from the same place as the archive, and a release carries no signature of its maker.
Upgrading. Run the same line again, or use hive update.
Hive's services (hive service install) notice the new program on disk
and restart on it by themselves: the runner once its runs in flight have
ended or been put on hold, the console once no conversation is at work
(hive update has the details, and
runner.md the services). A hive hub
you started by hand keeps running the old program until you start it
again. To go back to an older release, run the line with --version and
its tag.
Hearing about new releases. A fresh install does not look for
releases by itself: update.latest_url is empty until you set it
(below). hive update and
hive update --check do not wait for the setting when you run them by
hand: while it is empty they look at the project's own releases,
https://api.github.com/repos/lamplitlabs/hive/releases/latest, for that
one run, and say so. To hear of a release without asking, set it once:
hive settings set update.latest_url https://api.github.com/repos/lamplitlabs/hive/releases/latest
From then on Hive looks once a day and says when a release is out. The
console's Update now button needs the setting too, and so does
daemon.self_update release,
which has the runner install each release by itself. hive update
installs a release on a machine that follows the release channel
(the two channels).
The test of the installer is scripts/tests/install-test.sh. It makes up
a release of stub programs in a temporary directory, runs the installer
against it with a home of its own, and needs no network.
The targets
| Machine | Target |
|---|---|
| macOS on Apple silicon | aarch64-apple-darwin |
| macOS on Intel | x86_64-apple-darwin |
| Linux on x86_64 | x86_64-unknown-linux-gnu |
| Linux on arm64 | aarch64-unknown-linux-gnu |
The Linux programs are built on Debian 12, and the release workflow fails when one of them asks for a glibc newer than 2.36. So they run on Debian 12, on Ubuntu 24.04 and on anything with a glibc that new or newer. That number is what a release promises, and a build may ask for less: the workflow prints what each binary asks for, and the installer does not read the version, it tries the program, so a somewhat older Linux where the program starts is not turned away. On a Linux where it does not start, on a Linux with another C library, and on any other processor, build from source:
cargo install --git https://github.com/lamplitlabs/hive --locked --root ~/.hive hive # from source: Rust 1.95+, Node.js 22+
The macOS programs are not notarized. Gatekeeper does not check a program
that curl downloads and the installer copies, but Finder may refuse one
that a browser downloaded (xattr -d com.apple.quarantine hive clears
that).
Where a release is tried
On 24 November 2026 the install line was run for v0.1.6 on each system
below, on GitHub's machines, and what it installed was tried with
scripts/tests/smoke-installed.sh: the program starts, it makes a store
and reads it, and its console answers.
| System | Processor | How |
|---|---|---|
| macOS 26, macOS 15 | arm64 and x86_64 | the install line; Homebrew |
| Ubuntu 26.04, 24.04, 22.04 | x86_64 and arm64 | the install line; Homebrew on 24.04 |
| Debian 13 and 12, Fedora, Rocky Linux 9, Amazon Linux 2023, Arch, openSUSE Tumbleweed | x86_64 | the install line, in a container |
| Windows Server 2025 with WSL 2: Ubuntu 24.04, Ubuntu 22.04, Debian 13 | x86_64 | the install line inside the Linux, typed there, in PowerShell and in the old command prompt; the console asked from Windows; the services, on Ubuntu 24.04 and Debian 13; Homebrew inside Ubuntu 24.04 |
v0.1.6 asks for glibc 2.34, which is why it starts on Rocky Linux 9 (2.34)
and Ubuntu 22.04 (2.35), below the 2.36 a release promises. It was told no,
as it should be, on Ubuntu 20.04 (glibc 2.31), AlmaLinux 8 (2.28) and
Alpine (musl). Amazon Linux's container image has no tar, which the
installer asks for by name.
The workflow .github/workflows/install-check.yml asks the same of the
latest release every Monday, of a pull request that changes the installer,
and when it is started by hand: the install line on macOS and Linux, in
containers of the other Linux systems, through Homebrew, and inside WSL
with the services and the console asked from Windows. It reads no secret.
It leaves out macOS 15 on Apple silicon, where GitHub often has no machine
to give and then cancels the job: the release workflow starts the program
on that system for every release, on the machine that builds it.
To try an installed hive on your own machine the same way:
sh scripts/tests/smoke-installed.sh # ~/.hive/bin/hive
sh scripts/tests/smoke-installed.sh "$(command -v hive)"
It gives the program a home of its own in a temporary directory, so your Hive is not read and not changed, and it calls no model.
hive-hand
curl -fsSL https://hivefleet.dev/install.sh | sh -s -- --hand
puts hive-hand in ~/.hive-hand/bin, checked the same way. The machine
then joins your Hive with the line the console shows under Machines,
Add a machine, Run one command on it, Get a join code
(machines.md):
hive-hand join --brain URL CODE
That line enrols the machine and then stays connected, so it does not
return by itself. hive-hand dial is for every later start.
Homebrew
brew install lamplitlabs/tap/hivefleet # with Homebrew, on macOS, Linux and WSL; installs hive
and on a machine that only takes work from your Hive:
brew install lamplitlabs/tap/hivefleet-hand
The formula is called hivefleet, after the site, because Homebrew's own
list already has a formula named hive (Apache Hive). The program it
installs is hive all the same, so the formula says it conflicts with
that one. The name is given in full, tap and all, the first time: that is
how Homebrew is told that you trust this one formula of a tap that is not
its own.
Homebrew downloads the archive the installer would take, for macOS or
Linux on arm64 or x86_64 (the Linux inside WSL is one), and checks it
against the SHA-256 written in the
formula. That digest is the archive's line in the release's SHA256SUMS,
so the check proves what the installer's check proves and no more
(above). Nothing is built on your machine. Homebrew puts
hive on your PATH itself, so what is left is:
hive version
hive hub # the console, at http://127.0.0.1:8765
Upgrading is brew upgrade hivefleet. Homebrew owns the file, so Hive
never writes over it: hive update names that command and installs
nothing, the console's banner shows the command and no Update now
button, and daemon.self_update installs nothing
(A hive a package manager installed).
hive update --check still says whether a release is out. Hive's services
pick an upgrade up by themselves, as they do after hive update:
hive service install starts them by the path Homebrew keeps the same from
one version to the next, $(brew --prefix)/opt/hivefleet/bin/hive, and
they watch that path for the new program.
On macOS the installer signs hive so that macOS keeps its answer
about your folders across upgrades
(runner.md). A hive from Homebrew is
left as Homebrew wrote it, and every version is a new file in a new place.
So macOS may ask again, after an upgrade, about a project that lives under
Desktop, Documents or Downloads.
On Linux, Homebrew 7.0 can end an install with
lamplitlabs/tap/hivefleet-hand: Broken pipe. Run the same line again. On
GitHub's x86_64 machines this happened to the second formula installed
from the tap in one session, ten times in thirteen, and never to the
first. The second try went through each time, six of six. It did not
happen with HOMEBREW_GITHUB_API_TOKEN set (four of four), on arm64
(three of three) or on macOS. The formula is not what fails: whichever of
the two is installed first goes in, and the other is the one that stops.
Checking a download by hand
Every release has one SHA256SUMS file beside its archives. To do by
hand what the installer does:
tag=v0.2.0
target=aarch64-apple-darwin
files=https://github.com/lamplitlabs/hive/releases/download/$tag
curl -fsSLO "$files/hive-$tag-$target.tar.gz"
curl -fsSLO "$files/SHA256SUMS"
shasum -a 256 -c SHA256SUMS --ignore-missing # on Linux: sha256sum -c SHA256SUMS --ignore-missing
tar -xzf "hive-$tag-$target.tar.gz"
mkdir -p ~/.hive/bin && install -m 755 "hive-$tag-$target/hive" ~/.hive/bin/hive
hive version
The check prints hive-v0.2.0-aarch64-apple-darwin.tar.gz: OK and fails
when the digest differs. --ignore-missing passes over the lines of the
archives you did not download. For hive-hand the archive is
hand-$tag-$target.tar.gz and the program inside it hive-hand. Once
hive is installed, hive update (below) takes over.
How a release is cut
Two workflows in .github/workflows/:
- cut-release.yml decides the version, writes it into
Cargo.toml([workspace.package] version),Cargo.lockandweb/hub/package.json, commitsrelease: vX.Y.Zonmain, tags it and pushes. It runs every night at 03:00 UTC and does nothing whenmainhas not moved since the last release tag. Run it by hand from the Actions tab (Run workflow) for a release now, pickingpatch,minorormajor. The nightly run bumps the patch unless a pull request merged since the last tag carries the labelrelease: minororrelease: major. It looks only at merge commits, so the label counts on a pull request merged with a merge commit and not on one that was squashed or rebased. - release.yml runs when a
vX.Y.Ztag is pushed (cut-release starts it explicitly, since a push made with the workflow token starts no workflow on its own). For each of the four targets it buildshivewith the console embedded, checks that the binary reports the tag inhive versionand that the console is in it, buildshive-hand, checks that it carries none of the brain's brief text (scripts/check-hand-deps.sh), and packs each program in an archive of its own. It then makes sure all eight archives are there, writes oneSHA256SUMS, installs both programs from those files withscripts/install.sh, writes the two Homebrew formulae from the sameSHA256SUMS(scripts/brew-formula.sh), and publishes a GitHub Release with the archives,SHA256SUMSand notes that say how to install and list the commits since the previous tag. A last job pushes the formulae to the Homebrew tap.
What a release carries:
| Asset | Holds | Targets |
|---|---|---|
hive-<tag>-<target>.tar.gz |
hive-<tag>-<target>/hive |
the four |
hand-<tag>-<target>.tar.gz |
hand-<tag>-<target>/hive-hand |
the same four |
SHA256SUMS |
one sha256sum line for each archive above |
- Only hive's archives start with
hive. Whenhive updatefinds no archive under the exact name, it takes the one asset that starts withhiveand names its target, so no other asset may. That is why the Homebrew formulae are not assets:hivefleet.rbwould be one. - Linux is built inside Debian 12, natively on each architecture, on
GitHub's
ubuntu-24.04andubuntu-24.04-armrunners in therust:1.95-bookwormimage. A binary linked against a newer C library than the one it finds does not start, and Debian 12 is also what the image indeploy/runs. A step fails the build when a binary asks for more than glibc 2.36; the installer names the same number when a program does not start on a Linux. - macOS is built on the
macos-15(Apple silicon) andmacos-15-intelrunners. - A release goes out whole. When one target does not build, nothing is published: no release lacks an archive the installer would ask for.
- Rights. To build and publish, the workflow uses no secret but its
own token, and only the job that publishes may write to the repository.
The one other secret,
HOMEBREW_TAP_TOKEN, is optional. Only the tap job reads it, and it gives access to the tap repository alone. - Releases cut before this workflow built Linux carry
hivefor macOS only. The installer says so when you ask one of them for another target.
By hand, a release is a tag:
git checkout main && git pull
git tag -a v0.2.0 -m "Hive v0.2.0" && git push origin v0.2.0
A tag you push yourself starts release.yml. To build a tag again, after a
run that failed for example, start it from the Actions tab or with
gh workflow run release.yml -f tag=v0.2.0. Two runs for one tag take
turns.
The version a binary prints comes from crates/hive/build.rs: an exact
release tag at HEAD gives vX.Y.Z; a later commit on main gives
vX.Y.(Z+1)-0.<stamp>-<rev>, which the update check and hive version
treat as newer than vX.Y.Z and older than the next release. The release
vX.Y.Z such a build follows is the nearest release tag the checkout
reaches or the version in Cargo.toml, whichever is higher. cut-release
writes that version in the commit it tags, so a checkout without the newer
tags still stamps its builds past the release they contain. The daemon
fetches a project's upstream with --no-tags, and one checkout held no tag
after v0.1.6: its build six commits past v0.1.8 called itself
v0.1.7-0.<stamp>-<rev>, and hive update --check offered it v0.1.8.
Only a tag at HEAD makes a build read as the release itself: built at the
release commit without that tag, it reads as vX.Y.(Z+1)-0.<stamp>-<rev>
too. A tag at HEAD that is lower than the version in Cargo.toml is not
the version either: it counts as one more older tag, so no build is stamped
older than the version in Cargo.toml. Squashing main to a new root
orphans the release tags, and the version in Cargo.toml alone then gives
the base; v0.0.0-<stamp>-<rev> is left for a tree whose Cargo.toml names
no plain X.Y.Z either.
The Homebrew tap
brew install lamplitlabs/tap/hivefleet reads the formula from the
repository lamplitlabs/homebrew-tap, file Formula/hivefleet.rb. The
release workflow writes hivefleet.rb and hivefleet-hand.rb for every
release and pushes them there in its last job, when the secret
HOMEBREW_TAP_TOKEN is set. To set that up, once:
-
Create the public repository
lamplitlabs/homebrew-tap, with a README so that it has a first commit. For a repository of another name, set the Actions variableHOMEBREW_TAP_REPOSITORYtoOWNER/homebrew-NAME; Homebrew calls that tapOWNER/NAME. -
Make a fine-grained personal access token whose only repository is the tap, with the permission Contents: Read and write. GitHub makes one in the browser only, under Settings, Developer settings, Personal access tokens, Fine-grained tokens, Generate new token. This address opens that form with the name, the owner, the longest expiry GitHub offers and the permission filled in:
https://github.com/settings/personal-access-tokens/new?name=hive+homebrew+tap&target_name=lamplitlabs&expires_in=366&contents=writeUnder Repository access choose Only select repositories and pick the tap, then Generate token and copy it. It is shown once.
-
Save it in the Hive repository as the Actions secret
HOMEBREW_TAP_TOKEN:gh secret set HOMEBREW_TAP_TOKEN --repo lamplitlabs/hive, which asks for the token, or Settings, Secrets and variables, Actions, New repository secret.
The token ends on the day you chose, a year on at most. Note the day: an expired token fails the tap job, and the answer is a new token under the same secret name.
What the job does and does not do:
-
Without the secret it says so and ends green. The release is out all the same, and its notes leave Homebrew out. The two files are in the run's artifact
homebrew-formulae, to commit to a tap by hand. -
A token that has expired fails the job, after the release is out.
-
A tag built again replaces that release's formulae, because its archives and so their digests are new. It does not take the tap back to an older release than the one the tap holds.
-
A release cut before the tap existed is not in it. Build its tag again (
gh workflow run release.yml -f tag=v0.2.0), or write the formulae from its checksums and commit them:curl -fsSLO https://github.com/lamplitlabs/hive/releases/download/v0.2.0/SHA256SUMS sh scripts/brew-formula.sh --tag v0.2.0 --sums SHA256SUMS --out Formula
A formula builds nothing. It names the release's four archives with their
SHA-256, puts the program in the formula's libexec with the marker
hive.managed beside it
(A hive a package manager installed),
and links it into bin. scripts/tests/brew-formula-test.sh tests the
script with neither Homebrew nor network, and runs with the workspace's
tests: it holds the formulae to the archive names release.yml publishes
and to the marker the program reads. To try a formula in Homebrew itself
against a release in a folder (releases/v0.2.0/ holding the eight
archives and their SHA256SUMS):
tap="$(brew --repository)/Library/Taps/you/homebrew-try"
sh scripts/brew-formula.sh --tag v0.2.0 --sums releases/v0.2.0/SHA256SUMS \
--out "$tap/Formula" --base "file://$PWD/releases"
git -C "$tap" init -q && git -C "$tap" add -A && git -C "$tap" commit -qm try
brew style you/try
brew install you/try/hivefleet && brew test hivefleet
brew audit --strict --formula you/try/hivefleet
Windows
Hive runs on Windows inside WSL, the Linux that Windows runs. There it is the Linux release, installed by the same line, and nothing in it is special to Windows (Run Hive on Windows has the steps):
wsl --install # once, in PowerShell as administrator; restart, then give the Linux a user name
wsl sh -c "curl -fsSL https://hivefleet.dev/install.sh | sh"
The second line is the install line, handed to the Linux from PowerShell. Typed in the Linux itself it is the line as everywhere else.
What was tried there, and what to know:
- The console runs in the Linux and opens in a Windows browser, at
http://127.0.0.1:8765orhttp://localhost:8765.hive hubcannot open the browser itself from inside the Linux, and prints the address. hive service installworks wheresystemdis the Linux's process 1, as it is in the Ubuntu thatwsl --installgives. The services are the Linux user's and start when the Linux does.- Windows stops a Linux that no window uses, after about 15 seconds, and
Hive with it.
instanceIdleTimeout=-1under[general]in the Windows user's.wslconfigkeeps it running: with that, the console still answered six minutes after the last window closed. - WSL 2 is what was tried, on x86_64. GitHub's arm64 Windows machines cannot run WSL 2, so arm64 is untried.
There is no release for Windows itself, and the installer says so in a
Windows shell that is not WSL. The whole workspace compiles for Windows,
and the hive.exe that gives starts and serves the console, but it does
not run work yet: windows-port.md says what is left.
The two channels: update.channel
| Value | What happens |
|---|---|
auto (default) |
source when a brain project is registered and cargo is on PATH, release otherwise |
source |
the daemon rebuilds hive from the brain's checkout after each landing (daemon.self_update); hive update only reports (--check) |
release |
the daemon never builds from source; hive update installs the newest published release, and every command says once per release that one is out |
Set it with hive settings set update.channel release, or in the console
under Settings → Other.
Where releases are found: update.latest_url
Both the daily check and hive update read the JSON document
update.latest_url names: a GitHub releases/latest answer
(https://api.github.com/repos/OWNER/REPO/releases/latest; for Hive's own
releases, https://api.github.com/repos/lamplitlabs/hive/releases/latest),
a GitHub releases list (drafts and pre-releases skipped), or a plain
document:
{
"version": "v1.2.3",
"url": "https://example.test/releases/v1.2.3",
"assets": [
{"name": "hive-v1.2.3-aarch64-apple-darwin.tar.gz", "url": "https://example.test/hive-v1.2.3-aarch64-apple-darwin.tar.gz"},
{"name": "SHA256SUMS", "url": "https://example.test/SHA256SUMS"}
]
}
GitHub's answer lists the same assets (name, browser_download_url,
and the API url). The setting is empty by default: Hive then makes no
check of its own and no network request for one. hive update and
hive update --check, run by hand while it is empty, read Hive's own
releases (https://api.github.com/repos/lamplitlabs/hive/releases/latest)
for that one run and say so. The setting stays empty, so the daily check,
daemon.self_update release and the console's Update now button
still wait for you to set it.
When GitHub turns the request away. GitHub limits how many API calls
one address may make in an hour without an account, and it answers 404
for the releases of a repository that is not public, such as a fork you
keep to yourself. When an api.github.com address fails over HTTP and
gh is on PATH, Hive reads it again with gh api as the account gh is
signed in with, and downloads the assets through their API addresses the
same way. Without gh the read fails: hive update says why, and the
daily check tries again a day later. Hive never stores a token: the
setting refuses a URL that carries a credential, and gh keeps its own
login.
What a release must carry
For each target it ships, one archive named
hive-vX.Y.Z-<target>.tar.gz holding the hive binary at its top (or one
folder down), plus one SHA256SUMS file listing every archive in
sha256sum form (<64 hex digits> <file name>). The targets Hive asks
for are aarch64-apple-darwin and x86_64-apple-darwin on macOS, and
x86_64-unknown-linux-gnu and aarch64-unknown-linux-gnu on Linux. The
binary inside must print the release's version from hive version --json;
a build at the exact tag does (crates/hive/build.rs), and
HIVE_VERSION=vX.Y.Z cargo build --release -p hive --locked forces it
elsewhere. release.yml above produces exactly this layout. hive update
does not read the hand- archives, and none of their names starts with
hive. The installer reads the same names and the same SHA256SUMS, so
a release that hive update can install is one the installer can
install.
hive update
hive update [--check] [--json]
--checksays whether a newer release exists. It uses what the daily check stored when that is under a day old and reads the document otherwise; it downloads nothing.- Without
--check(channelreleaseonly) it reads the document, picks the archive for the running target (the exact name first, else the onehive-*<target>*.tar.gz), downloads it andSHA256SUMS, and refuses to go on when the release has noSHA256SUMS, lists no digest for the archive, or the digest differs. It then unpacks the archive, writes the binary beside the running one ashive.new, signs it on macOS (the same ad-hoc requirement the self-update gives every build) and smoke-tests it:hive.new version --jsonmust print the release's version andhive.new helpmust exit 0. Then it copies the running binary tohive.prevand renameshive.newinto its place. Any failure before the rename leaves the running binary as it was and removeshive.new. - While
update.latest_urlis empty, both forms look at Hive's own releases,https://api.github.com/repos/lamplitlabs/hive/releases/latest, for that one run, and say so. Nothing is written to the setting. - The daemon sees its binary change on disk and restarts on it: as soon as
nothing is in flight, and otherwise when the restart drain ends
(
daemon.restart_drain_minutes, 30 by default). A run whose harness is still at work then is asked to hold (daemon.restart_hold,onby default): the harness saves its conversation, and the next daemon carries the job on in the same clone. A run that is past its harness, in its check for one, runs to its end first. - The hub looks at its binary every 30 seconds and restarts when no conversation is at work. Otherwise it waits for the turns in flight, for up to 30 minutes, and then stops them and restarts.
- The two services (
hive service install) do this by themselves. A daemon you started by hand exits with code 3 and is yours to start again. Ahive hubyou started by hand keeps running the old program until you start it again, unless you gave it--restart-on-change. - Roll back with
mv ~/.hive/bin/hive.prev ~/.hive/bin/hive. - An install writes the event
hive.update(from, to, binary, asset, sha256).
On the source channel hive update refuses to install and says how to
switch; hive update --check still reports. A hive that a package
manager installed is left to that manager, on either channel (next
section).
A hive a package manager installed
Hive replaces its own program file when it updates: hive update, the
console's Update now and both modes of daemon.self_update write a new
file over the one that runs. A file that a package manager installed is
that manager's to replace. It says so with a marker beside the program,
named after it: hive.managed beside hive, hive-hand.managed beside
hive-hand.
by=Homebrew
upgrade=brew upgrade hivefleet
path=/opt/homebrew/opt/hivefleet/bin/hive
| Line | What it says |
|---|---|
by |
who installed the program; Hive uses the name in what it prints |
upgrade |
the command that brings a newer version; Hive prints it and never runs it |
path |
the path that names the program from one version to the next, for a package manager that keeps every version in a directory of its own |
Each line is optional: the file being there is what counts. Hive reads it beside the real file, symbolic links followed, once, when the program starts. An upgrade removes the old version's files, the marker among them, while a daemon started from them may still run, and that daemon goes on knowing whose file it is. With a marker:
hive updaterefuses before it reads anything, and names theupgradecommand.hive update --checkreports as always, and its second line is that command. With--jsonboth carrymanaged_byandupgrade_command, and so doeshive version --json.- The console's banner shows the command and no Update now button, and
POST /api/v1/update/applyanswers 409 in the same words. daemon.self_updateinstalls nothing in either mode and reads no release document. It says why once, in the daemon's log.- The once-per-release line ends with the
upgradecommand, whateverupdate.channelsays. hive service installwritespathinto the services' launchers while it leads to the program that runs, and the daemon and the console watch that path for the next version. It does not sign the file again on macOS.hive-hand dialstarts its work bypathtoo.
Whoever can write beside the program can replace the program, so the marker gives nobody a right that directory had not given already. The Homebrew formulae write it. A package for another system can do the same: put the program where that system keeps it, write the three lines beside it, and name the path people start it by.
daemon.self_update release: a machine without source
A machine can run Hive without holding its source: one that got Hive from
the installer need not have a checkout of it, and the container image in
deploy/ is built to hold none (security.md). The source
self-update has nothing to build there. hive settings set daemon.self_update release makes the daemon do what hive update does,
on its own:
- once an hour it reads the document
update.latest_urlnames (an empty setting says so once and does nothing); - when a newer release exists, it installs it exactly as above: the archive
for the running target, its
SHA256SUMSline, signed, smoke-tested, swapped in with the old binary kept ashive.prev; - it then restarts the way
hive updateabove describes, as the source self-update does (exit 3; the service ordeploy/entrypoint.shstarts it again). A failed install leaves the running binary alone, says why in the daemon's log and is tried again afterdaemon.self_update_retry_minutes.
It never runs cargo and never reads the brain's checkout, and it works
whatever update.channel says. It installs nothing over a hive that a
package manager installed
(above). With brain.code none the source mode
(on) stands down and points here. The test is
release_update::tests::self_update_release_mode_installs_the_release_and_never_runs_cargo
in crates/hive-runner.
Linux needs a Linux archive. A release cut by the workflow above
carries x86_64-unknown-linux-gnu and aarch64-unknown-linux-gnu, built
against the C library of Debian 12, which the image in deploy/ runs. A
container started by deploy/brain.sh therefore finds an archive for its
target in such a release. A release cut before the workflow built Linux
carries none: the daemon says so and keeps the binary it has. Rebuild the
image (deploy/brain.sh build vX.Y.Z) to update it then.
The once-per-release line
On the release channel, when the stored check knows a newer release, the
owner's next command prints one line on stderr and then stays quiet until
the next release:
A newer Hive v1.2.3 is available - run: hive update
It reads the store only (no network). Commands run as an agent or inside a
job never print it, nor do read-only commands; the release it last named is
kept in the store's meta row update.prompted. hive version keeps
printing its own notice line every time. On a hive that a package manager
installed the line ends with that manager's command, as in
A newer Hive v1.2.3 is available - run: brew upgrade hivefleet, and it is
printed on the source channel too, since nothing is built over that file.
The console
The banner above every page (except chat) shows the stored notice with the
release link. On the release channel it also has an Update now
button, which asks the hub to install the release the way hive update
does (POST /api/v1/update/apply) and then shows how the install went.
The hub refuses, and says why, on the source channel, while
update.latest_url is empty and while an install is already running.
Where a package manager installed Hive the banner has no button on any
channel: it names that manager and shows its command.
Code: scripts/install.sh (the installer), scripts/tests/install-test.sh
(its test), scripts/brew-formula.sh (the Homebrew formulae),
scripts/tests/brew-formula-test.sh (its test),
.github/workflows/release.yml (what a release carries),
crates/hive-cli/src/update.rs (the pure parts: assets, checksums, channel,
the prompt), crates/hive-runner/src/release_update.rs (download, verify,
install, hive update), crates/hive-runner/src/update_check.rs (the daily
check), crates/hive-hand-core/src/managed.rs (the marker of a program a
package manager installed).