Repository navigation
feat: daily update notifier - #7
Open
RogerCecilpot wants to merge 1 commit into
Open
RogerCecilpot wants to merge 1 commit into
RogerCecilpot wants to merge 1 commit into
Conversation
RogerCecilpot
force-pushed
the
feat/259-update-notifier
branch
from
October 25, 2026 12:56
40661da to
479e755
Compare
RogerCecilpot
changed the base branch from
feat/246-output-errors-exit-codes
to
feat/236-api-clients
October 25, 2026 12:57
RogerCecilpot
force-pushed
the
feat/236-api-clients
branch
from
October 25, 2026 13:00
2b30855 to
87da037
Compare
RogerCecilpot
force-pushed
the
feat/259-update-notifier
branch
from
October 25, 2026 13:00
479e755 to
4bfb39f
Compare
At most once a day, check the latest GitHub release in the background while the command runs and, if it is newer, print a notice to stderr after a successful command (with the brew upgrade command for Homebrew installs). The finished command waits at most 250ms for the check, which itself times out after 2s; failures are silent. Skipped when CI is set, stderr is not a terminal, DEVLYFT_NO_UPDATE_NOTIFIER is set, for dev builds, and for `version` and `completion`. The last check time is cached in the user cache directory (0600). The README documents that there is no telemetry in v1. Refs devlyft/devlyft#259 Co-Authored-By: Claude Opus 5.5 <[email protected]>
RogerCecilpot
force-pushed
the
feat/236-api-clients
branch
from
October 25, 2026 13:32
87da037 to
5478dce
Compare
RogerCecilpot
force-pushed
the
feat/259-update-notifier
branch
from
October 25, 2026 13:32
4bfb39f to
60cf131
Compare
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.
Closes devlyft/devlyft#259. Stacked on #5 (which is stacked on #2); retarget once those merge.
What
internal/update:Enabled(off whenCIis set,DEVLYFT_NO_UPDATE_NOTIFIERis set, stderr isn't a TTY, or the build has no semver version, e.g.dev),Checker.Check(unauthenticated GET ofhttps://api.github.com/repos/devlyft/cli/releases/latest, compared withgolang.org/x/mod/semver),Notice,IsHomebrew.os.UserCacheDir()/devlyft/update-state.json(0600, written atomically). Within 24h no request is made and no notice is printed. A failed check isn't recorded, so the next run retries. A check time in the future (clock moved back) doesn't suppress checks.cli.Executestarts the check in a goroutine before the command and, after a successful command, prints the notice to stderr only if the result arrives within 250ms (the request itself times out after 2s). Failed commands print nothing extra, so--format jsonerrors on stderr stay a single JSON object.versionandcompletion(and Cobra's hidden__complete) never show it.A new release of devlyft is available: 0.1.0 → 0.2.0+ the release URL, plusbrew upgrade devlyft/tap/devlyftwhen the executable is under a Homebrew prefix (tap from #258).Tests
A test for each disable path (CI, env var, non-TTY, dev build), newer/equal/older/prerelease versions, the 24h cache making no request, state file mode, server errors/rate limiting/invalid tags/network failure being silent and retried, and the notifier only printing after success when the result is ready.
make lint,make test,make vulnpass.Notes
/releases/latestreturns 404, which is silent.🤖 Generated with Claude Code