Update
The update
command allows you to automatically update CookCLI to the latest version from GitHub releases.
Overview
CookCLI can check for new releases and automatically download and install updates. The update process:
- Checks the latest release on GitHub
- Downloads the appropriate binary for your platform
- Replaces the current executable with the new version
- Preserves all your configurations and data
Basic Usage
Update to the latest version:
Check for updates without installing:
Force update even if already on latest version:
Command Options
--check-only
Only checks if a new version is available without downloading or installing it.
Example:
--force
Forces the update process even if you're already on the latest version. Useful for reinstalling the current version or troubleshooting.
Example:
Platform Support
The update command automatically detects your platform and downloads the appropriate binary:
Platform | Architecture | Binary Name |
---|---|---|
macOS | Intel (x86_64) | cook-x86_64-apple-darwin |
macOS | Apple Silicon (ARM64) | cook-aarch64-apple-darwin |
Linux | x86_64 (glibc) | cook-x86_64-unknown-linux-gnu |
Linux | x86_64 (musl) | cook-x86_64-unknown-linux-musl |
Linux | i686 (musl) | cook-i686-unknown-linux-musl |
Linux | ARM64 (musl) | cook-aarch64-unknown-linux-musl |
Linux | ARM (musl) | cook-arm-unknown-linux-musleabihf |
Windows | x86_64 | cook-x86_64-pc-windows-msvc |
Windows | i686 | cook-i686-pc-windows-msvc |
Windows | ARM64 | cook-aarch64-pc-windows-msvc |
FreeBSD | x86_64 | cook-x86_64-unknown-freebsd |
Permissions
The update command tries to replace the current executable in-place. Depending on where CookCLI is installed, you may need appropriate permissions:
User Installation
If CookCLI is installed in your user directory (e.g., ~/.local/bin/
), the update should work without additional permissions:
System Installation
If CookCLI is installed in a system directory (e.g., /usr/local/bin/
), you may need to run the update with sudo:
Permission Errors
If the update fails due to permission issues, you'll see an error message with instructions for manual installation:
Version Checking in Doctor
The cook doctor
command automatically checks for updates as part of its health checks:
Troubleshooting
Update Fails
If the automatic update fails:
- Check your internet connection
- Verify you have the necessary permissions
- Try running with
--force
flag - Manually download from GitHub Releases
Finding Your Installation
To find where CookCLI is installed:
Verifying the Update
After updating, verify the new version:
Manual Installation
If automatic updates don't work for your setup, you can always manually download the latest release:
- Visit CookCLI Releases
- Download the appropriate binary for your platform
- Extract the archive:
- For
.tar.gz
:tar xzf cook-*.tar.gz
- For
.zip
:unzip cook-*.zip
- For
- Move the binary to your desired location
- Make it executable (Unix/Linux/macOS):
chmod +x cook
Security
Updates are downloaded over HTTPS directly from GitHub releases. Each release includes SHA256 checksums for verification. The update process uses the rustls
TLS implementation for secure connections.
Examples
Regular Update Workflow
Using Aliases
The update command can also be invoked using its alias:
See Also
- GitHub Releases - View all releases and changelogs