openclaw onboard

完整的引导式初始化流程,覆盖模型认证、工作区、Gateway、渠道、技能和健康检查。

基本用法

openclaw onboard                          # 经典交互式流程
openclaw onboard --modern                 # Crestodian 对话式 onboarding 预览
openclaw onboard --flow quickstart        # 最少提示,自动生成 gateway token
openclaw onboard --flow manual            # 完整提示(端口、绑定、认证)
openclaw onboard --flow import            # 运行迁移 provider(如 Hermes)
openclaw onboard --skip-bootstrap         # 跳过工作区文件创建
openclaw onboard --mode remote --remote-url wss://gateway-host:18789

非交互式示例

自定义 API provider

openclaw onboard --non-interactive \
  --auth-choice custom-api-key \
  --custom-base-url "https://llm.example.com/v1" \
  --custom-model-id "foo-large" \
  --custom-api-key "$CUSTOM_API_KEY" \
  --secret-input-mode plaintext \
  --custom-compatibility openai \
  --custom-image-input

Ollama

openclaw onboard --non-interactive \
  --auth-choice ollama \
  --custom-base-url "http://ollama-host:11434" \
  --custom-model-id "qwen3.5:27b" \
  --accept-risk

使用 SecretRef(推荐)

openclaw onboard --non-interactive \
  --auth-choice openai-api-key \
  --secret-input-mode ref \
  --accept-risk

--secret-input-mode ref 写入 env-backed refs 而非明文 key。

Gateway token 配置

export OPENCLAW_GATEWAY_TOKEN="your-token"
openclaw onboard --non-interactive \
  --mode local \
  --auth-choice skip \
  --gateway-auth token \
  --gateway-token-ref-env OPENCLAW_GATEWAY_TOKEN \
  --accept-risk

关键行为说明

  • --flow import 仅在全新 OpenClaw 安装上运行;存在现有配置时需先重置
  • 本地 onboarding 写入 gateway.mode="local";缺少此字段视为配置损坏
  • 远程 onboarding 仅写入连接信息,不安装本地插件包
  • --skip-bootstrap 跳过创建 AGENTS.md、SOUL.md、TOOLS.md 等工作区文件
  • --json 不隐含非交互模式,脚本需显式传 --non-interactive

后续常用命令

openclaw channels add
openclaw configure
openclaw agents add <name>

相关链接