Add interactive update notifications

Merged
RO
5mo ago
+481-0

Adds an interactive notification when a newer Fizzy CLI release is available, so users are aware of updates without needing to manually check GitHub releases. The notification stays out of machine-readable output, supports FIZZY_NO_UPDATE_NOTIFIER=1, and includes an upgrade hint when appropriate.

Closes #153.


Summary by cubic

Adds an interactive update notifier that checks GitHub for newer Fizzy CLI releases and shows a short upgrade hint in TTY sessions only. Runs in the background and never blocks the command; closes #153.

  • New Features

    • Checks GitHub Releases asynchronously and prints after the command finishes (waits up to 200ms).
    • Uses a 24h cache at ~/.local/state/fizzy/state.yml (or $XDG_STATE_HOME/fizzy); recovers from corrupt state and serves notices from cache without network within TTL.
    • Only shows in interactive TTYs; skips CI/Codespaces, machine-output modes, and non-release builds; opt out with FIZZY_NO_UPDATE_NOTIFIER=1.
    • Detects Homebrew installs; suppresses notices for <24h-old releases and shows brew upgrade basecamp/tap/fizzy when applicable.
  • Dependencies

    • Add github.com/hashicorp/go-version for SemVer parsing and comparison.