# Installation and updates

> Install Flow from its disk image, pick a release channel, keep it updated, put flow-cli, drop and ghx on your PATH, and grant macOS permissions.

Flow ships as a signed disk image on the public GitHub releases page of `worldbreakstudios/flow-app`. You drag it to Applications once; after that Flow checks for new versions itself and can install them in place. No GitHub account or `gh` login is needed for any of this.

## Requirements

- macOS 11.0 or later.
- Current releases are built for Apple silicon: the disk image is named `Flow-<version>-macos-arm64.dmg`.
- A license (a free trial or a paid plan). Flow opens to a welcome screen until you activate one; see [Activation](https://flow.worldbreakstudios.com/docs/licensing/activation.md).

## Install Flow

1. Open the releases page: `https://github.com/worldbreakstudios/flow-app/releases`.
2. Pick a release and download its `.dmg` (and, to verify it, its `SHA256SUMS` file).
3. Optional: check the download from the folder you saved both files to:

   ```sh
   shasum -a 256 -c SHA256SUMS
   ```

4. Open the disk image and drag **Flow** to **Applications**.
5. Eject the disk image and open Flow from Applications.
6. Paste your license key into the welcome screen and press Return.

> **Warning:** Run Flow from Applications, not from the mounted disk image. Flow does not offer to install its command-line tools when it runs from a mounted volume or from a macOS App Translocation path, and the updater will not replace an app there.

### Which release to download

Releases come in three kinds, and the in-app channels nest: Stable is inside Dev, which is inside Experimental.

| Kind | How it looks on the releases page | Channel that receives it |
|---|---|---|
| Stable | A `vX.Y.Z` release not marked Pre-release | Stable, Dev, Experimental |
| Dev | A `vX.Y.Z` release marked **Pre-release**, titled "(dev)" | Dev, Experimental |
| Experimental | A `vX.Y.Z-exp.N` pre-release, titled "(experimental)", published hourly | Experimental only |

> **Note:** If the releases page lists no Stable release yet, download the newest Dev release and set the release channel to Dev (below), or Flow will find nothing newer to update to.

## Updates

Flow looks for new releases over plain HTTPS. Settings are in **Settings › About › Updates**:

| Setting | Key | Type | Default | What it does |
|---|---|---|---|---|
| Check for updates automatically | `updates.check` | bool | `true` | Checks 5 seconds after launch, then every 6 hours. Nothing is downloaded until you choose to install. |
| Install updates automatically | `updates.auto` | bool | `false` | Downloads and installs a found update without asking. Flow never relaunches on its own. |
| Release channel | `updates.channel` | `stable`, `dev` or `experimental` | `stable` | Which releases count. Stable gets finished releases, Dev also gets prereleases, Experimental adds the hourly builds. |

### Install an update

1. When an update is found, a toast says so. You can also run **Check for updates…** from the command palette (`⇧⌘P`) or press the pill beside the version in Settings › About.
2. Choose **Download and install update…** (palette) or the Settings pill. Flow downloads the disk image into `~/.flow/updates/`, checks it against the release's `SHA256SUMS` (a mismatch is a failure, never skipped) and swaps the new `Flow.app` in place of the running one.
3. Press **Relaunch now** in the toast, the Settings pill, or run **Relaunch to update** from the palette (listed only while an installed update waits).

If `/Applications` is not writable by your user (a standard account), macOS asks for an administrator password once for the swap. Dismissing that prompt cancels the install and changes nothing.

Persistent shells survive the update: they keep running while Flow relaunches and the panes reattach. See [Persistent sessions](https://flow.worldbreakstudios.com/docs/workspace/persistent-sessions.md).

### When updates stop

- A network error, a timeout or GitHub's anonymous rate limit is silent; the periodic check keeps going, and a manual **Check for updates…** reports the reason in a toast.
- If the releases repository answers "not found", Settings › About shows "Updates unavailable" and the periodic check stops until Flow restarts.

## Command-line tools on your PATH

Flow.app carries its command-line tools in `Flow.app/Contents/MacOS`. Installing them puts one symlink per tool into `/usr/local/bin`, so the tools on your PATH are always those of the installed app and update with it.

| Tool | What it is | Docs |
|---|---|---|
| `flow-cli` | Drives a running Flow over its command bus | [flow-cli](https://flow.worldbreakstudios.com/docs/cli/flow-cli.md) |
| `drop` | The git worktree tool | [drop](https://flow.worldbreakstudios.com/docs/cli/drop.md) |
| `ghx` | The cached GitHub CLI front end | [ghx and gitx](https://flow.worldbreakstudios.com/docs/cli/ghx-and-gitx.md) |
| `gitx` | A `git` passthrough that tells `ghx` about pushes | [ghx and gitx](https://flow.worldbreakstudios.com/docs/cli/ghx-and-gitx.md) |
| `sink` | The sync engine's CLI | [Sink](https://flow.worldbreakstudios.com/docs/sync/sink.md) |

To install them:

1. On first launch from Applications, Flow asks "Install command-line tools?" once. Accept it.
2. Later, use **Settings › Advanced › Command-line tools**, or run **Install command-line tools…** from the command palette.
3. If `/usr/local/bin` is not writable, macOS asks for an administrator password once for all the links.

The Settings row shows the state: "Installed in /usr/local/bin", "Not installed", or which tools are linked and which are missing. Flow never replaces a file it does not own: if `/usr/local/bin/ghx` is someone else's binary, that tool is skipped with "… exists and isn't Flow's; skipped" and the others are still linked.

Check the result from a new terminal:

```sh
which flow-cli drop ghx
flow-cli --help
```

To route `gh` and `git` in your own shells through `ghx` and `gitx`, use the two buttons in **Settings › General › Pull requests** ("Route gh through ghx", "Route git through gitx"); see [ghx and gitx](https://flow.worldbreakstudios.com/docs/cli/ghx-and-gitx.md).

## Mermaid diagrams need nothing installed

Mermaid diagrams in pull request pages and Notes previews are drawn locally with a copy of mermaid.js bundled in Flow. You do not need to install mermaid-cli, and no diagram text leaves your Mac.

## macOS permissions

Flow asks for these only when a feature needs them.

| Permission | Needed for | Where to grant it |
|---|---|---|
| Accessibility | Locking other apps' windows to a session, pasting from clipboard history into another app, snippet keyword expansion | System Settings › Privacy & Security › Accessibility |
| Paste from Other Apps (macOS 15.4 and later) | Recording clipboard history | System Settings › Privacy & Security › Paste from Other Apps, or the button in Settings › Clipboard |
| Notifications | Banners for notification kinds set to "Notification Center". Flow posts them through AppleScript, so macOS lists them under **Script Editor**. | System Settings › Notifications |
| Administrator password | Linking the command-line tools into a protected `/usr/local/bin`; updating Flow in `/Applications` from a standard account | Asked at the time |

To start Flow when you log in, turn on **Settings › General › Startup › Open at login**.

## Where Flow keeps your data

| Path | What is in it |
|---|---|
| `~/.flow/settings.json` | Your settings, a flat JSON object |
| `~/.flow/license.json` | Your license token and device id |
| `~/.flow/sessions/` | Persistent shell holders' sockets and locks |
| `~/.flow/history/` | Per-pane zsh history |
| `~/.flow/updates/` | Downloaded updates |
| `~/Library/Application Support/flow/state.db` | Sessions, layouts, tabs, closed-session history |
| `~/Library/Application Support/flow/groups.json` | New session picker favorites and recents |
