CLI commands

TUI

openclaw tui

開啟連接到 Gateway 的終端機 UI,或以本機嵌入模式執行。

相關:

  • TUI 指南:TUI

選項

旗標 預設值 說明
--local false 對本機嵌入式代理程式執行階段執行,而不是 Gateway。
--url <url> 來自設定的 gateway.remote.url Gateway WebSocket URL。
--token <token> (無) Gateway 權杖(如有需要)。
--password <pass> (無) Gateway 密碼(如有需要)。
--session <key> main(或範圍為全域時的 global 工作階段鍵。在代理程式工作區內,除非加上前綴,否則會自動選取該代理程式。
--deliver false 透過已設定的頻道傳遞助理回覆。
--thinking <level> (模型預設值) Thinking 等級覆寫。
--message <text> (無) 連線後傳送初始訊息。
--timeout-ms <ms> agents.defaults.timeoutSeconds 代理程式逾時。無效值會記錄警告並被忽略。
--history-limit <n> 200 附加時要載入的歷史記錄項目數。

別名:openclaw chatopenclaw terminal 會叫用相同命令,並隱含 --local

注意事項:

  • chatterminalopenclaw tui --local 的別名。
  • --local 無法與 --url--token--password 結合使用。
  • 可能時,tui 會解析已設定的 Gateway 驗證 SecretRefs,以用於權杖/密碼驗證(env/file/exec 提供者)。
  • 從已設定的代理程式工作區目錄內啟動時,TUI 會自動選取該代理程式作為工作階段鍵預設值(除非 --session 明確為 agent:<id>:...)。
  • 本機模式會直接使用嵌入式代理程式執行階段。大多數本機工具可用,但 Gateway 專屬功能無法使用。
  • 本機模式會在 TUI 命令介面中加入 /auth [provider]
  • Plugin 核准閘門在本機模式中仍然適用。需要核准的工具會在終端機提示決策;不會因為未涉及 Gateway 就靜默自動核准任何項目。

範例

bash
openclaw chatopenclaw tui --localopenclaw tuiopenclaw tui --url ws://127.0.0.1:18789 --token <token>openclaw tui --session main --deliveropenclaw chat --message "Compare my config to the docs and tell me what to fix"# when run inside an agent workspace, infers that agent automaticallyopenclaw tui --session bugfix

設定修復迴圈

當目前設定已通過驗證,而你想要嵌入式代理程式檢查它、將它與文件比較,並從同一個終端機協助修復時,請使用本機模式:

如果 openclaw config validate 已經失敗,請先使用 openclaw configureopenclaw doctor --fixopenclaw chat 不會繞過無效設定防護。

bash
openclaw chat

接著在 TUI 內:

text
!openclaw config file!openclaw docs gateway auth token secretref!openclaw config validate!openclaw doctor

使用 openclaw config setopenclaw configure 套用目標修復,然後重新執行 openclaw config validate。請參閱 TUI設定

相關

Was this useful?