CLI commands

設定

openclaw setup

初始化 ~/.openclaw/openclaw.json 與代理工作區。

相關:

範例

openclaw setup
openclaw setup --workspace ~/.openclaw/workspace
openclaw setup --wizard
openclaw setup --wizard --import-from hermes --import-source ~/.hermes
openclaw setup --non-interactive --mode remote --remote-url wss://gateway-host:18789 --remote-token <token>

選項

  • --workspace <dir>:代理工作區目錄(儲存為 agents.defaults.workspace
  • --wizard:執行初始設定
  • --non-interactive:不顯示提示並執行初始設定
  • --mode <local|remote>:初始設定模式
  • --import-from <provider>:初始設定期間要執行的遷移提供者
  • --import-source <path>--import-from 的來源代理主目錄
  • --import-secrets:在初始設定遷移期間匯入支援的密鑰
  • --remote-url <url>:遠端 Gateway WebSocket URL
  • --remote-token <token>:遠端 Gateway token

若要透過 setup 執行初始設定:

openclaw setup --wizard

注意事項:

  • openclaw setup 會初始化設定與工作區,而不執行完整的初始設定流程。
  • 完成純 setup 後,執行 openclaw configure 以選擇模型、頻道、Gateway、Plugin、Skills 或健康檢查。
  • 只要存在任何初始設定旗標,初始設定就會自動執行(--wizard--non-interactive--mode--import-from--import-source--import-secrets--remote-url--remote-token)。
  • 如果偵測到 Hermes 狀態,互動式初始設定可以自動提供遷移。匯入初始設定需要全新的 setup;若要在初始設定之外進行試執行計畫、備份與覆寫模式,請使用遷移

相關