openclaw tui
打开连接到 Gateway 的终端 UI,或以本地嵌入模式运行。
别名:openclaw chat 和 openclaw terminal(均等同于 openclaw tui --local)
选项
| 标志 | 默认值 | 说明 |
|---|---|---|
--local | false | 使用本地嵌入 agent runtime,不连接 Gateway |
--url <url> | config 中的 gateway.remote.url | Gateway WebSocket URL |
--token <token> | 无 | Gateway token |
--password <pass> | 无 | Gateway 密码 |
--session <key> | main | Session key |
--deliver | false | 通过配置的 channel 投递 assistant 回复 |
--thinking <level> | 模型默认 | 思考级别覆盖 |
--message <text> | 无 | 连接后发送初始消息 |
--timeout-ms <ms> | agents.defaults.timeoutSeconds | Agent 超时 |
--history-limit <n> | 200 | 加载的历史条数 |
使用示例
openclaw chat # 本地模式
openclaw tui --local
openclaw tui # 连接 Gateway
openclaw tui --url ws://127.0.0.1:18789 --token <token>
openclaw tui --session main --deliver
openclaw chat --message "Compare my config to the docs and tell me what to fix"
openclaw tui --session bugfix # 在 agent workspace 内自动推断 agent注意事项
--local不能与--url、--token、--password同时使用- 本地模式下 Gateway 专属功能不可用
- 本地模式增加
/auth [provider]命令 - Plugin approval gates 在本地模式下仍然生效,不会自动跳过
- 在 agent workspace 目录内启动时,自动选择该 agent 作为 session key 默认值
配置修复工作流
当 openclaw config validate 已通过时,用本地模式让 agent 检查并修复配置:
openclaw chat在 TUI 内执行:
!openclaw config file
!openclaw docs gateway auth token secretref
!openclaw config validate
!openclaw doctor若 config validate 失败,先用 openclaw configure 或 openclaw doctor --fix 修复,再启动 TUI。
相关链接
- cli-models — 模型管理
- cli-sandbox — 沙箱管理