> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ziro-agent.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Slash commands

> The complete slash-command surface, dispatched in the driver loop before any model call.

Slash commands are typed into the chat input like any other message, but they never
reach the model. The driver loop dispatches them **before** the LLM call, so a
command costs no tokens, produces no tool calls, and leaves no trace in the
transcript the model sees.

They are a different surface from skills and tools:

| Surface        | Who invokes it | Where it runs                     |
| -------------- | -------------- | --------------------------------- |
| Slash commands | You            | The driver loop, before the graph |
| Tools          | The model      | Inside the graph, as a tool call  |
| Skills         | The model      | Retrieved as text, then acted on  |

Commands are registered in a single declarative table, so the REPL, the Textual
TUI, and `chat_once` all recognize the same names and aliases.

## Control

| Command | Aliases       | What it does                                       |
| ------- | ------------- | -------------------------------------------------- |
| `/help` | `/h`          | List every registered command with its usage line. |
| `/stop` | `/halt`       | Abort the turn currently in flight.                |
| `/quit` | `/exit`, `/q` | Exit the session.                                  |

`/stop` is the only command that is meaningful *during* a turn. The REPL
intercepts it in the input producer (the consumer only drains between turns); the
TUI cancels the graph-loop future. Both paths then reset the Langfuse handler,
because a cancelled turn skips LangChain's error callbacks and would otherwise
leave unended spans that corrupt every later turn's tracing.

<Tip>
  Ctrl+S stops the running turn in the TUI without typing anything.
</Tip>

## Session

| Command                                | Aliases               | What it does                                                                                                |
| -------------------------------------- | --------------------- | ----------------------------------------------------------------------------------------------------------- |
| `/user [id]`                           | None                  | List users, or switch to one. Switching starts a fresh thread with separate memories.                       |
| `/agent [id]`                          | None                  | List the agents in the active flavour, or switch to one. Rebuilds the session in place, keeping the thread. |
| `/thread [n\|id\|new\|delete <n\|id>]` | `/threads`, `/resume` | Browse this user's threads, resume by index or id, start a fresh one, or delete one.                        |
| `/new`                                 | None                  | Start a fresh thread on the same agent and model.                                                           |

`/thread` with no argument opens a picker scoped to the active flavour, so a
`research`-flavour thread is invisible while you are chatting in `chat`. The
picker offers a **+ New thread** row; pressing Esc there cancels and keeps your
current thread rather than starting one.

Deleting a thread removes its index entry and its checkpointed conversation
permanently. It never touches long-term memory. Deleting the thread you are
currently in starts a fresh one.

<Note>
  `/new`, Ctrl+N, `/thread new`, and the picker's **+ New thread** row all funnel
  through the same code path and print the same confirmation line, so they are
  interchangeable.
</Note>

### Thread titles

After a thread's first interactive turn, a background model call generates a
short name for it. If that call fails or the turn was headless, the title falls
back to a truncated first message. Titles are what the thread picker shows.

## Config

| Command                           | Aliases | What it does                                                                                  |
| --------------------------------- | ------- | --------------------------------------------------------------------------------------------- |
| `/settings`                       | None    | Edit the API key, model, Langfuse keys, database URL, theme, and the per-tier default models. |
| `/model [id]`                     | None    | List the active provider's model catalog, or switch the model (rebuilds the LLM).             |
| `/think <high\|medium\|low\|off>` | None    | Set the reasoning effort and rebuild the graph at the new setting.                            |

`/settings` only rebinds the part of the session you actually changed. Opening
the panel and closing it without edits triggers no rebuild.

A `/model` or `/settings` provider switch made inside a thread overrides the
agent's pinned model, persists to the thread index, and is restored when you
resume that thread later. `/model` always lists the **active** provider's
catalog, not a global list.

`/think` warns rather than blocks when the current model does not advertise
reasoning support: the setting is applied and simply has no effect. The TUI
header shows the current effort, and Ctrl+T cycles it.

## Tools

| Command                                     | Aliases   | What it does                                                                      |
| ------------------------------------------- | --------- | --------------------------------------------------------------------------------- |
| `/voice [on\|off]`                          | None      | Toggle push-to-talk voice I/O. Requires `voice_policy.yaml` enabled.              |
| `/img <path> [text]`                        | None      | Attach an image to this turn.                                                     |
| `/mcp [server]`                             | None      | Show MCP server status. In the TUI this opens the control panel.                  |
| `/capability [list\|add <id>\|remove <id>]` | `/cap`    | List, add, or remove a capability.                                                |
| `/skills`                                   | None      | Show the skills the agent can reach, tagged by source.                            |
| `/reload-skills`                            | None      | Re-index skills across the project and global roots.                              |
| `/memory [forget <name>\|path]`             | None      | List project-memory facts, forget one, or print the layer-0 directory.            |
| `/scratch [clear\|path]`                    | None      | List the thread's `tmp://` scratch files, wipe them, or print the real directory. |
| `/plugins [install\|enable\|disable\|…]`    | `/plugin` | List plugins and manage them. In the TUI, no subcommand opens the plugin panel.   |
| `/reload-plugins`                           | None      | Re-scan plugins from disk.                                                        |
| `/sidebar`                                  | None      | Toggle the side pane (todos, active tools, active plugins).                       |

### Skill and memory listings

`/skills` tags each entry with where it came from: `bundled` (shipped),
`workspace` (this project's `./skills/`), or `plugin` (surfaced by an installed
plugin).

`/memory` lists each project-memory fact with its name, its description, and the
layer it lives on. Only
layer 0 is writable, so `forget` deletes from the current project or worktree and
never from an inherited parent repo.

### Plugins

`/plugins install <src> [ref]` uses a staged-then-confirm flow rather than a
blocking prompt: the install is staged, a consent manifest is rendered, and you
run `/plugins confirm` (or `/plugins confirm safe` to install with the dangerous
parts inert) or `/plugins cancel`.

<Warning>
  Enabling or disabling a plugin from inside a chat writes a **thread-scoped**
  override, not a global one. The global default changes only at install time or
  via `ziro plugin enable|disable` on the command line.
</Warning>

## Transcript

| Command        | Aliases | What it does                   |
| -------------- | ------- | ------------------------------ |
| `/save [path]` | None    | Save the transcript to a file. |

## Keyboard equivalents in the TUI

| Key       | Action                                             |
| --------- | -------------------------------------------------- |
| Ctrl+N    | New thread                                         |
| Ctrl+S    | Stop the in-flight turn                            |
| Ctrl+O    | Open the MCP control panel                         |
| Ctrl+T    | Cycle reasoning effort (off → low → medium → high) |
| Ctrl+G    | Toggle the side pane                               |
| Ctrl+R    | Start a voice recording                            |
| Ctrl+L    | Clear the transcript view                          |
| Ctrl+C    | Quit                                               |
| Tab       | Complete the command you are typing                |
| Up / Down | Move through the command suggestion list           |

## Commands that work mid-turn

Most commands dispatch between turns. A small set is safe to open while a turn is
still running, so a popup appears instantly over the chat instead of queueing
behind the model:

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
/mcp  /skills  /help  /settings  /thread  /threads  /resume
/user  /voice  /agent  /model  /capability  /new  /sidebar
```

The **popup** opens immediately. Any **mutation** it commits (switching thread or
user, rebinding a key or model, installing and enabling voice) is deferred and
applied at the next turn boundary rather than racing the running turn.

<Info>
  This split is deliberate: reading state mid-turn is always safe, mutating the
  session under a live graph invocation is not.
</Info>

## Retired commands

Typing one of these prints a one-line redirect instead of doing anything:

| Retired    | Where it went                               |
| ---------- | ------------------------------------------- |
| `/clear`   | Merged into `/thread new`                   |
| `/theme`   | Moved into `/settings`                      |
| `/flavour` | Removed: a flavour is chosen once at launch |

`/flavour` is the notable one. A flavour scopes which agents are visible, which
threads exist, and which shared memory is in play, and it is fixed for the life of
the process. To move to a different flavour, relaunch with `--flavour` or use the
launch-time picker. Within a flavour, use `/agent`, `/thread`, and `/user` to move
around.

## Where commands are recognized

| Front end   | Commands                                                        | Notes                                                                   |
| ----------- | --------------------------------------------------------------- | ----------------------------------------------------------------------- |
| Textual TUI | All                                                             | Popups for `/mcp`, `/skills`, `/plugins`, `/settings`, and the pickers. |
| Rich REPL   | All except TUI-only popups                                      | Interactive commands render as numbered prompts.                        |
| `chat_once` | Recognition plus the `/agent`, `/model`, and `/thread` prefixes | Shares the same registry.                                               |

Commands marked interactive-only (`/new`, `/voice`, `/img`, `/mcp`, `/skills`,
`/memory`, `/scratch`, `/sidebar`) are not available in a headless run, because
there is no session to mutate.

## Next steps

<Columns cols={2}>
  <Card title="Terminal UI" icon="terminal" href="/interfaces/tui">
    The transcript, side pane, status footer, and modals these commands drive.
  </Card>

  <Card title="Headless runs" icon="cpu" href="/interfaces/headless">
    What changes when there is no interactive session.
  </Card>

  <Card title="CLI reference" icon="book-open" href="/reference/cli">
    Launch flags, entry points, and the dispatch rule.
  </Card>
</Columns>
