# Install and first run

> Install the terminal app, sign in, and keep it up to date.

The terminal app (the TUI) is one command, `zidane`.

*Terminal: A chat in the terminal app: the transcript, the prompt and the footer.*

```text
 ┌ Rate limiting /chat ──── ▢ ─ ~/acme-api  1 user message  4 turns  ctrl+shift+x session ┐
 │ ┌────────────────────────────────────────────────────────────────────────────────────┐ │
 │ │ ❯ How is /chat rate limited?                                                       │ │
 │ └────────────────────────────────────────────────────────────────────────────────────┘ │
 │                                                                                        │
 │ ↳ ▸ Used find the rate limiter and read it  [expand]                                   │
 │                                                                                        │
 │ The limiter in src/limits.ts keeps a sliding window per IP: 20 requests a minute on /  │
 │ chat, then a 429.                                                                      │
 │                                                                                        │
 │ It lives in memory, so each instance counts on its own. Behind a load balancer, move   │
 │ the counts to Redis.                                                                   │
 │                                                                                        │
 │ ≡ Opus 5.5  3s  ↻2  ↑5.2k ↓138  18500 tk/s                                             │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 └────────────────────────────────────────────────────────────────────────────────────────┘
 ┌──────────────────────── ↵ send  shift+↵ newline  ↑↓ history  ? search  ctrl+s messages ┐
 │ Ask zidane…                                                                            │
 └────────────────────────────────────────────────────────────────────────────────────────┘
 shift+tab Build  ctrl+m/l Opus 5.5 +1 medium  ctrl+shift+x session  ctrl+o settings
                                                                     ctx 2.89k / 1.00M (0%)
```

## Install and run

**Install script**

```bash
curl -fsSL https://zidane.si/install | sh
zidane
```

The script downloads the binary for your machine from `https://zidane.si/dl`, checks its SHA-256 against the release manifest (and the manifest's signature when [minisign](https://zidane.si/docs/verify.md) is installed), and puts it in `~/.local/bin`. Options go after `sh -s --`: `--prefix <dir>` installs to `<dir>/bin`, and `--version <v>` picks the previous release. Run the script again to update.

**Homebrew**

```bash
brew install tahul/tap/zidane
zidane
```

`brew upgrade zidane` updates it.

**npm**

```bash
npm install -g zidane-tui
zidane
```

**bun**

```bash
bun add -g zidane-tui
zidane
```

**From a checkout**

```bash
bun install
bun run build
bun run tui
```

Every file is also on the [download page](https://zidane.si/download). The npm package pulls one prebuilt binary for your machine. A small launcher runs it on Node 18 or later, so you do not need Bun.

| Platform | Package |
| - | - |
| macOS, Apple silicon | `zidane-tui-darwin-arm64` |
| macOS, Intel | `zidane-tui-darwin-x64` |
| Linux x64 (glibc) | `zidane-tui-linux-x64` |
| Linux arm64 (glibc) | `zidane-tui-linux-arm64` |

The launcher checks your C library with `ldd --version`. Alpine and other musl systems have no binary yet, and the launcher says so. With `--ignore-scripts`, the launcher finds the binary on first run.

## First launch

On a fresh install, `zidane` opens the setup wizard. It has the steps of the desktop app: Welcome, Connect, Bring your setup, Connectors, Skills, Extensions, Look, Conversation, Autonomy, Features and Ready. A step that does not apply is left out. Full setup takes about two minutes. Quick start asks for a provider and your setup from other agents, and keeps the defaults for the rest.

*Terminal: The setup wizard on a first launch, with what zidane found on this computer.*

```text
 ┌ set up zidane ─────────────────────────────────────────────────────────────────── 1/10 ┐
 │                                                                                        │
 │  Welcome   Connect   Connectors   Skills   Extensions   Look   Conversation            │
 │  Autonomy   Features   Ready                                                           │
 │                                                                                        │
 │  Set up zidane                                                                         │
 │  This takes about two minutes. You can change every choice later in Settings.          │
 │                                                                                        │
 │  ▶ ✓ Full setup                                                                        │
 │      Quick start                                                                       │
 │                                                                                        │
 │  Choose your provider, tools, look and how zidane works. About 2 minutes.              │
 │                                                                                        │
 │    Found on this computer                                                              │
 │    ANTHROPIC_API_KEY in your environment   used in Connect                             │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │  ↑↓ choose  ↵ continue                                                                 │
 └────────────────────────────────────────────────────────────────────────────────────────┘
```

| Key | Does |
| - | - |
| `↑` `↓` | Move. On Welcome, Look and the model list of Connect, the move also picks the row. |
| `Space` | Pick the row, or turn it on or off |
| `Enter` | Continue. On Ready, Start, or go back to the step of a recap line. |
| `S` | Skip the step and keep its values |
| `Esc` | Go back one step |

The terminal app needs a provider, so Connect has no Skip. Pick a provider to set it up, as in the steps below. A provider that is ready shows its model, its effort and a test message that it answers.

*Terminal: Connect with a key from the environment, the model, the effort and a live test.*

```text
 ┌ set up zidane ─────────────────────────────────────────────────────────────────── 2/10 ┐
 │                                                                                        │
 │  ✓ Welcome   Connect   Connectors   Skills   Extensions   Look   Conversation          │
 │  Autonomy   Features   Ready                                                           │
 │                                                                                        │
 │  Choose an AI provider                                                                 │
 │  The provider runs the model that answers you. Your keys stay on this computer, in a   │
 │  file that only you can read.                                                          │
 │                                                                                        │
 │  Anthropic                                                                             │
 │  Uses ANTHROPIC_API_KEY from your environment.                                         │
 │  ✓ Claude Opus 5.5 answered in 1.2 s.                                                  │
 │                                                                                        │
 │    Model                                                                               │
 │      Claude Opus 4.7                                                                   │
 │      Claude Opus 4.8                                                                   │
 │      Claude Opus 5                                                                     │
 │  ▶ ✓ Claude Opus 5.5                                                         default   │
 │      Claude Sonnet 4.5 (latest)                                                        │
 │      Claude Sonnet 4.5                                                                 │
 │    9–14 of 17                                                                          │
 │                                                                                        │
 │    Effort                                                                              │
 │    off  minimal  low  medium  high  xhigh  max  adaptive                               │
 │  More effort thinks longer and costs more.                                             │
 │                                                                                        │
 │                                                                                        │
 │  ↑↓ model  ←→ effort  ↵ continue  esc back                                             │
 └────────────────────────────────────────────────────────────────────────────────────────┘
```

Skills lists the recommended sources. `Space` opens one, or the last row, where you type a source. In a source, `Space` picks a skill, `A` picks them all, and `Esc` goes back to the sources. Your picks stay when you open another source.

*Terminal: Skills with a recommended source open and two skills picked.*

```text
 ┌ set up zidane ─────────────────────────────────────────────────────────────────── 4/10 ┐
 │                                                                                        │
 │  ✓ Welcome   ✓ Connect   ✓ Connectors   Skills   Extensions   Look   Conversation      │
 │  Autonomy   Features   Ready                                                           │
 │                                                                                        │
 │  Teach zidane how you work                                                             │
 │  A skill is a folder of instructions. The agent reads one when a task needs it.        │
 │                                                                                        │
 │  mattpocock/skills  3 skills  2 picked                                                 │
 │                                                                                        │
 │    ━━● grill-me                                                                        │
 │  ▶ ━━● improve-codebase-architecture                                                   │
 │    ●── tdd                                                                             │
 │                                                                                        │
 │  Find opportunities for architectural improvement, focusing on testable, deeper        │
 │  modules.                                                                              │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │  2 to install when you continue.                                                       │
 │                                                                                        │
 │  ↑↓ move  space pick  a all  ↵ continue  s skip  esc back                              │
 └────────────────────────────────────────────────────────────────────────────────────────┘
```

Connectors, skills and extensions install in the background once you pass their step. Ready lists them. Press `Enter` on a failed one to try again, or on a connector that needs its browser sign-in to sign in. Look shows the theme on the whole app as you move. A provider that an extension adds shows in Connect after you install the extension and start zidane again.

*Terminal: Features, each switch with what it does and an example.*

```text
 ┌ set up zidane ─────────────────────────────────────────────────────────────────── 9/10 ┐
 │                                                                                        │
 │  ✓ Welcome   ✓ Connect   ✓ Connectors   ✓ Skills   ✓ Extensions   ✓ Look               │
 │  ✓ Conversation   ✓ Autonomy   Features   Ready                                        │
 │                                                                                        │
 │  Turn on what you want                                                                 │
 │  You can change these, and more, in Settings.                                          │
 │                                                                                        │
 │    Work                                                                                │
 │  ▶ ━━● Codemode                                                         experimental   │
 │    ━━● Inline autocomplete                                                             │
 │    ●── Auto-update session titles                                        uses tokens   │
 │    ●── Spaces                                                                          │
 │    Trust                                                                               │
 │    ●── Load project extensions                                                         │
 │    In the background                                                                   │
 │    ━━● Check for updates                                                               │
 │    ━━● Check usage                                                                     │
 │                                                                                        │
 │  The model runs several tool calls at once, in one short script inside a sandbox.      │
 │                                                                                        │
 │  Gives you  Many tool calls in one step. Long tasks take fewer turns, so runs finish   │
 │  faster and cost less.                                                                 │
 │  Prevents  A context full of small tool results. Only what the script prints goes      │
 │  back to the model.                                                                    │
 │                                                                                        │
 │  For example, to read 12 files, the model writes one script that reads all of them,    │
 │  instead of 12 tool calls.                                                             │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │  ↑↓ move  space turn on or off  ↵ continue  s skip  esc back                           │
 └────────────────────────────────────────────────────────────────────────────────────────┘
```

An install from before the wizard never opens it on its own. To open it again, use Run setup again at the end of [Settings › Agent](https://zidane.si/docs/tui-settings.md#action-rows), or Run setup in the command palette. It then starts on Connect, with your current values, and `Esc` on that first step closes it. `ZIDANE_NO_ONBOARDING=1` turns it off at launch. Every step, and what each one writes, is on [setup wizard](https://zidane.si/docs/ui-onboarding.md).

## Sign in

With no provider set up and the wizard off, `zidane` opens the provider picker. Connect in the wizard uses the same steps:

## 1. Pick a provider

Each provider's needs are on [providers](https://zidane.si/docs/providers.md).

## 2. Pick a method

API key, or OAuth in the browser when the provider offers it. A provider with one method skips this step.

## 3. Enter the credential

Paste the key, or finish OAuth in the browser. Local LLM asks for a base URL, an optional key, a default model and a context window.

OAuth on a provider you already use asks which account to replace or what to name the new one. Keys from environment variables also work.

Add or switch providers later in [Settings › Authentication](https://zidane.si/docs/tui-models.md#settings--authentication). The credentials file location is on [files and folders](https://zidane.si/docs/files.md).

## What opens

| You launch | You see |
| - | - |
| First time | The [setup wizard](#first-launch) |
| With a provider set up | Your last session (Settings › Agent › Start from last session) |
| With that setting off | The [sessions list](https://zidane.si/docs/tui-sessions.md) |

`Esc` in a chat opens the sessions list. `Esc` there returns to the open chat, or quits when none is open.

When the prompt or an input has selected text, `Ctrl`+`C` copies it and `Ctrl`+`X` cuts it. Text that you select with the mouse goes to the clipboard when you release the button. With no selection in the prompt or an input, `Ctrl`+`C` follows Settings › UI › Ctrl+C behavior:

| Choice | Ctrl+C does |
| - | - |
| Quit (default) | Quits |
| Confirm | Asks first |
| Stop, then quit | The first press stops the run (or clears the prompt). A second press within 1.5 seconds quits. |

## Command-line switches

| Flag | Description |
| - | - |
| `--no-daemon` | Force the in-process runtime: the kill switch for the daemon setting (sets ZIDANE_NO_DAEMON=1). |
| `--no-remote` | Turn remote hosts off (sets ZIDANE_NO_REMOTE=1): refuses --host and ignores ZIDANE_HOST_URL. |
| `--host <wss-url>` | Launch the TUI on a remote zidane server (also ZIDANE_HOST_URL). |
| `--token-file <path\|->` | Read the server's device token from a file, or from stdin with - (also ZIDANE_HOST_TOKEN). |
| `--token <t\|->` | The device token itself. It shows in ps and shell history: prefer --token-file. |
| `-v, --version` | Print the version and exit. |
| `-h, --help` | Print this help and exit. |

`--no-daemon`: [the daemon](https://zidane.si/docs/daemon.md). `--no-remote`, `--host` and the token flags: [remote hosts](https://zidane.si/docs/tui-remote.md#open-the-app-on-one-server). Subcommands (`run`, `daemon`, `attach`, `server`, `machine`, `upgrade`): [CLI](https://zidane.si/docs/cli.md).

## Updates

The footer checks for a new `zidane-tui` once a day and shows `↑ vX.Y.Z` when one exists. Install it with:

```bash
zidane upgrade
```

The chip then turns into `↻ vX.Y.Z`. Restart the app to use the new version. To install new releases in the background, turn on Settings › Agent › Install updates automatically. The app never restarts on its own, and the daemon restarts once nothing runs. A global desktop app install (`zidane-gui`) upgrades in the same run. Flags and exit codes: [CLI](https://zidane.si/docs/cli.md#updating).

| To stop the check | Do |
| - | - |
| In the app | Turn off Settings › Agent › Check for updates |
| For a shell | Set `ZIDANE_NO_UPDATE=1` or `NO_UPDATE_NOTIFIER=1` |
| In CI | Nothing: the check never runs when `CI` is set |

## Same engine as the desktop app

The terminal app and the [desktop app](https://zidane.si/docs/desktop.md) run the same chat engine and read the same files: [one engine, two apps](https://zidane.si/docs/apps.md).

## Reference

- [`zidane/tui`](https://zidane.si/docs/reference/tui.md): `runTui` and the options to embed the app
