Automatic updates
Mogick CLI supports automatic update checks at startup and manual upgrades. Downloaded packages are verified with SHA-256 before installation. Replacing the executable does not remove configuration, authentication, or session data stored in the data directory.
Update methods
| Method | Command or scenario | Behavior |
|---|---|---|
run startup check | mogick run ... | Check at startup; if an update is available, download it and schedule replacement in the background while the current task continues |
| Non-interactive root check | mogick --non-interactive or non-TTY standard input/output | Behave like the run startup check |
| TUI update prompt | Interactive mogick | Check before startup and display available actions in the TUI |
| Manual upgrade | mogick upgrade | Check, download, and install in the foreground |
| Check only | mogick upgrade --dry | Display the current and latest versions and the packages that would be downloaded without installing |
| Skip automatic checks | --no-auto-upgrade | Skip the startup check and TUI update prompt for that command |
If an automatic check cannot reach the update service, Mogick skips it without interrupting the current task. A manual mogick upgrade reports network, manifest, and verification errors.
TUI update prompt
When interactive mogick detects a new version, the TUI offers these actions:
| Options | Behavior |
|---|---|
| Upgrade now | Exit the TUI and run the upgrade in the foreground |
| Skip this time | Close the prompt and continue with the current version |
| Skip this version | Do not prompt again for this version; prompt when a newer version is available |
| View release notes | Open the release notes, then return to the update prompt |
Choosing Upgrade now ends the current TUI session. Restart mogick after installation to use the new version.
Manual upgrade
mogick upgrade --dry
mogick upgrademogick upgrade runs the complete upgrade synchronously. On Linux, it replaces the current executable and relaunches the new version. On Windows, it starts mogick-updater.exe, waits for the current process to exit, and then replaces the locked mogick.exe.
Windows file replacement
Windows locks a running mogick.exe, so the process cannot overwrite itself. Mogick downloads the new executable and updater, then the updater waits for the current process to exit before completing the replacement. If replacement fails, close all Mogick processes and run mogick upgrade again.
Common commands
# Disable the upgrade check for this launch
mogick --no-auto-upgrade
mogick run --no-auto-upgrade "run tests"
# Use a custom upgrade source
MOGICK_UPGRADE_URL=https://example.com/mogick mogick upgrade --dry