Skip to content

Launch OpenClaw TUI: Terminal Interface Quick Start Guide

You are deep in your terminal, writing code or managing servers, and you need to consult your AI agent. Switching to a web browser feels like a chore that breaks your focus. You want a tool that stays in your environment and responds as fast as you type.

The TUI (Terminal UI) is built for exactly this. It gives you a powerful interface for interacting with your agents without ever leaving your command line.

Getting started is simple. First, you need to have your Gateway running.

  1. Start the Gateway.
Terminal window
openclaw gateway
  1. Open the TUI.
Terminal window
openclaw tui
  1. Type a message and press Enter.

If you are connecting to a Remote Gateway, use this command:

Terminal window
openclaw tui --url ws://<host>:<port> --token <gateway-token>

Use --password if your Gateway uses password auth.

The interface is designed to give you all the information you need at a glance:

  • Header: Shows your connection URL, the current agent, and the current session.
  • Chat log: This is where you see user messages, assistant replies, system notices, and tool cards.
  • Status line: Displays the connection and run state (connecting, running, streaming, idle, or error).
  • Footer: A dense info bar showing connection state, agent, session, model, settings (think/fast/verbose/reasoning), token counts, and delivery status.
  • Input: A text editor that supports autocomplete to help you type faster.

Understanding how the TUI organizes your work is key. It uses two main concepts:

  • Agents are unique slugs (like main or research). The Gateway provides this list.
  • Sessions belong to the current agent.

Session keys follow a specific format: agent:<agentId>:<sessionKey>.

  • If you type /session main, the TUI automatically expands it to agent:<currentAgent>:main.
  • If you want to switch explicitly, you can type /session agent:other:main.

Session scope works in two ways:

  • per-sender (default): Each agent can have many sessions.
  • global: The TUI always uses the global session, and the picker might be empty.

You can always check the footer to see which agent and session are active.

When you type a message, it goes to the Gateway. However, delivery to providers is turned off by default. You have to tell the TUI when you want the assistant to actually reply.

You can turn delivery on by:

  • Typing /deliver on
  • Using the Settings panel
  • Starting the TUI with openclaw tui --deliver

The TUI includes several overlays to help you manage your configuration:

  • Model picker: View available models and set a session override.
  • Agent picker: Choose a different agent to talk to.
  • Session picker: See the sessions available for your current agent.
  • Settings: A quick way to toggle delivery, tool output expansion, and thinking visibility.

Speed is the whole point of a TUI. Use these shortcuts to move faster:

  • Enter: send message
  • Esc: abort active run
  • Ctrl+C: clear input (press twice to exit)
  • Ctrl+D: exit
  • Ctrl+L: model picker
  • Ctrl+G: agent picker
  • Ctrl+P: session picker
  • Ctrl+O: toggle tool output expansion
  • Ctrl+T: toggle thinking visibility (this reloads history)

Commands give you direct control over the session.

Core commands:

  • /help
  • /status
  • /agent <id> (or /agents)
  • /session <key> (or /sessions)
  • /model <provider/model> (or /models)

Session controls:

  • /think &lt;off|minimal|low|medium|high&gt;
  • /fast &lt;status|on|off&gt;
  • /verbose &lt;on|full|off&gt;
  • /reasoning &lt;on|off|stream&gt;
  • /usage &lt;off|tokens|full&gt;
  • /elevated &lt;on|off|ask|full&gt; (alias: /elev)
  • /activation &lt;mention|always&gt;
  • /deliver &lt;on|off&gt;

Session lifecycle:

  • /new or /reset (reset the session)
  • /abort (abort the active run)
  • /settings
  • /exit

Other Gateway slash commands, such as /context, are forwarded to the Gateway and appear as system output. You can find more details in the Slash commands documentation.

You can run local shell commands directly from the TUI. Just prefix a line with !.

The TUI will ask for permission once per session before running local commands. If you decline, ! stays disabled for that session. These commands run in a fresh, non-interactive shell in the TUI’s working directory. Note that there is no persistent environment or directory change between commands.

Local shell commands have OPENCLAW_SHELL=tui-local set in their environment. If you type a lone !, it is treated as a normal message. Leading spaces will not trigger a local execution.

When an agent calls a tool, it appears as a card showing the arguments and results.

  • Use Ctrl+O to toggle between collapsed and expanded views.
  • While a tool is running, you will see partial updates streaming into the card.

The TUI is built to look good in any environment. It keeps the assistant’s text in your terminal’s default foreground color so it is readable on both dark and light backgrounds.

If the auto-detection fails for your light terminal, set OPENCLAW_THEME=light before you launch. To force the dark palette, use OPENCLAW_THEME=dark.

When you connect, the TUI pulls the latest history. By default, it loads the last 200 messages. Responses from the agent stream in real-time, updating in place until they are finished. The TUI also tracks agent tool events to provide detailed tool cards.

The TUI identifies itself to the Gateway using mode: "tui". If the connection drops, you will see a system message when it reconnects. Any gaps in events during the disconnection are highlighted in the log.

You can customize the TUI behavior with these CLI flags:

  • --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
  • --timeout-ms <ms>: Agent timeout in ms (defaults to agents.defaults.timeoutSeconds)

Note that when you set --url, the TUI won’t look for credentials in your config or environment. You must pass --token or --password explicitly.

If you aren’t seeing any output after sending a message, try these steps:

  • Run /status in the TUI to see if the Gateway is connected or busy.
  • Check the Gateway logs with openclaw logs --follow.
  • Verify the agent is ready with openclaw status and openclaw models status.
  • Make sure delivery is enabled with /deliver on or the --deliver flag.
  • Use --history-limit <n> if you need to load more than the default 200 entries.
  • “disconnected”: Check if the Gateway is running and verify your --url, --token, or --password.
  • No agents in picker: Run openclaw agents list and check your routing configuration.
  • Empty session picker: This happens if you are in global scope or haven’t created any sessions yet.

Need help getting everything configured? Check out the AI Setup Assistant.

OpenClaw

OpenClaw Expert

Still stuck?

If this page didn't answer your case, ask OpenClaw Expert for step-by-step guidance.