Skip to content

feat: offer to update and restart when a new release is out - #35

Merged
brtkwr merged 1 commit into
mainfrom
feat/self-update
Sep 23, 2026
Merged

brtkwr merged 1 commit into
mainfrom
feat/self-update

Conversation

@brtkwr

@brtkwr brtkwr commented Sep 23, 2026

Copy link
Copy Markdown
Collaborator

While ccs is open it now checks for a newer release, at startup and then hourly. When one exists, a box appears over the preview pane:

╭──────────────────────────────────────────────────╮
│                                                  │
│   ccs v0.25.0 is available (you have v0.24.1).   │
│                                                  │
│   Enter: update and restart    Esc: later        │
│                                                  │
╰──────────────────────────────────────────────────╯
  • Enter runs brew update then brew upgrade ccs in the background (the header shows "updating to v0.25.0..."), then restarts ccs with the same arguments. If the upgrade fails, the error shows and ccs keeps running.
  • Esc hides it for that version for the rest of the session. It comes back on next launch, or when an even newer version appears.
  • For the first second after it opens it ignores all keys, so an Enter or Esc you were already typing can't answer it by accident.
  • If ccs wasn't installed through Homebrew, the box only tells you a new version exists. Local dev builds never check.

The check reads where github.com/agentic-utils/ccs/releases/latest redirects to. That avoids the GitHub API, whose 60-requests-an-hour allowance for anonymous callers was already used up on this office IP when I tested.

🤖 Generated with Claude Code

https://claude.ai/code/session_01JUmkVYwbkobda1AnHuwFDE

At startup and hourly, ccs reads the newest release tag from GitHub's
releases/latest redirect (not the REST API, whose unauthenticated limit
shared IPs exhaust). If it's newer, a popup over the preview offers
Enter: brew update && brew upgrade ccs, then restart with the same
arguments; Esc: later. Keys are ignored for a second after it opens so
in-flight typing can't answer it. Non-Homebrew installs get a notice
only, and dev builds never check.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JUmkVYwbkobda1AnHuwFDE
@brtkwr
brtkwr merged commit fc8f71d into main Sep 23, 2026
1 check passed
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