Flitzdocs
CLI

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 upgrade
Downloading 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

  1. Fetches the CLI release feed from download.flitz.dev. Unlike the update notice, it fetches every time, however recently the feed was checked.
  2. Compares the newest version with yours. When it is not newer, it stops.
  3. 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.
  4. Replaces the installed flitz with the new binary in one step. A flitz command 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 seeCodeMeaning
cannot replace <path>: <reason>2You 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 ran2Another flitz upgrade replaced the binary first. Run flitz upgrade again.
flitz <version> has no build for <host>1The newest release has no binary for this machine. See the supported hosts.
the request to download.flitz.dev failed after 5 attempts: …4The 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 reason4The 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> bytes4The download broke off. Retry; upgrade starts over.
the flitz <version> download delivered <n> of <size> bytes, or the downloaded flitz <version> has digest …, expected …4The 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.

On this page