Skip to content

Add versioned CLI help and update command#16

Merged
PabloZaiden merged 2 commits into
mainfrom
print-cli-version-in-help-and-implement-33d7449
May 4, 2026
Merged

Add versioned CLI help and update command#16
PabloZaiden merged 2 commits into
mainfrom
print-cli-version-in-help-and-implement-33d7449

Conversation

@PabloZaiden

Copy link
Copy Markdown
Owner

Summary

  • Added CLI version metadata and included it in help output.
  • Implemented the update action with supporting update logic.
  • Documented the new update command usage in the README.
  • Added tests covering CLI help behavior and update command flows.

Changes

  • Introduced src/version.ts for shared version handling.
  • Added src/server/update.ts and comprehensive update tests.
  • Wired the update command into CLI command handling and TypeScript configuration.

Copilot AI review requested due to automatic review settings May 4, 2026 13:34

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 (update command) 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.

Comment thread src/server/update.ts
Comment thread src/server/update.ts
Comment thread src/server/update.ts
Comment thread src/server/cli.ts
@PabloZaiden
PabloZaiden merged commit 4fcade4 into main May 4, 2026
1 check passed
@PabloZaiden
PabloZaiden deleted the print-cli-version-in-help-and-implement-33d7449 branch May 4, 2026 13:49
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.

2 participants