flitz sdk
List, install, pin, locate, and remove Flitz SDK releases; the flitz.yaml pin.
The Flitz SDK is a complete Flutter SDK with the Flitz engine and the compiler
that turns your app into a bundle. It is not downloaded by hand: the flitz
CLI is the only thing that fetches and places it, into a CLI-managed cache at
~/.cache/flitz/sdk/<tag>/, one directory per release tag.
A release tag has the shape <flutter-version>+flz.<N>: the upstream Flutter
version, then <N>, the Flitz iteration. The iteration increases with each
Flitz release and is shared across Flutter versions, so a Flutter version's
first tag need not be flz.1. flitz sdk releases lists what is published;
latest resolves to the highest tag, newest Flutter version first. Copy tags
from flitz sdk releases rather than typing them — the service looks a tag up
exactly as written.
| Command | Network | What it does |
|---|---|---|
flitz sdk releases | yes | List every published release, flagging the cached and pinned ones. |
flitz sdk install [<tag>|latest] | yes | Download into the cache without pinning. Idempotent. --force re-downloads and replaces a cached entry. |
flitz sdk use [<tag>|latest] | yes | Pin the tag for the current project and install it if absent. No argument reads the project's flitz.yaml. Takes --force too. |
flitz sdk list | no | List cached SDKs and flag which one the current project pins. |
flitz sdk path | no | Print only where the pinned SDK lives — whether or not it is there yet. |
flitz sdk remove <tag> | no | Delete a cached SDK. |
releases, install, and use need the network, a credential, and an active
license — every time, including for a tag that is already cached. list,
path, and remove need no credential and work offline.
To choose a tag when no release matches your app's Flutter version, see Getting started.
Requirements
Installing an SDK needs the system tar with xz support — slim CI images may
need the xz-utils package — and room in the cache: each tag is several
hundred megabytes to download and more than a gigabyte on disk. sdk use
names the download size before it starts.
releases
flitz sdk releasesAvailable Flitz releases:
<tag> (installed, pinned)
<tag> (installed)
<tag>With --json: { "releases": [ { "tag", "installed", "pinned" } ] }.
install
flitz sdk install latest # or an explicit <tag>
flitz sdk install # the tag this project pins
flitz sdk install --force <tag>Downloads the SDK for your host into the cache without touching the project
pin. With no argument it installs the tag the project pins; an unpinned project
with no argument is a usage error (no tag was named and this project pins none) rather than a silent guess at latest.
Already cached? After confirming the tag with the Flitz service, it says
SDK <tag> already cached. and stops. --force re-downloads and replaces
the cached tree, which is how you repair an entry that flitz status reports
as missing a build tool.
install was asked for the download outright, so it never prompts.
use and flitz.yaml
cd /path/to/your/flutter/app
flitz sdk use latest # or: flitz sdk use <tag>sdk use asks the Flitz service to resolve the tag — latest becomes a
concrete tag, and that concrete tag is what gets pinned — then:
-
Pins the tag by writing
flitz.yamlat the project root — the current directory:flitz.yaml sdk: <tag> -
Stops if that tag is already cached (
SDK <tag> already cached.). Otherwise it offers the download with a default-yes prompt naming the tag and its approximate size. Accept, and the archive streams into the cache, is verified against its SHA-256, and is moved into place only once it verifies. Decline, and the pin is still written:Not downloaded. Run `flitz sdk install` when you are ready.
The pin is written before the download on purpose, so a declined,
interrupted, or failed transfer still leaves the project pinned to the tag you
chose and only the bytes outstanding. Non-interactively (no terminal to ask
on), sdk use downloads without asking — a cold CI cache is exactly what it is
run to warm.
Commit flitz.yaml. A fresh checkout on another machine reproduces the
exact same SDK with an argument-less flitz sdk use, or with a single
flitz publish --yes.
The file may also set app:, track:, and schema: for flitz publish
(see Configuration → flitz.yaml) and carry keys
of your own; sdk use rewrites only sdk: and preserves everything else.
Keep the file valid YAML with string values: otherwise commands stop with
<path>/flitz.yaml is not valid YAML (exit 1), and flitz status names the
file. Fix it by hand, or delete it and run flitz sdk use <tag> again.
The pin is read from where you run flitz
Every command, including publish --dir <path>, reads flitz.yaml from the
current working directory, not from the project folder.
Re-running sdk use for a cached tag still contacts the service to resolve
the tag, so it needs the network and an active license. Once an SDK is cached,
the flutter and dart inside it work fully offline: the archive ships with
everything they would otherwise download.
list
flitz sdk list<tag> (pinned)
<tag>Local only; prints No SDKs cached. when the cache is empty. With --json:
{ "sdks": [ { "tag", "installed", "pinned" } ] }.
path
flitz sdk path
# /home/you/.cache/flitz/sdk/<tag>Prints only the absolute cache path of the project's pinned SDK, on stdout, without contacting the service. It is a pure tag-to-path resolver, not a checker: it answers whether or not the SDK has been downloaded yet. That is what lets it sit in a shell profile that is evaluated before the SDK exists:
export PATH="$(flitz sdk path)/bin:$PATH"Whether the tree is actually there is what flitz sdk list and
flitz status report, and what publish enforces. With no
pin in the current directory, sdk path prints nothing on stdout and exits 1.
--json adds the fact the bare form leaves out:
{ "tag": "<tag>", "path": "/home/you/.cache/flitz/sdk/<tag>", "installed": false }Using the SDK as your flutter/dart
Publishing does not need the SDK on PATH — flitz publish resolves it
from the cache by itself. But if you want to point an editor, a shell, or the
host app's own build at the SDK, sdk path is how:
export PATH="$(flitz sdk path)/bin:$PATH"
flutter --versionflutter --version inside a Flitz SDK reports the full release tag, with its
+flz.<N> suffix, as the framework version — that is how you tell a Flitz SDK
from a stock Flutter checkout at a glance. Your host app must be built with
the same tag the bundle is published with — see
Loader plugins → Compatibility.
remove
flitz sdk remove <tag>Deletes ~/.cache/flitz/sdk/<tag>/ and prints Removed <tag>.. Reports
<tag> not cached. and still exits 0 when there was nothing to delete.
Pass an exact tag
Pass a tag exactly as flitz sdk list prints it. The argument is not
validated: an empty string, ., .., or an absolute path deletes that
directory instead — flitz sdk remove "" empties the whole SDK cache.
When it fails
| Message | Cause | Fix |
|---|---|---|
invalid release tag: <tag> (exit 1) | The argument is not shaped like a release tag. | Copy a tag from flitz sdk releases. |
no tag was named and this project pins none (exit 1) | No argument, and no flitz.yaml in the current directory. | Name a tag, e.g. flitz sdk use latest, or run from the project root. |
the Flitz service returned HTTP 404: release not found (exit 4) | No release with that exact tag is published — a typo, or the wrong separator. Nothing is pinned. | Copy the tag from flitz sdk releases; ignore the "retry" hint. |
the <tag> SDK archive could not be unpacked: … (exit 4) | tar failed, usually for lack of xz support or disk space. | Install xz support, free space, and retry. |
Authorization, license, and network failures are the same as for every licensed command — see Troubleshooting.
Download integrity
- Verified. Every archive is checked against its published SHA-256 before it is placed. A mismatch names both digests, discards the download, and leaves the cache untouched.
- Resumable. An interrupted
install/usecontinues from where it stopped rather than re-fetching the whole archive. Ctrl-C deliberately keeps the partial download. - Serialized. Two concurrent installs of the same tag wait on a lock instead of corrupting each other's tree.
- Never damaged by failure. A failed or mismatched download never
replaces, truncates, or deletes an already-installed SDK.
--forceis the only thing that replaces one.
Progress is reported as three phases — Downloading (with percentage, transferred-of-total, and rate), Verifying, and Extracting — so the largest transfer in the product is never silent.
flitz status
The onboarding and troubleshooting entry point: every check, what each verdict means, and the command each hint points at.
flitz publish
Build a bundle from your project against the pinned SDK and publish it; flags, apps and tracks, publish history, output streams, --json, and the on-demand SDK download.