Repository navigation
feat(cli): tell interactive users when a newer release exists - #9
Merged
Merged
Conversation
Once a day, text-mode terminal runs check GitHub releases and print a one-line stderr notice pointing at `urlbox upgrade`. JSON, quiet, --jq, piped and CI runs are unchanged; URLBOX_NO_UPDATE_NOTIFIER=1 opts out. `urlbox upgrade` now checks first: a no-op when current, and it names the target version otherwise. `doctor` reports available updates as a warning. Also follows the PATH symlink so Intel Homebrew installs are detected, and treats git-describe builds as unversioned. README: list the curl installer, now served at cli.urlbox.com. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EseBeLTnUNujV1szk76ttH
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The CLI had no way of telling users a newer release was out.
urlbox upgradeexisted, but it ran the package manager blind. This adds a once-a-day "new version" notice, makesupgradecheck before acting, and hasdoctorreport available updates.New-version notice
After a command finishes, interactive users may see one faint line on stderr:
update-check.jsonnext toconfig.json, so it costs at most one request a day.--jqor piped output, whenCIis set, or for local dev builds. It's also skipped forupgradeand shell completion.URLBOX_NO_UPDATE_NOTIFIER=1.urlbox upgradeUpgrading urlbox 1.2.0 → 1.3.0, and the summary becomesUpgraded 1.2.0 → 1.3.0 via Homebrew.latestVersionandupToDate. Both are omitted if the lookup fails, and a failed lookup never blocks the upgrade./usr/local/bin/urlbox→Cellar) weren't detected and got manual instructions instead of an upgrade.urlbox doctorThe
versioncheck now says1.2.0 (1.3.0 available)as a warning, or(latest). A failed lookup stays ok, so doctor still works as a CI health check and won't fail on GitHub rate limits.Version comparison
internal/updatepackage: semver comparison, the GitHub lookup, and the cache.make buildstampsgit describeversions likev1.2.0-1-gc9d96d6-dirty, which means a commit after the tag. Those are treated as unversioned, so local builds are never told to "upgrade" backwards to 1.2.0.Docs
curl -fsSL https://cli.urlbox.com/install.sh | sh. That host is new (urlbox/urlbox-devops#863) and servesscripts/install.shfrom the latest release tag.skills/SKILL.md: theupgraderow is updated.Testing
make cipasses: gofumpt, golangci-lint v2.11.4 with 0 issues,go test -race ./..., build, and the surface check. SURFACE.txt is unchanged, since there are no new flags.v1.1.0, run against the real GitHub API, printed the1.1.0 → 1.2.0notice and wrote the cache. The next run used the cache. JSON, piped and opted-out runs were silent, anddoctorwarned. The GitHub lookup took about 0.7s.🤖 Generated with Claude Code
https://claude.ai/code/session_01EseBeLTnUNujV1szk76ttH