Skip to content

feat: add self-update mechanism (CLI + dashboard)#132

Merged
CalebisGross merged 1 commit intomainfrom
feat/self-update
Mar 14, 2026
Merged

feat: add self-update mechanism (CLI + dashboard)#132
CalebisGross merged 1 commit intomainfrom
feat/self-update

Conversation

@CalebisGross
Copy link
Copy Markdown
Collaborator

Summary

  • Adds mnemonic check-update and mnemonic update CLI commands that check GitHub Releases for newer versions and download/install them with zero configuration
  • Adds GET /api/v1/system/update-check and POST /api/v1/system/update API endpoints
  • Adds a green "update available" badge in the dashboard nav that lets users update with one click
  • Downloads platform-specific archive, verifies SHA256 checksum, atomically replaces binary, and auto-restarts the daemon via the service manager
  • No GitHub auth needed (public repo), permission errors guide users to sudo or brew upgrade

Test plan

  • make build compiles cleanly
  • make check (fmt + vet) passes
  • golangci-lint run passes on all changed packages
  • Unit tests pass: version comparison, checksum verification, binary extraction, mock GitHub API
  • mnemonic check-update CLI works (tested against live GitHub API)
  • GET /api/v1/system/update-check API endpoint returns correct JSON
  • Dashboard badge appears when running an older version
  • End-to-end mnemonic update with an actual older binary

🤖 Generated with Claude Code

Add ability for users to check for and install updates directly from the
CLI or the web dashboard, with zero configuration required.

- New `internal/updater/` package: checks GitHub Releases API (no auth),
  downloads platform-specific archive, verifies SHA256 checksum, extracts
  binary, and atomically replaces via os.Rename
- CLI: `mnemonic check-update` and `mnemonic update` commands
- API: GET /api/v1/system/update-check, POST /api/v1/system/update
- Dashboard: green "update available" badge in nav, click-to-update with
  confirmation, toast notifications, auto-restart via service manager
- Permission errors guide users to sudo or `brew upgrade`

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@CalebisGross CalebisGross merged commit fd1c814 into main Mar 14, 2026
7 checks passed
@CalebisGross CalebisGross deleted the feat/self-update branch March 14, 2026 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant