Add versioned CLI help and update command#16
Merged
PabloZaiden merged 2 commits intoMay 4, 2026
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds version metadata to the CLI help output and introduces a new link-cli update command that can check for and install newer GitHub release binaries, along with documentation and tests to cover the new behavior.
Changes:
- Added shared version helpers (
LINK_VERSION,formatLinkVersion) and surfaced version info in top-level CLI help. - Implemented a GitHub-release-based self-update flow (
updatecommand) with platform/asset resolution and error handling. - Added/updated tests and README docs for the new help/version output and update workflows.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tsconfig.json | Enables JSON imports to support reading version metadata from package.json. |
| src/version.ts | Introduces shared version constant + formatting used in help output. |
| src/server/update.ts | Adds the self-update implementation (release lookup + asset download + binary replacement). |
| src/server/update.test.ts | Adds tests for version parsing/comparison and update flows. |
| src/server/commands.ts | Wires the new update command into CLI command execution and passes current version. |
| src/server/cli.ts | Adds parsing/help text for the new update command and prints version in top-level help. |
| src/server/cli.test.ts | Adds tests asserting version in help output and update parsing behavior. |
| src/index.ts | Awaits async CLI command runner to support async update logic. |
| README.md | Documents the new update command usage and notes installed-binary requirement. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Summary
updateaction with supporting update logic.Changes
src/version.tsfor shared version handling.src/server/update.tsand comprehensive update tests.