Skip to content

Conversation

@RoryDotGG
Copy link
Contributor

@RoryDotGG RoryDotGG commented Jun 3, 2025

Summary

This PR introduces CLI self-update functionality to synchronizer-cli, allowing users to update the CLI tool itself directly from the command line. It also implements automatic update checking and provides a unified update experience for both the CLI and Docker containers.

Key Changes

🆕 New Features

  • CLI Self-Update: Users can now update synchronizer-cli without manually running npm/pnpm commands
  • Automatic Update Checking: Performs daily background checks for CLI updates and notifies users when updates are available
  • Unified Update Command: New synchronize update command checks for both CLI and container updates in one go

📝 Command Changes

  • Added synchronize update - Check all updates (CLI + containers)
  • Added synchronize update-cli - Check CLI updates only
  • Renamed synchronize check-updates to synchronize update-container for consistency
  • All commands now perform automatic update checks on launch

🔧 Technical Implementation

  • Version comparison using semantic versioning
  • Update check data persistence (checks once per day)
  • Graceful error handling with helpful messages for permission issues
  • Non-intrusive automatic checks (only shows notification if update available)

🎯 User Experience Improvements

  • Interactive update process with confirmation prompts
  • Clear visual feedback during update process
  • Helpful error messages with fallback instructions
  • Update summary showing all available updates
  • Links to changelog for release notes

Example Usage

# Check for all updates
synchronize update

# Update CLI only
synchronize update-cli

# Update containers only
synchronize update-container

# Automatic check happens in background
synchronize start  # Will show update notification if available

Breaking Changes

  • synchronize check-updates command renamed to synchronize update-container (old command will no longer work)

Testing

  • CLI update check from npm registry
  • Version comparison logic
  • Automatic update notifications
  • Interactive update process

@RoryDotGG RoryDotGG changed the title Feature/add update command feat: Add CLI self-update functionality with unified update management Jun 3, 2025
@RoryDotGG RoryDotGG marked this pull request as ready for review June 3, 2025 22:15
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