Update Command¶
The update command updates the tool to the latest or specified version.
Usage¶
Description¶
Downloads and installs the latest version of the tool. After updating, it automatically runs init on existing configuration directories to ensure compatibility.
Flags¶
--force, -f: Force update to the latest version even if already up to date.--version, -v string: Specific version to update to (format:v0.0.0).
Update Process¶
- Validates version format (if specified).
- Downloads the target version from GitHub.
- Replaces the current binary.
- Updates configuration files in standard locations.
- Displays release notes for the new version.
Implementation¶
The update command is implemented in cmd/update/update.go and uses the pkg/setup.NewUpdater() system for downloading and installing updates.