CLI 命令

重置

openclaw reset

重置本地配置/状态(保留已安装的 CLI)。

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:输出将执行的操作,但不删除文件

范围

范围 删除内容 是否先停止 Gateway 网关
config 仅配置文件
config+creds+sessions 配置文件、OAuth/凭据目录、各智能体的会话目录
full 状态目录(包括嵌套其中的配置/凭据)、工作区目录和工作区认证记录

config+creds+sessionsfull 会先停止正在运行的托管 Gateway 网关服务,再删除状态。

注意事项

  • 删除本地状态前,请先运行 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