Skip to content

Conversation

@rgarcia
Copy link
Contributor

@rgarcia rgarcia commented Jan 9, 2026

Summary

  • Add a new kernel upgrade command (with update alias) that automatically detects how kernel was installed (brew, pnpm, npm, bun) and runs the appropriate upgrade command
  • Falls back to manual wget/tar instructions for unknown installation methods
  • Shows release URL so users can view release notes
  • Add --dry-run flag to preview what would be executed (shows detected method, binary path, and command)
  • Detects Homebrew upgrade failures and suggests uninstall/untap/reinstall for old tap users
  • Move DetectInstallMethod to pkg/update and refactor SuggestUpgradeCommand to use it
  • Export FetchLatest and IsNewerVersion from pkg/update for reuse
  • Remove obsolete old-tap migration logic (taps now mirrored on both orgs)
  • Add upgrade to auth-exempt commands list (no authentication required)

Test plan

  • go build ./... passes
  • go test ./... passes
  • kernel upgrade --help displays correct usage information
  • kernel update --help works (alias)
  • kernel upgrade --dry-run shows the detected installation method, binary path, and upgrade command
  • Manual testing: run kernel upgrade with different installation methods (brew, npm, pnpm, bun)

Note

Introduces a first-class kernel upgrade command (alias: update) with install-method detection and streamlined upgrade execution.

  • New cmd/upgrade.go: detects install method (brew, pnpm, npm, bun), runs the appropriate command, supports --dry-run, prints release notes, and falls back to manual download instructions; adds guidance for Homebrew old-tap errors
  • Registers upgrade subcommand in cmd/root.go and adds it to auth-exempt commands
  • Refactors pkg/update: exports FetchLatest and IsNewerVersion; adds InstallMethod enum and DetectInstallMethod; simplifies SuggestUpgradeCommand to use detection; updates callers to use exported functions

Written by Cursor Bugbot for commit 573972a. This will update automatically on new commits. Configure here.

Add a new upgrade command that automatically detects how kernel was
installed (brew, pnpm, npm, bun) and runs the appropriate upgrade
command. Falls back to manual wget instructions for unknown installation
methods.

- Export FetchLatest and IsNewerVersion from pkg/update for reuse
- Add --dry-run flag to preview upgrade command without executing
- Add upgrade to auth-exempt commands list
Copy link
Contributor

@tembo tembo bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice addition—kernel upgrade is a big UX win.

Left a few inline nits mostly around making --dry-run output more informative, making manual instructions paste-safe, and thinking about whether “unknown install method” should be a non-zero exit once you’ve printed manual steps.

- Add "update" as alias for "upgrade" command
- Show release URL when new version is available
- Normalize version display (strip 'v' prefix from both versions)
- Move DetectInstallMethod to pkg/update for reuse by SuggestUpgradeCommand
- Remove obsolete old-tap migration logic (taps now mirrored on both orgs)
- Make --dry-run output more informative (show detected method and binary path)
- Quote binaryPath in manual instructions for paths with spaces
- Detect Homebrew upgrade failure and suggest uninstall/untap/reinstall
- Refactor to struct pattern (UpgradeCmd/UpgradeInput) for testability
- DRY up command duplication with shared upgradeCommandArgs()
- Capture stderr to detect old Homebrew tap errors specifically
- Return success on unknown install method (manual instructions shown)
- Remove generic brew failure message, only show when old tap detected
@rgarcia rgarcia requested a review from tnsardesai January 11, 2026 14:12
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.

2 participants