docs/web/tui.md
openclaw gateway
openclaw tui
Remote Gateway:
openclaw tui --url ws://<host>:<port> --token <gateway-token>
Use --password if your Gateway uses password auth.
Run the TUI without a Gateway:
openclaw chat
# or
openclaw tui --local
Notes:
openclaw chat and openclaw terminal are aliases for openclaw tui --local.--local cannot be combined with --url, --token, or --password.openclaw and openclaw crestodian also use this TUI shell, with Crestodian as the local setup and repair chat backend.main, research). The Gateway exposes the list.agent:<agentId>:<sessionKey>.
/session main, the TUI expands it to agent:<currentAgent>:main./session agent:other:main, you switch to that agent session explicitly.per-sender (default): each agent has many sessions.global: the TUI always uses the global session (the picker may be empty).--session, gateway-mode TUI resumes the last selected session for the same gateway, agent, and session scope if that session still exists. Passing --session, /session, /new, or /reset remains explicit./deliver onopenclaw tui --deliver/session <key> to jump to an older known session.Core:
/help/status/agent <id> (or /agents)/session <key> (or /sessions)/model <provider/model> (or /models)Session controls:
/think <off|minimal|low|medium|high>/fast <status|on|off>/verbose <on|full|off>/trace <on|off>/reasoning <on|off|stream>/usage <off|tokens|full>/elevated <on|off|ask|full> (alias: /elev)/activation <mention|always>/deliver <on|off>Session lifecycle:
/new or /reset (reset the session)/abort (abort the active run)/settings/exitLocal mode only:
/auth [provider] opens the provider auth/login flow inside the TUI.Other Gateway slash commands (for example, /context) are forwarded to the Gateway and shown as system output. See Slash commands.
! to run a local shell command on the TUI host.! disabled for the session.cd/env).OPENCLAW_SHELL=tui-local in their environment.! is sent as a normal message; leading spaces do not trigger local exec.Use local mode when the current config already validates and you want the embedded agent to inspect it on the same machine, compare it against the docs, and help repair drift without depending on a running Gateway.
If openclaw config validate is already failing, start with openclaw configure
or openclaw doctor --fix first. openclaw chat does not bypass the invalid-
config guard.
Typical loop:
openclaw chat
Compare my gateway auth config with the docs and suggest the smallest fix.
!openclaw config file
!openclaw docs gateway auth token secretref
!openclaw config validate
!openclaw doctor
openclaw config set or openclaw configure, then rerun !openclaw config validate.!openclaw doctor --fix.Tips:
openclaw config set or openclaw configure over hand-editing openclaw.json.openclaw docs "<query>" searches the live docs index from the same machine.openclaw config validate --json is useful when you want structured schema and SecretRef/resolvability errors.OPENCLAW_THEME=light before launching openclaw tui.OPENCLAW_THEME=dark.mode: "tui".--local: Run against the local embedded agent runtime--url <url>: Gateway WebSocket URL (defaults to config or ws://127.0.0.1:<port>)--token <token>: Gateway token (if required)--password <password>: Gateway password (if required)--session <key>: Session key (default: main, or global when scope is global)--deliver: Deliver assistant replies to the provider (default off)--thinking <level>: Override thinking level for sends--message <text>: Send an initial message after connecting--timeout-ms <ms>: Agent timeout in ms (defaults to agents.defaults.timeoutSeconds)--history-limit <n>: History entries to load (default 200)No output after sending a message:
/status in the TUI to confirm the Gateway is connected and idle/busy.openclaw logs --follow.openclaw status and openclaw models status./deliver on or --deliver).disconnected: ensure the Gateway is running and your --url/--token/--password are correct.openclaw agents list and your routing config.openclaw.json