Skip to content

本页是 openclaw CLI 的完整命令参考,列出所有子命令、全局参数、命令树和输出样式规则。使用 --dev 隔离开发环境,--profile 管理多实例,--no-color 禁用颜色输出。命令按用途分组,通过 openclaw <command> 快速操作。

OpenClaw CLI 命令参考:所有子命令与全局参数速查

openclaw 是 OpenClaw 的 CLI 入口。每个核心命令都有独立的参考页,或在其所别名的命令页面文档中记录;本页列出所有命令、全局参数和跨 CLI 统一的输出样式规则。

按意图使用设置命令:

  • openclaw setup 在不走完整引导流程的情况下,创建基础配置和工作区。
  • openclaw onboard 是首次运行的完整引导路径,涵盖 gateway、模型认证、工作区、渠道、技能和健康检查。
  • openclaw configure 针对已有的配置修改指定部分,例如模型认证、gateway、渠道、插件或技能。
  • openclaw channels add 在基础配置完成后配置渠道账号;不加参数时启动引导式设置,加渠道特定参数时用于脚本化操作。

命令页面

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

全局参数

参数用途
--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 超链接在支持的终端中显示为可点击链接;否则回退到纯 URL。
  • --json(部分命令支持 --plain)禁用样式,输出纯净内容。
  • 长时间运行的命令显示进度指示(支持时使用 OSC 9;4)。

调色板权威来源:src/terminal/palette.ts

命令树

完整命令树

openclaw [--dev] [--profile <name>] <command>
  crestodian
  setup
  onboard
  configure
  config
    get
    set
    unset
    file
    schema
    validate
  completion
  doctor
  dashboard
  backup
    create
    verify
  security
    audit
  secrets
    reload
    audit
    configure
    apply
  reset
  uninstall
  update
    wizard
    status
  channels
    list
    status
    capabilities
    resolve
    logs
    add
    remove
    login
    logout
  directory
    self
    peers list
    groups list|members
  skills
    search
    install
    update
    list
    info
    check
  plugins
    list
    inspect
    install
    uninstall
    update
    enable
    disable
    doctor
    marketplace list
  memory
    status
    index
    search
  path
    resolve
    find
    set
    validate
    emit
  commitments
    list
    dismiss
  wiki
    status
    doctor
    init
    ingest
    compile
    lint
    search
    get
    apply
    bridge import
    unsafe-local import
    obsidian status|search|open|command|daily
  message
    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
    ban
  agent
  agents
    list
    add
    delete
    bindings
    bind
    unbind
    set-identity
  acp
  mcp
    serve
    list
    show
    set
    unset
  status
  health
  sessions
    cleanup
  tasks
    list
    audit
    maintenance
    show
    notify
    cancel
    flow list|show|cancel
  gateway
    call
    usage-cost
    health
    status
    probe
    discover
    install
    uninstall
    start
    stop
    restart
    run
  daemon
    status
    install
    uninstall
    start
    stop
    restart
  logs
  system
    event
    heartbeat last|enable|disable
    presence
  models
    list
    status
    set
    set-image
    aliases list|add|remove
    fallbacks list|add|remove|clear
    image-fallbacks list|add|remove|clear
    scan
  infer (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|clear
  sandbox
    list
    recreate
    explain
  cron
    status
    list
    get
    add
    edit
    rm
    enable
    disable
    runs
    run
  nodes
    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 get
  devices
    list
    remove
    clear
    approve
    reject
    rotate
    revoke
  node
    run
    status
    install
    uninstall
    stop
    restart
  approvals
    get
    set
    allowlist add|remove
  exec-policy
    show
    preset
    set
  browser
    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
    pdf
  hooks
    list
    info
    check
    enable
    disable
    install
    update
  webhooks
    gmail setup|run
  proxy
    start
    run
    coverage
    sessions
    query
    blob
    purge
  pairing
    list
    approve
  qr
  clawbot
    qr
  docs
  dns
    setup
  tui
  chat (alias: tui --local)
  terminal (alias: tui --local)

插件可添加额外的顶级命令(例如 openclaw voicecall)。

聊天斜杠命令

聊天消息支持 /... 命令。详见 slash 命令

要点:

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

用量追踪

openclaw status --usage 以及在 Control UI 中,当提供 OAuth/API 凭证时会显示服务商用量/配额。数据直接来自服务商用量的端点,并归一化为 X% left。当前支持用量统计窗口的服务商:Anthropic、GitHub Copilot、Gemini CLI、OpenAI Codex、MiniMax、Xiaomi、z.ai。

详见 用量追踪

相关文档

常见问题

怎么快速找到某个 openclaw 命令的详细参数?

所有核心命令都有独立参考页。在命令树上找到命令名,点击对应的链接即可跳到该命令的详细用法页面。例如 openclaw gateway 的完整参数和子命令请参见 gateway

如何确认 gateway 是否正常运行?

运行 openclaw status 可查看 Gateway 状态、最近会话和渠道健康。更深入的健康检查使用 openclaw health,它会从正在运行的 gateway 进程获取实时状态。

--dev--profile 分别用于什么场景?

--dev 将配置和数据隔离在 ~/.openclaw-dev 并使用开发端口,适合本地开发测试。--profile &lt;name&gt; 允许你自定义隔离目录(~/.openclaw-&lt;name&gt;),适合管理多个独立实例,比如个人环境和工作环境。二者不能同时使用。