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

# TUI

# `fluffbuzz tui`

Open the terminal UI connected to the Gateway, or run it in local embedded
mode.

Related:

* TUI guide: [TUI](/web/tui)

Notes:

* `chat` and `terminal` are aliases for `fluffbuzz tui --local`.
* `--local` cannot be combined with `--url`, `--token`, or `--password`.
* `tui` resolves configured gateway auth SecretRefs for token/password auth when possible (`env`/`file`/`exec` providers).
* When launched from inside a configured agent workspace directory, TUI auto-selects that agent for the session key default (unless `--session` is explicitly `agent:<id>:...`).
* Local mode uses the embedded agent runtime directly. Most local tools work, but Gateway-only features are unavailable.
* Local mode adds `/auth [provider]` inside the TUI command surface.
* Plugin approval gates still apply in local mode. Tools that require approval prompt for a decision in the terminal; nothing is silently auto-approved because the Gateway is not involved.

## Examples

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
fluffbuzz chat
fluffbuzz tui --local
fluffbuzz tui
fluffbuzz tui --url ws://127.0.0.1:18789 --token <token>
fluffbuzz tui --session main --deliver
fluffbuzz chat --message "Compare my config to the docs and tell me what to fix"
# when run inside an agent workspace, infers that agent automatically
fluffbuzz tui --session bugfix
```

## Config repair loop

Use local mode when the current config already validates and you want the
embedded agent to inspect it, compare it against the docs, and help repair it
from the same terminal:

If `fluffbuzz config validate` is already failing, use `fluffbuzz configure` or
`fluffbuzz doctor --fix` first. `fluffbuzz chat` does not bypass the invalid-
config guard.

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
fluffbuzz chat
```

Then inside the TUI:

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
!fluffbuzz config file
!fluffbuzz docs gateway auth token secretref
!fluffbuzz config validate
!fluffbuzz doctor
```

Apply targeted fixes with `fluffbuzz config set` or `fluffbuzz configure`, then
rerun `fluffbuzz config validate`. See [TUI](/web/tui) and [Config](/cli/config).
