hams self-upgrade
Upgrade hams to the latest release. The command figures out how you originally installed hams and uses the right upgrade path automatically.
Usage
hams self-upgrade [flags]Examples
# Straight upgrade
hams self-upgrade
# Peek at the current version first
hams --version
# hams v0.1.0 (commit: abc1234, built: 2026-04-12)
# Check if an upgrade is available, without actually upgrading
hams self-upgrade --check
# Force a reinstall of the current version (handy if the binary got corrupted)
hams self-upgrade --forceHow hams knows what to do
At install time, hams writes a channel marker to ~/.local/share/hams/install-channel that records
how you got here. self-upgrade reads that marker and chooses accordingly:
| Install method | What self-upgrade does |
|---|---|
| `curl | bash` script |
| Homebrew tap | Shell out to brew upgrade hams |
| Manual download from Releases | Print instructions — hams doesn’t overwrite a binary it didn’t manage |
What happens during an upgrade
- Check the latest tag from GitHub Releases, compare to the current version
- Already on the latest? Stop here
- Download the matching binary to a temp location, verify the checksum
- Rename the old binary to
hams.old, move the new one into place - Run
hams --versionas a sanity check. If anything goes wrong, roll back automatically
The process is deliberately atomic — a mid-flight failure won’t leave you with a half-installed hams.
No auto-updates
There’s no built-in scheduled update. hams is your machine’s personal assistant; it won’t upgrade
itself behind your back. If you want automation, drop hams self-upgrade into cron or launchd.
Don’t run self-upgrade while hams apply is in progress. The global lock will refuse with
LOCK_CONFLICT, but if something bypassed the lock you could leave yourself in a bad state.
Let the current run finish first.