reference/wizard.md¶
นี่คือเอกสารอ้างอิงฉบับสมบูรณ์สำหรับวิซาร์ด CLI openclaw onboard
สำหรับภาพรวมระดับสูง โปรดดู Onboarding Wizard
44. สำหรับภาพรวมระดับสูง ดู Onboarding Wizard
รายละเอียดโฟลว์(โหมดภายในเครื่อง)¶
- หากมี `~/.openclaw/openclaw.json` อยู่ ให้เลือก **เก็บไว้ / แก้ไข / รีเซ็ต**
- การรันวิซาร์ดซ้ำจะ **ไม่** ลบสิ่งใด เว้นแต่คุณจะเลือก **รีเซ็ต** อย่างชัดเจน
(หรือส่ง `--reset`)
- หากคอนฟิกไม่ถูกต้องหรือมีคีย์แบบเดิม วิซาร์ดจะหยุดและขอให้คุณรัน
`openclaw doctor` ก่อนดำเนินการต่อ
- การรีเซ็ตใช้ `trash` (ไม่ใช้ `rm` เด็ดขาด) และมีขอบเขตให้เลือก:
- คอนฟิกเท่านั้น
- คอนฟิก + ข้อมูลรับรอง + เซสชัน
- รีเซ็ตทั้งหมด(รวมถึงลบเวิร์กสเปซ)
45. - การรันวิซาร์ดซ้ำจะ **ไม่** ลบสิ่งใด เว้นแต่คุณจะเลือก **Reset** อย่างชัดเจน
(หรือส่ง `--reset`)
46. - หากการตั้งค่าไม่ถูกต้องหรือมีคีย์แบบเดิม วิซาร์ดจะหยุดและขอให้คุณรัน
`openclaw doctor` ก่อนดำเนินการต่อ
47. - Reset ใช้ `trash` (ไม่ใช้ `rm` เด็ดขาด) และมีขอบเขตให้เลือก:
- เฉพาะ config
- Config + credentials + sessions
- รีเซ็ตทั้งหมด (รวมถึงลบ workspace)
ANTHROPIC_API_KEY หากมีอยู่ หรือจะขอให้ป้อนคีย์ จากนั้นบันทึกไว้สำหรับการใช้งานของดีมอน
49. - Anthropic OAuth (Claude Code CLI): บน macOS วิซาร์ดจะตรวจสอบรายการ Keychain "Claude Code-credentials" (เลือก "Always Allow" เพื่อไม่ให้การเริ่มต้นด้วย launchd ถูกบล็อก); บน Linux/Windows จะนำ ~/.claude/.credentials.json มาใช้ซ้ำหากมีอยู่
50. - Anthropic token (วาง setup-token): รัน claude setup-token บนเครื่องใดก็ได้ จากนั้นวางโทเคน (คุณสามารถตั้งชื่อได้; เว้นว่าง = ค่าเริ่มต้น)
- OpenAI Code (Codex) subscription (Codex CLI): if ~/.codex/auth.json exists, the wizard can reuse it.
- OpenAI Code (Codex) subscription (OAuth): browser flow; paste the code#state.
- Sets agents.defaults.model to openai-codex/gpt-5.2 when model is unset or openai/*.
- OpenAI API key: uses OPENAI_API_KEY if present or prompts for a key, then saves it to ~/.openclaw/.env so launchd can read it.
- xAI (Grok) API key: prompts for XAI_API_KEY and configures xAI as a model provider.
- OpenCode Zen (multi-model proxy): prompts for OPENCODE_API_KEY (or OPENCODE_ZEN_API_KEY, get it at https://opencode.ai/auth).
- API key: stores the key for you.
- Vercel AI Gateway (multi-model proxy): prompts for AI_GATEWAY_API_KEY.
- More detail: Vercel AI Gateway
- Cloudflare AI Gateway: prompts for Account ID, Gateway ID, and CLOUDFLARE_AI_GATEWAY_API_KEY.
- More detail: Cloudflare AI Gateway
- MiniMax M2.1: config is auto-written.
- More detail: MiniMax
- Synthetic (Anthropic-compatible): prompts for SYNTHETIC_API_KEY.
- More detail: Synthetic
- Moonshot (Kimi K2): config is auto-written.
- Kimi Coding: config is auto-written.
- More detail: Moonshot AI (Kimi + Kimi Coding)
- Skip: no auth configured yet.
- Pick a default model from detected options (or enter provider/model manually).
- Wizard runs a model check and warns if the configured model is unknown or missing auth.
- OAuth credentials live in ~/.openclaw/credentials/oauth.json; auth profiles live in ~/.openclaw/agents/<agentId>/agent/auth-profiles.json(API keys + OAuth)
- รายละเอียดเพิ่มเติม: /concepts/oauth
- รายละเอียดเพิ่มเติม: [/concepts/oauth](/concepts/oauth)
~/.openclaw/credentials/oauth.json (หรือ $OPENCLAW_STATE_DIR/credentials/oauth.json) ไปยัง
โฮสต์Gateway
~/.openclaw/workspace (configurable).
- Seeds the workspace files needed for the agent bootstrap ritual.
- ค่าเริ่มต้น `~/.openclaw/workspace`(ปรับได้)
- เตรียมไฟล์เวิร์กสเปซที่จำเป็นสำหรับพิธีบูตสแตรปเอเจนต์
- โครงสร้างเวิร์กสเปซเต็มรูปแบบ + คู่มือสำรองข้อมูล: [Agent workspace](/concepts/agent-workspace)
- พอร์ต การ bind โหมดการยืนยันตัวตน การเปิดให้เข้าถึงผ่าน Tailscale
- คำแนะนำด้านการยืนยันตัวตน: ควรใช้ **Token** แม้กับ loopback เพื่อให้ไคลเอนต์ WS ภายในเครื่องต้องยืนยันตัวตน
- ปิดการยืนยันตัวตนเฉพาะเมื่อคุณเชื่อถือทุกโปรเซสภายในเครื่องอย่างสมบูรณ์
- การ bind ที่ไม่ใช่ loopback ยังต้องมีการยืนยันตัวตน
- Disable auth only if you fully trust every local process.
- Non‑loopback binds still require auth.
signal-cli install + account config.
- BlueBubbles: recommended for iMessage; server URL + password + webhook.
- iMessage: legacy imsg CLI path + DB access.
- DM security: default is pairing. First DM sends a code; approve via openclaw pairing approve <channel><code> หรือใช้รายการอนุญาต
or use allowlists.
<code> หรือใช้รายการอนุญาต
loginctl enable-linger <user> เพื่อให้ Gateway ทำงานต่อหลังออกจากระบบ
- อาจขอ sudo(เขียน /var/lib/systemd/linger); จะพยายามโดยไม่ใช้ sudo ก่อน
- การเลือกรันไทม์: Node(แนะนำ; จำเป็นสำหรับ WhatsApp/Telegram) ไม่แนะนำ Bun
openclaw health
- เคล็ดลับ: openclaw status --deep จะเพิ่มการตรวจสุขภาพ Gateway ในเอาต์พุตสถานะ(ต้องเข้าถึง Gateway ได้)
- Linux (and Windows via WSL2): systemd user unit
- Wizard attempts to enable lingering via `loginctl enable-linger <user>` so the Gateway stays up after logout.
- May prompt for sudo (writes `/var/lib/systemd/linger`); it tries without sudo first.
- **Runtime selection:** Node (recommended; required for WhatsApp/Telegram). Bun is **not recommended**.
openclaw health.
- Tip: openclaw status --deep adds gateway health probes to status output (requires a reachable gateway).
หากไม่ตรวจพบ GUI วิซาร์ดจะแสดงคำแนะนำการทำ SSH port-forward สำหรับ Control UI แทนการเปิดเบราว์เซอร์
หากไม่มีไฟล์ assets ของ Control UI วิซาร์ดจะพยายามสร้างขึ้นใหม่; ทางเลือกสำรองคือ pnpm ui:build(ติดตั้งไลบรารี UI อัตโนมัติ)
If the Control UI assets are missing, the wizard attempts to build them; fallback is pnpm ui:build (auto-installs UI deps).
โหมดไม่โต้ตอบ¶
ใช้ --non-interactive เพื่อทำให้การเริ่มต้นใช้งานเป็นอัตโนมัติหรือเขียนสคริปต์:
openclaw onboard --non-interactive \
--mode local \
--auth-choice apiKey \
--anthropic-api-key "$ANTHROPIC_API_KEY" \
--gateway-port 18789 \
--gateway-bind loopback \
--install-daemon \
--daemon-runtime node \
--skip-skills
เพิ่ม --json เพื่อรับสรุปแบบเครื่องอ่านได้
--json ไม่ได้ หมายถึงโหมดไม่โต้ตอบ ใช้ --non-interactive(และ --workspace) สำหรับสคริปต์
Use --non-interactive (and --workspace) for scripts.
bash
openclaw onboard --non-interactive \
--mode local \
--auth-choice gemini-api-key \
--gemini-api-key "$GEMINI_API_KEY" \
--gateway-port 18789 \
--gateway-bind loopback
bash
openclaw onboard --non-interactive \
--mode local \
--auth-choice zai-api-key \
--zai-api-key "$ZAI_API_KEY" \
--gateway-port 18789 \
--gateway-bind loopback
bash
openclaw onboard --non-interactive \
--mode local \
--auth-choice ai-gateway-api-key \
--ai-gateway-api-key "$AI_GATEWAY_API_KEY" \
--gateway-port 18789 \
--gateway-bind loopback
bash
openclaw onboard --non-interactive \
--mode local \
--auth-choice cloudflare-ai-gateway-api-key \
--cloudflare-ai-gateway-account-id "your-account-id" \
--cloudflare-ai-gateway-gateway-id "your-gateway-id" \
--cloudflare-ai-gateway-api-key "$CLOUDFLARE_AI_GATEWAY_API_KEY" \
--gateway-port 18789 \
--gateway-bind loopback
bash
openclaw onboard --non-interactive \
--mode local \
--auth-choice moonshot-api-key \
--moonshot-api-key "$MOONSHOT_API_KEY" \
--gateway-port 18789 \
--gateway-bind loopback
bash
openclaw onboard --non-interactive \
--mode local \
--auth-choice synthetic-api-key \
--synthetic-api-key "$SYNTHETIC_API_KEY" \
--gateway-port 18789 \
--gateway-bind loopback
bash
openclaw onboard --non-interactive \
--mode local \
--auth-choice opencode-zen \
--opencode-zen-api-key "$OPENCODE_API_KEY" \
--gateway-port 18789 \
--gateway-bind loopback
เพิ่มเอเจนต์(ไม่โต้ตอบ)¶
openclaw agents add work \
--workspace ~/.openclaw/workspace-work \
--model openai/gpt-5.2 \
--bind whatsapp:biz \
--non-interactive \
--json
Gateway wizard RPC¶
The Gateway exposes the wizard flow over RPC (wizard.start, wizard.next, wizard.cancel, wizard.status).
Gateway เปิดเผยโฟลว์ของวิซาร์ดผ่าน RPC(wizard.start, wizard.next, wizard.cancel, wizard.status)
ไคลเอนต์(แอป macOS, Control UI)สามารถเรนเดอร์ขั้นตอนได้โดยไม่ต้องนำตรรกะการเริ่มต้นใช้งานไปทำใหม่
การตั้งค่า Signal(signal-cli)¶
วิซาร์ดสามารถติดตั้ง signal-cli จาก GitHub releases:
- ดาวน์โหลดไฟล์ release ที่เหมาะสม
- จัดเก็บไว้ที่
~/.openclaw/tools/signal-cli/<version>/ - เขียน
channels.signal.cliPathลงในคอนฟิกของคุณ
หมายเหตุ:
- บิลด์ JVM ต้องใช้ Java 21
- ใช้บิลด์แบบ Native เมื่อมีให้ใช้
- Windows ใช้ WSL2; การติดตั้ง signal-cli จะเป็นไปตามโฟลว์ Linux ภายใน WSL
สิ่งที่วิซาร์ดเขียนลงไป¶
ฟิลด์ทั่วไปใน ~/.openclaw/openclaw.json:
agents.defaults.workspaceagents.defaults.model/models.providers(หากเลือก Minimax)gateway.*(โหมด bind การยืนยันตัวตน tailscale)channels.telegram.botToken,channels.discord.token,channels.signal.*,channels.imessage.*- รายการอนุญาตของช่องทาง(Slack/Discord/Matrix/Microsoft Teams)เมื่อคุณเลือกเข้าระหว่างพรอมป์ต์(ชื่อจะถูกแปลงเป็น ID เมื่อเป็นไปได้)
skills.install.nodeManagerwizard.lastRunAtwizard.lastRunVersionwizard.lastRunCommitwizard.lastRunCommandwizard.lastRunMode
openclaw agents add จะเขียน agents.list[] และ bindings(ไม่บังคับ)
ข้อมูลรับรอง WhatsApp จะอยู่ภายใต้ ~/.openclaw/credentials/whatsapp/<accountId>/
เซสชันจะถูกจัดเก็บภายใต้ ~/.openclaw/agents/<agentId>/sessions/
Sessions are stored under ~/.openclaw/agents/<agentId>/sessions/.
Some channels are delivered as plugins. บางช่องทางถูกจัดส่งในรูปแบบปลั๊กอิน เมื่อคุณเลือกช่องทางหนึ่งระหว่างการเริ่มต้นใช้งาน วิซาร์ด จะขอให้ติดตั้งก่อน(npm หรือพาธภายในเครื่อง)จึงจะสามารถตั้งค่าได้
เอกสารที่เกี่ยวข้อง¶
- ภาพรวมวิซาร์ด: Onboarding Wizard
- การเริ่มต้นใช้งานแอป macOS: Onboarding
- เอกสารอ้างอิงคอนฟิก: Gateway configuration
- ผู้ให้บริการ: WhatsApp, Telegram, Discord, Google Chat, Signal, BlueBubbles(iMessage), iMessage(แบบเดิม)
- ทักษะ: ทักษะ, การตั้งค่าทักษะ