Upgrading
shep upgrade replaces the binary through the channel shep came from, reloads the shepherd, then upgrades the dogs. The binary on disk changes nothing that is already running. shep daemon reload is what moves a live flock onto it.
Replacing the binary
shep lists what is newer, asks once, and runs the channel's own command in the foreground. Which command depends on how shep was installed:
| Install channel | Command shep runs |
|---|---|
| Homebrew | brew upgrade shep |
| cargo | cargo install --locked shep |
| Scoop | scoop update shep |
| winget | winget upgrade shep-pm.shep |
| Chocolatey | choco upgrade shep |
A .deb or an archive | none: shep prints the steps |
The reload question
Once the new shep is on PATH, a shepherd that is running gets one question on a terminal: Reload the shepherd onto 0.25.0 now? [Y/n]. Enter says yes. --reload answers it in advance. With no terminal to ask, shep reloads nothing and prints shep daemon reload for you to run. The dogs are upgraded either way.
On Windows
The shepherd holds shep.exe, so shep does not run the command. It prints it, with shep daemon reload to run after. Windows cannot hand the flock over, so the flock restarts on that reload.
Replacing the binary by hand
A channel shep cannot run gets steps instead. For a .deb, download it from the latest release, check it against SHA256SUMS and install it with sudo dpkg -i shep_*.deb. For an archive, download the one for your target, check it the same way and put the shep inside it where the old one is. By hand, the shepherd keeps the code it booted with until you reload it, and each dog keeps its own until you upgrade it.
What carries across
A flock that can be carried keeps running through the reload. The shepherd replaces its own image in place, so every sheep keeps the pid it already had and its log carries on where it was. The dogs cross with it rather than being stopped and started alongside the flock; the dogs page says what each one does on the far side. One that cannot be carried is stopped and started instead, which moves every pid and starts every log again; the next section says which flocks those are.
If a dog cannot talk to the new shepherd, the reload names it. It waits for the dogs to reconnect first, so the answer is about the shepherd now running, not the one it replaced.
Listing the built-in dogs in shep flock never costs a sheep. One you already named metrics or bark keeps its name and its id. The shepherd leaves that dog out, warns at boot to rename one of the two, and restores the sheep even when [daemon] boot_first_dogs names the dog.
When it cannot carry
One thing still sends a reload down the older path: a sheep whose log pump has stopped answering. The shepherd cannot say which files that sheep is writing to, so it stops and starts the flock instead and names the sheep that held it back. Coming from 0.1.17 or earlier, the first reload always takes that path too: the shepherd being replaced predates the handover and has nothing to hand over with.
A reload re-reads the config too
The reload re-reads shep.toml too, and always has. So it is also the command for a changed log level, a new socket path or an edited [interpreters] table, with no new binary involved. It is a different verb from shep reload <sheep>, which replaces one sheep's processes and reads no file at all: the shepherd's own config and an app's Flockfile are two separate things that happen to share a word.
It re-reads enabled_dogs with it. A dog the new file no longer names is stopped and marked disabled, running or already stopped, and one already parked is registered at rest under a new id.
Version skew
shep upgrade offers (or shep daemon reload by hand) and the new binary answers shep --version while the running shepherd is still the
old one. flock, describe and bleats only warn. kill and ping always work. Every other verb refuses and names shep daemon reload.
Over --host the check is the protocol, not the version: an older shep on the same protocol is written to, with one version_skew notice. Another protocol refuses, naming both numbers and the fix on whichever side is behind: a reload over ssh for a host behind this build, the install channel's own command here for one ahead.
An older shep re-running shep start <Flockfile> gets the shepherd's refusal on a disabled sheep's row and stops there, so the rest of the file does not start.
shep start <Flockfile> used to be the one verb that did not refuse cleanly across that skew: applying a Flockfile is additive, so the number did not move, and the handshake passed while the shepherd then ended the connection on an envelope it could not read. It refuses cleanly now, because the --reset flag's own wire spelling changed, which is not additive. The number has moved twice more since, both for additive changes. Reloading first is still the whole fix.
Going back to an older version
An older shep reads no disabledmarks out of a handover blob or a flock file. A parked sheep stays down and loses its guard: start, restart andstock stop refusing it, a sweep or a re-run Flockfile starts it, and nothing holds it down after that. shep flock stops saying disabled. Run shep disable again after going back.