# The terminal UI

> A tour of zelk's full-screen chat, from the prompt and its keys to the palette, settings and plans.

On a terminal, `zelk` opens its terminal UI: a full-screen chat with the
agent, working in the directory you started it in. This page walks through
it. [The CLI quickstart](/start/cli/) covers the first run and the provider
setup screen.

## Starting it

```sh
zelk                         # a new session in this directory
zelk "fix the failing test"  # a new session, with this as the first message
zelk -c                      # continue this directory's last session
zelk -c "and the docs"       # continue it with this message
zelk -r                      # pick a session to resume
zelk -session ID             # open the session with this ID
zelk -mode auto              # start in another permission mode
zelk -models gpt-5-mini -models gpt-5   # models Switch model… offers too
```

A first message given on the command line is sent once the session can
take it: at once for a new session, after the log loads with `-c` or
`-session`, and after you pick one with `-r`.

`-c`, `-r`, `-session`, `-worktree`, `-theme`, `-settings`, `-providers`,
`-background` and `-models` belong to the terminal UI; without a terminal,
or with `-p`, zelk refuses them. Every other flag works as it does in
[print mode](/cli/print-and-exec/).

## The screen

The top line names the workspace, the Git branch and worktree, the model and
how full the context window is. Below it the transcript shows each prompt,
the agent's tool calls folded to one line each, and its answers. At the
bottom is the prompt, and under it the footer: the permission mode on the
left (**ASK** for `default`, **EDIT** for `accept-edits`, **PLAN**,
**AUTO**), and hints on the right. With the mouse on, a click on the mode
cycles it, and a click on a hint does what its key does.

## The prompt

| Key | Does |
|---|---|
| Enter | send |
| Shift+Enter, Ctrl+J | a new line |
| `/` on an empty prompt | the palette: commands, skills and tools |
| `@` | attach a workspace file: the model gets it already read |
| `!` | shell mode: run a command yourself; zelk sees its output and answers it |
| Ctrl+V, Alt+V | paste an image from the clipboard, as `[image 1]` |
| ↑ ↓ | earlier prompts |
| Ctrl+R | search earlier prompts |
| Ctrl+S | stash the draft; on an empty prompt, bring it back |

An attached file is quoted as `@src/main.go`, or `@"my notes.md"` with
spaces. A skill runs as `/name` followed by its arguments. Shell mode runs
your command in your own environment, outside any sandbox: in Bash on Linux
and macOS, and on Windows in PowerShell when zelk has it, otherwise in Git
Bash.

## While it works

Type while a run is going and press Enter to **steer** it: the message joins
the agent's next model turn, and the run can't finish before the model has
read it. Esc interrupts the run.

Long commands and subagents can move out of the way. Ctrl+B sends what is
running to the background, and Ctrl+Enter sends your queued message now,
moving running work to the background. **Background work…** in the palette,
or ↓ on an empty prompt while something runs (or a click on the footer's
count of it), lists it: a command's output, a subagent's conversation, and a
way to stop either. A command zelk can no longer find, such as one a zelk
that has since quit ran, stops at once: it is recorded as lost.

## The transcript

Tool calls are folded. Ctrl+O expands every tool's output and the model's
thinking; Tab focuses the transcript, where the arrows select a block,
Enter expands it, `c` copies it and `f` asks zelk to fix a failed call.
Ctrl+T shows or hides the task list, which otherwise names only the task
under way. PgUp, PgDn and the mouse wheel scroll.

## The palette

`/` on an empty prompt opens the palette. Type to filter it. Besides the
app's own commands it lists the agent's skills, its subagents and your MCP
servers' tools. Its sections:

- **Session**: Diff, Review…, New session, Resume a session…, Rewind…,
  Fork session, Rename session…, Tags…, Goal…, Compact now…, Set up
  AGENTS.md, Export conversation…, Copy last answer, Delete this session….
- **Model**: Switch model…, Reasoning effort…, Providers….
- **Permissions**: Permission mode…, Denied actions….
- **Tools**: MCP servers…, Pair with your browser…, Background work….
- **Memory**: Memory…, Remember….
- **View**: Status, Context (what fills the context window), Expand
  output, Task list.
- **App**: Settings…, Keys and help, Quit.

**Set up AGENTS.md** runs the built-in `init` skill: zelk surveys the
project and writes a short `AGENTS.md` at the workspace root, or fixes an
existing one where it is missing something or wrong.

## Plans

In `plan` mode the agent reads and searches, then presents a plan. The
**Ready to code?** dialog shows it with four choices:

1. **Yes, and auto-accept edits**: carry it out in `accept-edits`.
2. **Yes, and approve each edit**: carry it out in `default`.
3. **Yes, use auto mode**: the reviewer model decides what would ask.
4. **No, keep planning**: stay in plan mode, with a note on what to change.

Shift+Tab cycles `default`, `accept-edits`, `plan` and `auto` at any time;
**Permission mode…** offers every mode the session allows.

## Settings

**Settings…** changes everything zelk keeps, in groups: Appearance, Mouse
and selection, Model, Permissions, Sandbox and commands, Tools, Memory and
Telemetry ([OpenTelemetry](/cli/otel/) export, from the next start), and
Files. Each row says whether a change lasts for this session or is
saved.

The terminal UI's own settings live in `~/.config/zelk/tui.json`: `mouse`,
`copy_on_select`, `theme` (`dark` or `light`), `mode` (the mode sessions
start in, never `bypass`) and `notify` (notifications while the terminal is
unfocused). Run options it shares with the other hosts are saved in
`~/.config/zelk/config.json` and reach the running session at once: rules
before a run's next tool call, and a change a run or background work keeps
asks whether to wait, stop it, or leave it for the next start. The skill
cache, cleanup days, telemetry and where new credentials go apply from the
next start. A flag given at launch wins over both.

## Quitting

Ctrl+C twice quits, and so does Ctrl+D twice on an empty prompt. The
session stays: `zelk -c` brings it back.

## Where to go deeper

- [Keys](/reference/keys/) and the [keybindings file](/reference/keybindings/), to rebind them
- [The command palette](/reference/palette/), every command
- [Settings](/reference/settings/), every key in `config.json`
- [Sessions, rewind and checkpoints](/cli/sessions/)
