CLI Automation
--non-interactive를 사용하면 openclaw onboard를 자동화할 수 있습니다.
--json만으로는 non-interactive mode가 되지 않습니다. 스크립트에서는 --non-interactive(그리고 필요하면 --workspace)를 함께 사용하세요.기본 non-interactive 예제
--json을 추가하세요.
--secret-input-mode ref를 사용하면 plaintext 값 대신 env-backed ref를 auth profile에 저장할 수 있습니다.
env ref와 미리 구성된 provider ref(file 또는 exec) 중 선택하는 interactive 흐름은 onboarding wizard에서 지원됩니다.
non-interactive ref mode에서는 provider env var가 process environment에 설정되어 있어야 합니다.
대응 env var 없이 inline key flag를 넘기면 onboarding이 즉시 실패합니다.
예시:
Provider별 예제
Gemini example
Gemini example
Z.AI example
Z.AI example
Vercel AI Gateway example
Vercel AI Gateway example
Cloudflare AI Gateway example
Cloudflare AI Gateway example
Moonshot example
Moonshot example
Mistral example
Mistral example
Synthetic example
Synthetic example
OpenCode example
OpenCode example
--auth-choice opencode-go --opencode-go-api-key "$OPENCODE_API_KEY"로 바꾸세요.Custom provider example
Custom provider example
--custom-api-key는 선택 사항입니다. 생략하면 onboarding이 CUSTOM_API_KEY를 확인합니다.ref mode variant:apiKey를 { source: "env", provider: "default", id: "CUSTOM_API_KEY" }로 저장합니다.다른 agent 추가
openclaw agents add <name>을 사용하면 별도의 workspace, sessions, auth profile을 가진 agent를 만들 수 있습니다.
--workspace 없이 실행하면 마법사가 열립니다.
agents.list[].nameagents.list[].workspaceagents.list[].agentDir
- 기본 workspace는
~/.openclaw/workspace-<agentId>형식을 따릅니다. - inbound message를 라우팅하려면
bindings를 추가하세요. 마법사에서도 설정할 수 있습니다. - non-interactive flag:
--model,--agent-dir,--bind,--non-interactive
관련 문서
- Onboarding hub: Onboarding Wizard (CLI)
- Full reference: CLI Onboarding Reference
- Command reference:
openclaw onboard