feat(cli): add origin-aware CLI update command#18
Merged
Conversation
Add the updater flow,
leonkenneth
approved these changes
Jul 2, 2026
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.
Users need a first-class way to discover and install new Altertable CLI releases without manually checking npm or GitHub. The CLI also ships in multiple forms, so update behavior has to respect how the current process was installed:
A single overwrite path would be risky, especially for source checkouts and package-manager installs.
What Changed
Adds a new
altertable updatecommand for release discovery, installation, and automatic update-check configuration.The main flows are:
altertable updateChecks the latest CLI release and reports whether an update is available.
altertable update --installInstalls the latest available release using an origin-aware strategy.
altertable update --statusShows cached update metadata and the current automatic-check interval.
altertable update --check-interval daily|weekly|neverConfigures automatic human-facing update notices.
altertable update --clear-cacheClears cached update metadata.
altertable update --target-version <version>Checks or installs an explicit version instead of discovering latest.
Installation Behavior
--installchooses the safest installer for the current execution origin:checksums.txt, and replace the current binary using a backup/rename flow.altertable --version.automode so development trees are updated with git instead of being overwritten by release artifacts.Users can override the install strategy with:
Automatic Notices
After successful human-facing commands, the CLI can perform a quiet update check and print notices to stderr only. These checks are disabled for:
--json--agentaltertable updatealtertable completionEnvironment overrides are also supported:
Testing
fetchimplementations and temporary executable scripts.