Upgrading
mago self-update replaces the running binary with a newer release. Use it for installs that came from the shell script, Homebrew, Cargo, or a manual download.
Composer installs are different. The Composer wrapper pins a binary that matches the Composer package version, so you upgrade Mago with
composer updaterather thanself-update.
Common flows
Check for updates without installing:
mago self-update --check
The command prints the new version (if any) and exits non-zero when one is available, which makes it scriptable in CI.
Update to the latest release:
mago self-update # interactive confirmation
mago self-update --no-confirm # skip the prompt
Pin a specific version:
mago self-update --tag 1.25.2
Sync with the project's version pin
If your mago.toml uses version pinning, you can sync the installed binary to whatever the project expects without typing the version yourself:
mago self-update --to-project-version
For an exact pin (version = "1.25.2"), this resolves directly to that release tag. For a major or minor pin, Mago scans recent GitHub releases and installs the highest one that still satisfies the pin. So version = "1" with 2.0 already shipped still installs the latest 1.x release. version = "1.14" with 1.19.x in the wild walks back to the latest 1.14.x.
The command fails only if no published release satisfies the pin at all.
Reference
Usage: mago self-update [OPTIONS]
| Flag | Description |
|---|---|
--check, -c | Check for updates without installing. Exits non-zero when an update is available. |
--no-confirm | Skip the interactive confirmation prompt. |
--tag <VERSION> | Install a specific release tag instead of the latest. Mutually exclusive with --to-project-version. |
--to-project-version | Install whatever the project's version pin demands. Fails if no pin is set. Mutually exclusive with --tag. |
-h, --help | Print help and exit. |
Global flags must come before self-update. See the CLI overview for the full list.