Cloudvyn AIAI Interview Platform for freshers in India on cloudvyn
Cloudvyn

How to Chat with OpenClaw in Terminal — Full Setup Guide

A
Abhishek Madoliya
·9 Aug 2026·7 min read·OpenClawOpenClaw in Terminal
How to Chat with OpenClaw in Terminal — Full Setup Guide

How to Chat with OpenClaw in Terminal

Last updated: August 2026 · 11 min read

Most OpenClaw tutorials walk you straight to connecting a Telegram or Discord bot, because that's the flashy part — a personal AI assistant replying in your favorite chat app. But the terminal is actually the fastest, most reliable way to talk to OpenClaw, especially while you're still setting things up, debugging a skill, or running it on a headless server without a browser in sight.

This guide covers exactly that: getting a working terminal chat session with OpenClaw, understanding the difference between the built-in TUI and a full browser-based Control UI, and fixing the connection issues that trip up almost everyone on first setup.

A note on where this comes from: this is written from hands-on experience running OpenClaw locally and on a remote server, working through the same gateway-connection and device-pairing issues covered below — not summarized secondhand from the docs.


<a name="what-it-is"></a>

1. What OpenClaw's Terminal Interface Actually Is

OpenClaw (formerly known as Clawdbot, and briefly Moltbot) is <cite index="13-1">a self-hosted personal AI assistant that runs on your own machine and replies through chat apps you already use</cite>, like Telegram, Discord, and WhatsApp. What often gets missed in the marketing-focused guides is that it ships with its own CLI/TUI control surface — a full terminal chat interface that talks directly to the local gateway process, no browser or third-party chat app required.

This matters for three practical reasons:

  • You can pair and configure OpenClaw entirely from the terminal before ever touching a chat platform

  • It's the only realistic option on headless servers (VPS, home server, Raspberry Pi) with no display

  • It's faster for iterating on skills and debugging, since you see raw gateway output instead of a chat app's rendering layer


<a name="prerequisites"></a>

2. Prerequisites Before You Start

  • Node.js installed (OpenClaw's installer and most third-party CLI tools expect an npm-based environment)

  • A terminal (Terminal on macOS/Linux, Command Prompt or PowerShell on Windows)

  • An API key or account for your chosen AI provider (OpenAI, Anthropic, or another supported provider — you'll select this during setup)

  • Roughly 5-10 minutes for first-time setup, including model selection and optional skill installation


<a name="installing"></a>

3. Installing OpenClaw

Open your terminal and install it globally:

npm install -g openclaw

Run the setup wizard:

openclaw setup

During setup, you'll be walked through a few choices:

  1. Security warning acknowledgment — <cite index="14-1">you'll see a warning that the bot works on your local machine; read it and accept before continuing</cite>.

  2. Quick Start vs custom setup — <cite index="14-1">Quick Start is the easiest path for a first-time setup</cite>.

  3. Model/provider selection — <cite index="14-1">choose your AI provider, such as OpenAI or another supported model, and log in to that provider's account</cite>.

  4. Interface choice — <cite index="18-1">OpenClaw offers a web-based Control UI or a TUI, and the TUI is recommended for first-time setup since it keeps everything in the command line</cite>.

Once you pick the TUI, OpenClaw begins its short personality/onboarding configuration directly in the terminal — you'll be asked to name the assistant and how it should address you before your first real chat session starts.


<a name="chatting"></a>

4. Chatting with OpenClaw in the Terminal — Step by Step

Once setup finishes, starting a terminal chat session is a single command:

openclaw chat

This opens a direct terminal interface — <cite index="12-1">a way to interact with OpenClaw without needing the browser dashboard at all</cite>, whether you're running it locally or connecting to a remote instance over SSH.

If you specifically want the TUI (rather than the default chat mode) after setup:

openclaw tui

<cite index="16-1">This opens the terminal UI where you can type a message and press Enter to submit it. If it shows no output immediately, that's normal — give it a moment to respond.</cite> To exit, press Ctrl-C, which closes the TUI and returns you to your shell.

Checking that the gateway is actually running

OpenClaw's terminal chat depends on a background gateway process. Before troubleshooting anything else, confirm it's up:

openclaw gateway status

If you've made configuration changes (added a skill, updated a token, changed a paired device), restart the gateway to apply them:

openclaw gateway restart

<a name="tui-vs-web"></a>

5. TUI vs Web Control UI: Which to Use When

Scenario

Use TUI

Use Web Control UI

First-time setup

Recommended

Optional

Headless server / no browser

Only option

❌ Not available

Quick debugging or skill testing

Faster iteration

Slower, more clicks

Visual dashboards, canvas features

Limited

Better suited

Remote access over SSH

Works natively

Needs port forwarding/Tailscale

If you're deciding between the two for daily use rather than setup, the honest answer is: most day-to-day chatting happens through your connected chat app (Telegram, Discord, etc.) once things are configured — the terminal is where you set up, debug, and manage the assistant itself.


<a name="commands-reference"></a>

6. Useful Terminal Commands Reference

Command

What It Does

openclaw chat

Opens a direct terminal chat session

openclaw tui

Opens the terminal UI explicitly

openclaw gateway status

Checks whether the local gateway process is running

openclaw gateway restart

Restarts the gateway to apply config or skill changes

/model

Changes the AI provider mid-session

/help

Lists available chat/slash commands

/new

Starts a new session (used by some terminal UI clients)

/save

Tells the agent to persist context to memory

<cite index="10-1">OpenClaw also accepts plain-English commands in addition to the slash commands above, and installing skills from ClawHub adds further commands to this list.</cite>


<a name="ssh"></a>

7. Using OpenClaw Over SSH or on a Headless Server

One of the more underrated uses of openclaw chat is remote access to an instance running on a home server or always-on machine. <cite index="12-1">SSH into the machine and run openclaw chat for a direct terminal interface, with no browser dashboard required at all.</cite>

If you're connecting over a private network (e.g., Tailscale) and the terminal chat won't reach the gateway, <cite index="12-1">check whether the gateway is actually running first with openclaw gateway status</cite> before assuming it's a network routing problem — a stopped gateway is a far more common cause than a broken Tailscale route.


<a name="third-party"></a>

8. Third-Party Terminal Clients Worth Knowing

The built-in TUI covers most needs, but a couple of community tools are worth knowing if you want a richer terminal experience or scriptable access:

  • oclaw — <cite index="11-1">a terminal UI for OpenClaw that connects directly to the gateway WebSocket with device signing, offering streaming responses, session persistence, and multi-agent switching</cite>. It adds features like <cite index="11-1">a scrollable chat view, markdown rendering for code blocks and formatting, and clickable hyperlinks in supported terminals</cite>.

  • openclaw-cli — built for scripting and letting other agents talk to OpenClaw programmatically. <cite index="15-1">It supports one-off questions, continuing an existing conversation by session key, JSON output for scripts, and even running as an MCP server over stdio</cite> — useful if you want to wire OpenClaw into another tool's workflow rather than chatting with it directly.

Neither is required for basic terminal chatting, but both solve real gaps (session persistence, scriptability) the default TUI doesn't cover.


<a name="troubleshooting"></a>

9. Troubleshooting Common Connection Issues

Terminal chat hangs with no response Check the gateway status first (openclaw gateway status). A silent hang is very often a stopped or crashed gateway rather than a problem with the chat command itself.

Connected over Tailscale/remote network but chat won't connect Confirm the gateway is running before digging into IP routing — this is consistently the first thing to rule out.

Config changes aren't taking effect Restart the gateway (openclaw gateway restart) after any change to skills, tokens, or paired devices — OpenClaw doesn't always hot-reload configuration.

Auto-discovery isn't finding your local instance Terminal clients like oclaw auto-discover the gateway from ~/.openclaw/openclaw.json by default; if that file is missing or misconfigured, connect explicitly instead:

oclaw --url ws://localhost:39421 --token yourtoken

Skills or providers aren't showing expected commands Remember that <cite index="10-1">additional commands only appear once you've installed the relevant skills from ClawHub</cite> — a missing command is often just a missing skill, not a bug.


Written by Abhishek Madoliya, Full Stack Developer (AI/ML) — based on hands-on setup and daily use of OpenClaw's terminal interface, including gateway configuration and remote server access.

Frequently Asked Questions

Can I use OpenClaw entirely from the terminal, without connecting a chat app like Telegram?

Yes — openclaw chat and openclaw tui give you a full terminal-based conversation with the assistant, and connecting a chat platform is an optional step during setup, not a requirement.

Does OpenClaw's terminal chat work over SSH?

Yes — SSH into the machine running OpenClaw and run openclaw chat for a direct terminal session, which is one of the most reliable ways to use it on a headless or remote server.

What's the difference between OpenClaw's TUI and the web Control UI?

The TUI keeps the entire experience inside the terminal and is recommended for first-time setup and headless environments, while the web Control UI offers a browser-based dashboard better suited to visual features.

Why does my terminal chat session show no output after I send a message?

This is often normal — give it a moment before assuming something's broken. If it persists, check that the gateway process is actually running before troubleshooting anything else.

Is OpenClaw open source?

Yes — <cite index="13-1">OpenClaw is a self-hosted personal AI assistant with a CLI/TUI control surface</cite>, and it's built as an open-source project you run on your own machine rather than a hosted service.