Skip to main content
The 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

Output:

List Available Versions

Output:

Update to Specific Version

Output:

Quiet Update

No output unless there’s an error or completion:

Check If Already Up to Date

Output:

Update Process

  1. Check Current Version:
    Output: leo 2.0.0
  2. Check for Updates:
    Leo queries GitHub releases for the latest version.
  3. Download New Version: If a newer version exists:
    • Downloads binary for your platform
    • Verifies integrity
    • Shows progress
  4. Install New Version:
    • Replaces current Leo binary
    • Preserves configuration and cache
    • Updates symlinks
  5. Verify Installation:
    Output: leo 2.1.0

Version Management

Check Current Version

Output:

View Release Notes

After listing versions:
Visit GitHub for release notes:

Install Specific Version

Useful for:
  • Testing compatibility
  • Reverting to stable version
  • Matching team’s Leo version

Installation Locations

Leo binary locations by platform:

Linux / macOS

In PATH via:

Windows

In PATH via:

Update Strategies

Benefits:
  • Latest features
  • Bug fixes
  • Security patches
  • Performance improvements

Pin to Specific Version

Benefits:
  • Consistent builds
  • Predictable behavior
  • Team synchronization

Periodic Updates

Benefits:
  • Balance stability and features
  • Planned migration
  • Controlled updates

Breaking Changes

When updating across major versions:

Check Compatibility

  1. Read release notes
  2. Test in development
  3. Update dependencies
  4. Rebuild projects

Example: v1.x to v2.x

Migration Workflow

Troubleshooting

Update Failed

Solutions:
  1. Check internet connection:
  2. Check GitHub access:
  3. Manual download: Visit https://github.com/AleoHQ/leo/releases Download binary for your platform Replace ~/.leo/bin/leo
  4. Reinstall Leo:

Permission Denied

Solutions:
  1. Check file permissions:
  2. Fix permissions:
  3. Run with elevated permissions (if needed):

Binary Not Found After Update

Solutions:
  1. Check PATH:
  2. Add to PATH:
  3. Verify installation:

Version Mismatch After Update

Solutions:
  1. Reload shell:
  2. Check which Leo:
  3. 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

In README.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

Stable Releases

Recommended for production.

Pre-releases

For testing and early access.

Next Steps