CLI 자동화
openclaw onboard를 자동화하려면 --non-interactive를 사용하세요.
--json은 비대화형 모드를 의미하지 않습니다. 스크립트에서는 --non-interactive(및 --workspace)를 사용하세요.
기본 비대화형 예제
openclaw onboard --non-interactive \
--mode local \
--auth-choice apiKey \
--anthropic-api-key "$ANTHROPIC_API_KEY" \
--secret-input-mode plaintext \
--gateway-port 18789 \
--gateway-bind loopback \
--install-daemon \
--daemon-runtime node \
--skip-skills
기계가 읽을 수 있는 요약을 원하면 --json을 추가하세요.
인증 프로필에 평문 값 대신 환경 변수 기반 참조를 저장하려면 --secret-input-mode ref를 사용하세요.
환경 변수 참조와 구성된 공급자 참조(file 또는 exec) 사이의 대화형 선택은 온보딩 흐름에서 사용할 수 있습니다.
비대화형 ref 모드에서는 공급자 환경 변수가 프로세스 환경에 설정되어 있어야 합니다.
이제 일치하는 환경 변수 없이 인라인 키 플래그를 전달하면 즉시 실패합니다.
예:
openclaw onboard --non-interactive \
--mode local \
--auth-choice openai-api-key \
--secret-input-mode ref \
--accept-risk
공급자별 예제
openclaw onboard --non-interactive \
--mode local \
--auth-choice apiKey \
--anthropic-api-key "$ANTHROPIC_API_KEY" \
--gateway-port 18789 \
--gateway-bind loopback
openclaw onboard --non-interactive \
--mode local \
--auth-choice gemini-api-key \
--gemini-api-key "$GEMINI_API_KEY" \
--gateway-port 18789 \
--gateway-bind loopback
openclaw onboard --non-interactive \
--mode local \
--auth-choice zai-api-key \
--zai-api-key "$ZAI_API_KEY" \
--gateway-port 18789 \
--gateway-bind loopback
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
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
openclaw onboard --non-interactive \
--mode local \
--auth-choice moonshot-api-key \
--moonshot-api-key "$MOONSHOT_API_KEY" \
--gateway-port 18789 \
--gateway-bind loopback
openclaw onboard --non-interactive \
--mode local \
--auth-choice mistral-api-key \
--mistral-api-key "$MISTRAL_API_KEY" \
--gateway-port 18789 \
--gateway-bind loopback
openclaw onboard --non-interactive \
--mode local \
--auth-choice synthetic-api-key \
--synthetic-api-key "$SYNTHETIC_API_KEY" \
--gateway-port 18789 \
--gateway-bind loopback
openclaw onboard --non-interactive \
--mode local \
--auth-choice opencode-zen \
--opencode-zen-api-key "$OPENCODE_API_KEY" \
--gateway-port 18789 \
--gateway-bind loopback
Go 카탈로그를 사용하려면 --auth-choice opencode-go --opencode-go-api-key "$OPENCODE_API_KEY"로 바꾸세요.
openclaw onboard --non-interactive \
--mode local \
--auth-choice ollama \
--custom-model-id "qwen3.5:27b" \
--accept-risk \
--gateway-port 18789 \
--gateway-bind loopback
Anthropic setup-token은 여전히 지원되는 온보딩 토큰 경로로 제공되지만, OpenClaw는 이제 가능할 경우 Claude CLI 재사용을 더 선호합니다.
프로덕션에서는 Anthropic API 키를 권장합니다.
다른 에이전트 추가
별도의 작업공간, 세션, 인증 프로필을 갖는 별도 에이전트를 만들려면 openclaw agents add <name>을 사용하세요. --workspace 없이 실행하면 마법사가 시작됩니다.
openclaw agents add work \
--workspace ~/.openclaw/workspace-work \
--model openai/gpt-5.4 \
--bind whatsapp:biz \
--non-interactive \
--json
설정되는 항목:
agents.list[].name
agents.list[].workspace
agents.list[].agentDir
참고:
기본 작업공간은 ~/.openclaw/workspace-<agentId> 형식을 따릅니다.
수신 메시지를 라우팅하려면 bindings를 추가하세요(마법사에서도 가능).
비대화형 플래그: --model, --agent-dir, --bind, --non-interactive.
관련 문서