CLI 命令

CLI 参考

openclaw 是主要的 CLI 入口点。每个核心命令都有专用参考页面,或记录在它所别名指向的命令中;此索引列出命令、全局标志,以及适用于整个 CLI 的输出样式规则。

按意图使用设置命令:

  • openclaw setupopenclaw onboard 会运行完整的引导式首次运行流程,涵盖 Gateway 网关、模型凭证、工作区、渠道、Skills 和健康状态。
  • openclaw setup --baseline 会创建基线配置和工作区,而不进入引导式新手引导流程。
  • openclaw configure 会更改现有设置中的目标部分,例如模型凭证、Gateway 网关、渠道、插件或 Skills。
  • openclaw channels add 会在基线存在后配置渠道账户;不带标志运行可进入引导式渠道设置,或使用渠道专用标志用于脚本。

命令页面

区域 命令
设置和新手引导 crestodian · setup · onboard · configure · config · completion · doctor · dashboard
重置和卸载 backup · reset · uninstall · update
消息和智能体 message · agent · agents · attach · acp · mcp
健康和会话 status · health · sessions
Gateway 网关和日志 gateway · logs · system
模型和推理 models · infer · capabilityinfer 的别名)· memory · commitments · wiki
网络和节点 directory · nodes · devices · node
运行时和沙箱 approvals · exec-policy(见 approvals)· sandbox · tui · chat/terminaltui --local 的别名)· browser
自动化 cron · tasks · hooks · webhooks · transcripts
设备发现和文档 dns · docs
配对和渠道 pairing · qr · channels
安全和插件 security · secrets · skills · plugins · proxy
旧版别名 daemon(Gateway 网关服务)· clawbot(命名空间)
插件(可选) path · policy · voicecall · workboard(如果已安装)

全局标志

标志 用途
--dev 将状态隔离到 ~/.openclaw-dev 下,并偏移默认端口
--profile <name> 将状态隔离到 ~/.openclaw-<name>
--container <name> 针对具名容器执行
--no-color 禁用 ANSI 颜色(也会遵循 NO_COLOR=1
--update openclaw update 的简写(仅源代码安装)
-V, --version, -v 打印版本并退出

输出模式

  • ANSI 颜色和进度指示器只会在 TTY 会话中渲染。
  • OSC-8 超链接会在支持的位置渲染为可点击链接;否则 CLI 会回退为纯 URL。
  • --json(以及支持位置的 --plain)会禁用样式,以获得干净输出。
  • 长时间运行的命令会显示进度指示器(支持时使用 OSC 9;4)。

调色板事实来源:src/terminal/palette.ts

命令树

完整命令树
Code
openclaw [--dev] [--profile <name>] <command>crestodiansetuponboardconfigureconfig  get  set  unset  file  schema  validatecompletiondoctordashboardbackup  create  verifysecurity  auditsecrets  reload  audit  configure  applyresetuninstallupdate  wizard  statuschannels  list  status  capabilities  resolve  logs  add  remove  login  logoutdirectory  self  peers list  groups list|membersskills  search  install  update  list  info  checkplugins  list  inspect  install  uninstall  update  enable  disable  doctor  marketplace listworkboard  list  create  show  dispatchmemory  status  index  searchtranscripts  list  show  pathpath  resolve  find  set  validate  emitcommitments  list  dismisswiki  status  doctor  init  ingest  compile  lint  search  get  apply  bridge import  unsafe-local import  obsidian status|search|open|command|dailymessage  send  broadcast  poll  react  reactions  read  edit  delete  pin  unpin  pins  permissions  search  thread create|list|reply  emoji list|upload  sticker send|upload  role info|add|remove  channel info|list  member info  voice status  event list|create  timeout  kick  banagentagents  list  add  delete  bindings  bind  unbind  set-identityattachacpmcp  serve  list  show  set  unsetstatushealthsessions  cleanuptasks  list  audit  maintenance  show  notify  cancel  flow list|show|cancelgateway  call  usage-cost  health  status  probe  discover  install  uninstall  start  stop  restart  rundaemon  status  install  uninstall  start  stop  restartlogssystem  event  heartbeat last|enable|disable  presencemodels  list  status  set  set-image  aliases list|add|remove  fallbacks list|add|remove|clear  image-fallbacks list|add|remove|clear  scaninfer (alias: capability)  list  inspect  model run|list|inspect|providers|auth login|logout|status  image generate|edit|describe|describe-many|providers  audio transcribe|providers  tts convert|voices|providers|status|enable|disable|set-provider  video generate|describe|providers  web search|fetch|providers  embedding create|providers  auth add|login|login-github-copilot|setup-token|paste-token  auth order get|set|clearsandbox  list  recreate  explaincron  status  list  get  add  edit  rm  enable  disable  runs  runnodes  status  describe  list  pending  approve  reject  rename  invoke  notify  push  canvas snapshot|present|hide|navigate|eval  canvas a2ui push|reset  camera list|snap|clip  screen record  location getdevices  list  remove  clear  approve  reject  rotate  revokenode  run  status  install  uninstall  stop  restartapprovals  get  set  allowlist add|removeexec-policy  show  preset  setbrowser  status  start  stop  reset-profile  tabs  open  focus  close  profiles  create-profile  delete-profile  screenshot  snapshot  navigate  resize  click  type  press  hover  drag  select  upload  fill  dialog  wait  evaluate  console  pdfhooks  list  info  check  enable  disable  install  updatewebhooks  gmail setup|runproxy  start  run  coverage  sessions  query  blob  purgepairing  list  approveqrclawbot  qrdocsdns  setuptuichat (alias: tui --local)terminal (alias: tui --local)

插件可以添加额外的顶级命令,例如 openclaw workboardopenclaw voicecall

聊天斜杠命令

聊天消息支持 /... 命令。请参阅斜杠命令

重点:

  • /status — 快速诊断。
  • /trace — 会话范围的插件跟踪/调试行。
  • /config — 持久化的配置更改。
  • /debug — 仅运行时的配置覆盖(内存中,不写入磁盘;需要 commands.debug: true)。

用量跟踪

当 OAuth/API 凭证可用时,openclaw status --usage 和 Control UI 会展示提供商用量/配额。数据直接来自提供商用量端点,并规范化为 X% left。具有当前用量窗口的提供商:Anthropic、GitHub Copilot、Gemini CLI、OpenAI Codex、MiniMax、Xiaomi 和 z.ai。

请参阅用量跟踪了解详情。

相关

Was this useful?
On this page

On this page