openclaw tui
打开连接到 Gateway 的终端 UI,或以本地嵌入式模式运行。
相关:
- TUI 指南:TUI
选项
| Flag | Default | Description |
|---|---|---|
--local | false | 运行本地嵌入式 agent 运行时,而不是 Gateway。 |
--url <url> | gateway.remote.url from config | Gateway WebSocket URL。 |
--token <token> | (none) | 如有需要,Gateway token。 |
--password <pass> | (none) | 如有需要,Gateway 密码。 |
--session <key> | main (or global when scope is global) | 会话 key。在 agent 工作区内,它会自动选择该 agent,除非前缀已指定。 |
--deliver | false | 通过已配置的渠道发送 assistant 回复。 |
--thinking <level> | (model default) | 思考级别覆盖。 |
--message <text> | (none) | 连接后发送初始消息。 |
--timeout-ms <ms> | agents.defaults.timeoutSeconds | agent 超时。无效值会记录警告并被忽略。 |
--history-limit <n> | 200 | 连接时加载的历史条目数量。 |
openclaw chat 和 openclaw terminal 会以隐含的 --local 调用同一个命令。
注意:
chat和terminal是openclaw tui --local的别名。--local不能与--url、--token或--password一起使用。tui会在可能时解析为 token/password 认证配置的 Gateway auth SecretRefs(env/file/exec提供程序)。- 当从已配置的 agent 工作区目录内启动时,TUI 会为会话 key 默认值自动选择该 agent(除非
--session明确指定为agent:<id>:...)。 - 本地模式直接使用嵌入式 agent 运行时。大多数本地工具都可用,但 Gateway 专属功能不可用。
- 本地模式会在 TUI 命令界面中增加
/auth [provider]。 - 插件审批门控在本地模式下仍然适用。需要审批的工具会在终端中提示决策;由于未经过 Gateway,不会静默自动批准。
- 会话 目标 会显示在页脚中,并可通过
/goal管理。
示例
配置修复循环
当当前配置已经通过验证,并且你希望嵌入式 agent 检查它、将其与文档对比,并帮助你在同一个终端中修复它时,请使用本地模式: 如果openclaw config validate 已经失败,请先使用 openclaw configure 或 openclaw doctor --fix。openclaw chat 不会绕过无效配置保护。
openclaw config set 或 openclaw configure 应用有针对性的修复,然后重新运行 openclaw config validate。参见 TUI 和 Config。