CLI commands

重設

openclaw reset

重設本機設定/狀態(保留已安裝的命令列介面)。

bash
openclaw resetopenclaw reset --dry-runopenclaw reset --scope config --yes --non-interactiveopenclaw reset --scope config+creds+sessions --yes --non-interactiveopenclaw reset --scope full --yes --non-interactive

選項

  • --scope <scope>configconfig+creds+sessionsfull
  • --yes:略過確認提示
  • --non-interactive:停用提示;必須搭配 --scope--yes
  • --dry-run:列印將執行的動作,但不移除檔案

範圍

範圍 移除項目 是否先停止閘道
config 僅設定檔
config+creds+sessions 設定檔、OAuth/憑證目錄、各代理程式的工作階段目錄
full 狀態目錄(包括巢狀於其中的設定/憑證),以及工作區目錄和工作區證明

config+creds+sessionsfull 會先停止正在執行的受管理閘道服務,再刪除狀態。

注意事項

  • 移除本機狀態前,請先執行 openclaw backup create,建立可還原的快照。
  • 未指定 --scope 時,openclaw reset 會以互動方式提示選擇要移除的範圍。
  • 只有同時設定 --scope--yes 時,才能使用 --non-interactive
  • config+creds+sessionsfull 完成後會顯示 Next: openclaw onboard --install-daemon

相關內容

Was this useful?
On this page

On this page