Skip to Content
DocumentationDocumentationCLI Referencehams self-upgrade

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 --force

How 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 methodWhat self-upgrade does
`curlbash` script
Homebrew tapShell out to brew upgrade hams
Manual download from ReleasesPrint instructions — hams doesn’t overwrite a binary it didn’t manage

What happens during an upgrade

  1. Check the latest tag from GitHub Releases, compare to the current version
  2. Already on the latest? Stop here
  3. Download the matching binary to a temp location, verify the checksum
  4. Rename the old binary to hams.old, move the new one into place
  5. Run hams --version as 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.

Last updated on