# Quickstart: the terminal UI

> Try zelk in a repository in a minute, by setting up a model, giving it a first task and approving its edit.

The terminal UI is the quickest way to see zelk work. It is a full-screen chat
with an agent in the directory you start it in, and it asks before it changes
anything. This page takes you from a built `zelk` to a change made in a
repository. If you haven't built it yet, start with [Get zelk](/start/get/).

To use zelk from a program, see [the Go quickstart](/start/go/); to run it in
a script or in CI, see [the scripting quickstart](/start/cli/).

## Start it

Open a terminal in a Git repository, one you don't mind changing, and run:

```sh
zelk
```

The first time, zelk has no model, so it opens **Set up a model provider**:

- **Name**: what you'll call this provider, such as `work` or `ollama`.
- **API**: `openai-compat` for OpenAI and any server that speaks its Chat
  Completions API, or `openai`, `anthropic`, `gemini`, `chatgpt`,
  `opencode`, `ollama`, `lmstudio` or `llamacpp`. Choose with ← and →.
- **Base URL**: filled in for the API you chose; change it for a proxy or
  another server.
- **API key**: the key itself, or `$NAME` to read it from the variable
  `NAME` each time zelk starts, so the key isn't written to disk.
- **Model**: the model to start with. Leave it empty to pick one from the
  provider's list.

Tab moves between the fields; Enter on the last one saves. zelk keeps
providers in `~/.config/zelk/providers.json` (on Windows,
`%APPDATA%\zelk\providers.json`), readable only by you, and
`/provider` adds and switches between them later.

Only the terminal UI reads that file. Print mode, `zelk exec` and the
library take the provider from flags and variables instead
([the scripting quickstart](/start/cli/#give-it-a-model)).

## Give it a task

Type what you want and press Enter:

```text
Add a short Usage section to README.md
```

zelk reads the files it needs, and reading never asks. Before its first
edit it stops and shows you the change:

```text
╭─ Make this edit? ───────────────────────────────── edit ─╮
│ README.md  +9                                            │
│ …                                                        │
│ › 1. Yes          allow it this once                     │
│   2. Yes, always  don't ask again for Edit(README.md)    │
│   3. No           don't allow it                         │
│   4. No, explain  say what to do instead                 │
╰──────────────────────────────────────────────────────────╯
```

Choose **Yes**, and zelk makes the edit, checks its work where there is
something to check, and ends with a short report of what it did and what it
didn't verify.

That approval came from the **permission mode**, shown at the bottom left.
zelk starts in `default` (shown as **ASK**): reads run, anything else asks.
Shift+Tab cycles through `default`, `accept-edits` (workspace edits run
too), `plan` (read-only: it explores and proposes a plan) and `auto` (a
reviewer model decides what would otherwise ask you).
[Permissions](/concepts/permissions/) explains each.

A few keys to know from the start:

| Key | Does |
|---|---|
| `/` on an empty prompt | the palette: every command, skill and tool |
| `@` | mention a file, attaching it to your message |
| `!` | run a shell command yourself |
| Esc | stop the current run |
| Ctrl+O | expand a tool's output |
| Ctrl+D twice | quit |

The full list is in [Keys](/reference/keys/).

## Come back to it

zelk keeps every session. Start it again in the same directory and continue
where you left off:

```sh
zelk -c                   # continue this directory's last session
zelk -c "and update the docs"
zelk -r                   # pick a session to resume
```

## Next

- [The terminal UI](/cli/tui/): the screen, the palette, settings and plans
- [Permissions](/concepts/permissions/): modes, rules and the sandbox
- [Run zelk from scripts and CI](/start/cli/): print mode and `zelk exec`
- [Embed zelk in Go](/start/go/): the library the terminal UI is built on
