flitz upgrade
Replace the installed flitz CLI with the newest published release, in place, and what it leaves alone.
flitz upgrade replaces the flitz you run with the newest published CLI. It
installs the same binary the install script would, checked
against the same SHA-256. It is available in CLI 0.6.2 and later; flitz --version
prints yours. An older CLI has no upgrade command: re-run the install script
once, and use flitz upgrade from then on.
flitz upgradeDownloading flitz <version> for linux-x64…
Upgraded flitz <old-version> to <version>.When you already have the newest CLI, it prints flitz <version> is current.,
downloads nothing, and exits 0.
It needs no sign-in, no license, and no project, so it runs anywhere, also
under FLITZ_APIKEY. It takes no flags of its own and does not accept
--json.
What it does
- Fetches the CLI release feed from
download.flitz.dev. Unlike the update notice, it fetches every time, however recently the feed was checked. - Compares the newest version with yours. When it is not newer, it stops.
- Downloads the binary for this machine into a temporary directory next to
the installed
flitz, and checks its size and SHA-256 against the feed. - Replaces the installed
flitzwith the new binary in one step. Aflitzcommand already running keeps running.
Until that last step nothing is replaced, so a failed or interrupted upgrade leaves your CLI as it was. The temporary directory is removed whatever happens, also on Ctrl-C.
upgrade changes the CLI only. The SDK your project pins and its loader-plugin
version stay as they are: moving the pin is a deliberate decision, made with
flitz sdk use latest — see flitz status.
After an upgrade, regenerate your shell completions so new
commands and flags complete.
When it fails
| You see | Code | Meaning |
|---|---|---|
cannot replace <path>: <reason> | 2 | You cannot write to the directory flitz is installed in, such as a system directory. Run flitz upgrade as a user who can, or re-run the install script. |
cannot replace <path>: it was replaced while this command ran | 2 | Another flitz upgrade replaced the binary first. Run flitz upgrade again. |
flitz <version> has no build for <host> | 1 | The newest release has no binary for this machine. See the supported hosts. |
the request to download.flitz.dev failed after 5 attempts: … | 4 | The download host was out of reach. Check your connection and retry. |
the CLI release feed at … followed by answered HTTP <status>, was not understood, or another reason | 4 | The feed could not be read. Retry, and contact support if it persists. |
downloading flitz <version> failed after <n> bytes: …, or … stalled: no bytes for 60s after <n> bytes | 4 | The download broke off. Retry; upgrade starts over. |
the flitz <version> download delivered <n> of <size> bytes, or the downloaded flitz <version> has digest …, expected … | 4 | The download does not match the feed, and nothing was replaced. Retry, and contact support if it persists. |
See Exit codes for what each code means.