leo update command updates your Leo CLI installation to the latest version or a specific release.
Syntax
Options
boolean
default:false
List all available releases without updating.
string
Update to a specific named release (e.g.,
v2.0.0).boolean
default:false
Suppress download logs and progress output.
Examples
Update to Latest Version
List Available Versions
Update to Specific Version
Quiet Update
Check If Already Up to Date
Update Process
-
Check Current Version:
Output:
leo 2.0.0 -
Check for Updates:
Leo queries GitHub releases for the latest version.
-
Download New Version:
If a newer version exists:
- Downloads binary for your platform
- Verifies integrity
- Shows progress
-
Install New Version:
- Replaces current Leo binary
- Preserves configuration and cache
- Updates symlinks
-
Verify Installation:
Output:
leo 2.1.0
Version Management
Check Current Version
View Release Notes
After listing versions:Install Specific Version
- Testing compatibility
- Reverting to stable version
- Matching team’s Leo version
Installation Locations
Leo binary locations by platform:Linux / macOS
Windows
Update Strategies
Stay on Latest (Recommended)
- Latest features
- Bug fixes
- Security patches
- Performance improvements
Pin to Specific Version
- Consistent builds
- Predictable behavior
- Team synchronization
Periodic Updates
- Balance stability and features
- Planned migration
- Controlled updates
Breaking Changes
When updating across major versions:Check Compatibility
- Read release notes
- Test in development
- Update dependencies
- Rebuild projects
Example: v1.x to v2.x
Migration Workflow
Troubleshooting
Update Failed
-
Check internet connection:
-
Check GitHub access:
-
Manual download:
Visit https://github.com/AleoHQ/leo/releases
Download binary for your platform
Replace
~/.leo/bin/leo -
Reinstall Leo:
Permission Denied
-
Check file permissions:
-
Fix permissions:
-
Run with elevated permissions (if needed):
Binary Not Found After Update
-
Check PATH:
-
Add to PATH:
-
Verify installation:
Version Mismatch After Update
-
Reload shell:
-
Check which Leo:
-
Use absolute path:
Automated Updates
Cron Job (Linux/macOS)
Update weekly:Task Scheduler (Windows)
Create scheduled task:CI/CD Integration
Best Practices
1. Check Before Major Updates
2. Test After Updating
3. Update All Projects
After updating Leo:4. Document Leo Version
InREADME.md:
5. Pin Version in CI
Comparison with Installation
Release Channels
Leo follows semantic versioning:- Major (v2.0.0): Breaking changes
- Minor (v2.1.0): New features, backward compatible
- Patch (v2.0.1): Bug fixes, backward compatible