Skip to content

Brew: Prompt users to update when new version is released#1057

Merged
computermode merged 2 commits intomainfrom
brew-update-msg
Apr 28, 2026
Merged

Brew: Prompt users to update when new version is released#1057
computermode merged 2 commits intomainfrom
brew-update-msg

Conversation

@computermode
Copy link
Copy Markdown
Contributor

@computermode computermode commented Apr 27, 2026

https://entire.io/gh/entireio/cli/trails/246

When there is a new version of the CLI available, offer for the user to brew upgrade to increase discoverability and promote adoption of newer releases.

Inspired by @pfleidi's discovery of Codex's auto-update prompt:
image (1)

Tested via a local test binary:

TEST_ROOT=/private/tmp/entire-pr1057-test
FAKE_HOME="$TEST_ROOT/home"
FAKE_BIN="$TEST_ROOT/bin"
FAKE_CELLAR="$TEST_ROOT/fakebrew/Cellar/entire/0.0.1/bin"

mkdir -p "$FAKE_HOME" "$FAKE_BIN" "$FAKE_CELLAR"

cat > "$FAKE_BIN/brew" <<'EOF'
#!/bin/sh
echo "[fake brew] brew $*"
exit 0
EOF
chmod +x "$FAKE_BIN/brew"

go build \
  -ldflags "-X github.com/entireio/cli/cmd/entire/cli/versioninfo.Version=0.0.1" \
  -o "$FAKE_CELLAR/entire" \
  ./cmd/entire

env -u ENTIRE_NO_AUTO_UPDATE -u CI -u ENTIRE_TEST_TTY \
  HOME="$FAKE_HOME" \
  PATH="$FAKE_BIN:$PATH" \
  "$FAKE_CELLAR/entire" version

Update available! 0.0.1 -> 0.5.6
Release notes: https://github.com/entireio/cli/releases/tag/v0.5.6
1. Update now (runs `brew upgrade entire`)
2. Skip
3. Skip until next version
Press enter to continue
Choose an option [1]: 1

Updating Entire CLI: brew upgrade entire
[fake brew] brew upgrade entire
Update complete. Re-run entire to use the new version.

➜  cli git:(brew-update-msg) ✗ command -v entire
/private/tmp/entire-pr1057-test/fakebrew/Cellar/entire/0.0.1/bin/entire -v
/Users/ninawork/entire/devenv/cli/entire
Entire CLI 0.0.1 (unknown)
Go version: go1.26.2
OS/Arch: darwin/arm64


Note

Medium Risk
Moderate behavior change in the CLI update flow: introduces a new interactive prompt path for Homebrew installs and persists a new SkippedVersion field to the version-check cache, which could affect when users are notified or prompted to update.

Overview
Adds a Homebrew-specific auto-update prompt that shows release notes and offers Update now / Skip / Skip until next version, running brew upgrade entire when accepted.

Extends the version-check cache with SkippedVersion and wires CheckAndNotify to suppress notifications for the skipped latest tag until a newer release is available. Also standardizes update messaging ("Update available!" + release notes link) and switches Homebrew update commands from brew upgrade --cask ... to brew upgrade ..., with expanded test coverage for the new prompt and caching behavior.

Reviewed by Cursor Bugbot for commit ab7a815. Configure here.

Entire-Checkpoint: 7dfdd96203a6
Copilot AI review requested due to automatic review settings April 27, 2026 23:57
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit ab7a815. Configure here.

Comment thread cmd/entire/cli/versioncheck/autoupdate.go Outdated
Comment thread cmd/entire/cli/versioncheck/autoupdate.go
Entire-Checkpoint: 48e36248a3b9
@computermode computermode marked this pull request as ready for review April 28, 2026 19:00
@computermode computermode requested a review from a team as a code owner April 28, 2026 19:00
@computermode computermode merged commit a01814a into main Apr 28, 2026
9 checks passed
@computermode computermode deleted the brew-update-msg branch April 28, 2026 20:44
shaneholloman pushed a commit to shaneholloman/entire-cli that referenced this pull request May 1, 2026
The 3-option prompt (update / skip / skip until next version) added in
PR entireio#1057 only ran for brew. mise, scoop, and the curl-bash fallback
still showed the older Y/N huh form with no skip-until-next-version
support. Collapse the brew-only branch in MaybeAutoUpdate so every
auto-installable install manager goes through the same prompt with the
installer command substituted into option 1. Wording stays byte-identical
to the brew prompt; only the cmdStr varies. Drop the now-unused Y/N huh
form and confirmUpdate seam.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: 8b5a28921a47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants