Skip to content

feat: Add self-update command#1

Merged
shahariaazam merged 1 commit intomainfrom
dev
Nov 5, 2025
Merged

feat: Add self-update command#1
shahariaazam merged 1 commit intomainfrom
dev

Conversation

@shahariaazam
Copy link
Copy Markdown
Member

Summary

Implements self-update functionality for gscli to allow users to update the CLI to the latest version from GitHub releases.

Changes

  • ✅ New gscli update command to update to latest version
  • ✅ New gscli update check command to check for available updates
  • ✅ Automatic platform detection (Linux, macOS, Windows)
  • ✅ Safe binary replacement with backup mechanism
  • ✅ Fetches latest release from GitHub API
  • ✅ Version comparison logic
  • ✅ Updated README with documentation
  • ✅ Updated CHANGELOG

How it works

  1. Fetches latest release from GitHub API
  2. Compares current version with latest version
  3. Downloads appropriate binary for the platform
  4. Creates backup of current binary
  5. Replaces current binary with new one
  6. Removes backup on success or restores on failure

Testing

  • ✅ TypeScript compilation passes
  • ✅ Help commands display correctly
  • ✅ Commands are properly integrated

Usage

# Update to latest version
gscli update

# Check for updates
gscli update check

- Implement self-update functionality via GitHub releases
- Add 'gscli update' command to update to latest version
- Add 'gscli update check' command to check for updates
- Automatic platform detection (Linux, macOS, Windows)
- Safe binary replacement with backup mechanism
- Update README with self-update documentation
- Update CHANGELOG with new features
@shahariaazam shahariaazam merged commit 23e4af4 into main Nov 5, 2025
1 check passed
@shahariaazam shahariaazam deleted the dev branch November 5, 2025 20:14
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.

1 participant