ReferenceInstall Flow

Language specification

Runtime

Guides

Background

The Flow Book

Install Flow

On this page

You want the flow command on your machine, so you can check a program, run it, and come back to its runs later. You can build it from a checkout of the repository, or install a published release. A release brings the CLI, the language server, the standard library and the editor extensions together, and needs no Rust toolchain.

Install a published release

A release supports macOS on Apple Silicon, and Linux on x86_64 or arm64 with glibc 2.35 or newer (Ubuntu 22.04, Debian 12 or later). Releases are tested on macOS (arm64), Ubuntu 22.04 and 24.04, and Debian 12. Installing needs no Rust toolchain, Python, Node or model credentials.

  1. Download the installer and run it:
    curl --proto '=https' --tlsv1.2 -fsSL \  https://github.com/buttercrab/flow/releases/latest/download/install.sh | sh
    To install a particular release, save the script and give a version:
    sh install.sh --version v0.1.0
  2. If ~/.flow/bin isn't on your PATH, the installer asks before adding one line to your shell's startup file (.zshrc, ~/.bashrc, ~/.bash_profile on macOS, or conf.d/flow.fish). With --no-modify-path, without a terminal, or for another shell, it prints the line for you to add instead.
  3. If VS Code's code command is on your PATH, the installer asks before installing the VS Code extension. With --no-editors, or without a terminal, it prints the command instead. It also prints how to install the Zed extension.
  4. Check the installation:
    flow --versionflow doctor

The installer picks the archive for your system, checks its checksum, and checks the whole bundle before it installs or activates any command. The checksum catches a corrupted or mismatched download. It doesn't prove who published the release, so download from the official release over HTTPS, or get the expected checksum some other way.

Releases go under ~/.flow/installations, and the commands go in ~/.flow/bin: flow, and flow-toolkit-rust, the Rust toolkit that serves and builds Rust libraries. The Python toolkit installs on its own, with uv tool install flow-lang-toolkit. To choose other places:

Option Environment variable Default
--prefix /absolute/path FLOW_INSTALL_DIR ~/.flow/installations
--bin-dir /absolute/path FLOW_BIN_DIR ~/.flow/bin

FLOW_HOME moves the whole user home. The installer refuses to replace a command it didn't install.

To install from an archive you downloaded yourself, give the checksum you got for it:

sh scripts/install.sh --archive /downloads/flow-macos-arm64.tar.gz \  --checksum FULL_LOWERCASE_SHA256 --version v0.1.0

Writing or running a Tool library needs the tools of its language (Writing a Tool library).

Build from a checkout

A checkout builds the CLI with the Rust toolchain that rust-toolchain.toml pins; rustup installs it on first use.

git clone https://github.com/buttercrab/flowcd flowcargo xtask bootstrapexport PATH="$PWD/target/debug:$PATH"flow --version

cargo xtask bootstrap builds flow under target/, or under CARGO_TARGET_DIR when it is set. The CLI reads the checkout's standard library. flow doctor --json shows the paths it chose. To update, pull and run cargo xtask bootstrap again. Your runs aren't touched.

To run programs that use libraries, you also need:

  • for Python libraries, the Python toolkit on PATH: uv tool install ./toolkits/python installs flow-toolkit-python from the checkout, on Python 3.11 or later, and a library that declares dependencies also needs uv;
  • for Rust libraries, cargo, and flow-toolkit-rust, which cargo xtask bootstrap builds beside flow.

Upgrade

Run the installer again, with --version if you want a particular release.

The installer unpacks the new release under PREFIX/releases/ and switches PREFIX/current to it only after the bundle checks out. Once the new flow --version runs, it removes the releases it installed before. It leaves alone any directory under PREFIX/releases/ it didn't install. If an installation fails, nothing is removed, and you can retry with the same arguments.

The installer takes a lock while it works. If one was killed and left its lock behind, make sure no installer is running, then remove PREFIX/.install-lock or BIN/.flow-install-lock and retry.

Upgrading Flow never updates the libraries your programs use. To accept a library tag that has moved since you pinned it, review the change and run flow update FILE for the program.

Uninstall

Run the installer with --uninstall, giving the same --prefix and --bin-dir you installed with, if you chose them:

sh install.sh --uninstall

Uninstall first removes the daemon's login service, if flow daemon install added one, and stops a running daemon. Then it removes the releases and command links listed in PREFIX/installation.receipt. A command another application has replaced stops the removal instead of being deleted. If uninstall fails partway, run it again: it continues from where it stopped.

Uninstall leaves your runs, pins, caches and editor settings, and any other files in the install and command directories.

Use Flow's own libraries

Flow's own libraries, for files, processes, Git, HTTP, models and more, live in Flow's repository under libraries/. A program of yours imports each one by its remote path at a tag of that repository:

use "github.com/buttercrab/flow@v1/libraries/git/git"

Flow fetches, pins and approves them like any other remote library (modules, the flow command).

The installed bundle also carries the few libraries its own scripts and examples import, under libraries/ beside bin/flow. They come without source: each holds its build for your platform as bin/<name>, and its flow.toml names that executable, so the bundled examples run without a Rust toolchain (The host boundary).

Where Flow keeps your runs

The user home is ~/.flow, or FLOW_HOME:

Directory Holds
installations installed releases, and which one is current
bin command links
cache fetched repositories and records Flow can make again; FLOW_CACHE moves it
runs every run's history

The background host keeps its socket, lock and log there too (Runs in the background).

A run's history holds the exact Flow sources it ran, including generated contracts and remote commits, so you can edit or delete the original project and still replay the run. Continuing a run live still needs its libraries and their dependencies, and flow resume reads the program from the file the run started from, when that file is still there (execution).

Runs can hold secrets: sources, inputs, Tool answers and logs. On Unix, a new run's directory is readable only by you. Flow never deletes runs on its own, and cache cleanup, upgrades and uninstall leave them alone. To manage them:

Command Does
flow runs finds runs by name, entry or time
flow replay RUN re-runs a run from its record, calling no Tool
flow resume RUN continues a run live (Fix and continue)
flow runs export RUN --out run.flowrun writes a run as one file, for backup or transfer
flow runs import run.flowrun copies an exported run in, under a new run id
flow runs delete RUN deletes a run, asking first; --yes answers ahead of time

An exported file can hold the same secrets as the run, so choose who gets it and where it is stored.

Check which Flow you are running

flow --version prints the version. For an installed release, it also prints the commit the bundle was built from and its date, such as flow 0.1.0 (1b64c50d 2026-11-22), with +dirty after the commit when the bundle was built with uncommitted changes. A CLI built in a checkout prints only the version.

flow doctor --json shows the paths Flow chose, its version, the installed revision and the bundle digests, without running any Tool. It reports paths you set yourself apart from the ones Flow chose.

Configure editors

VS Code. Install the extension that comes with the release: say yes when the installer offers it, or run

code --install-extension ~/.flow/installations/current/editors/flow-language.vsix

with your --prefix in place of ~/.flow/installations if you chose one. This extension always matches the installed flow, whose flow lsp is the language server. The Visual Studio Marketplace also lists it as Flow Language (code --install-extension buttercrab.flow-language), but the Marketplace follows the latest release, so it can be ahead of or behind the Flow you installed.

Zed. The extension comes with the release; the editor configuration guide shows how to install it.

With the release's bin directory on PATH, both extensions find Flow with no settings. Otherwise, point each editor's installationDirectory setting at the installed release once; the CLI and language server then come from its bin directory. The editor configuration guide covers other settings and tasks.

With a checkout build, the editor configuration guide builds the CLI and language server the editors use.

Exact rules: the CLI contract.