CLI-Automatisierung
Verwenden Sie --non-interactive, um openclaw onboard zu automatisieren.
--json impliziert keinen nicht interaktiven Modus. Verwenden Sie für Skripte --non-interactive (und --workspace).
Nicht interaktives Basisbeispiel
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
Fügen Sie --json für eine maschinenlesbare Zusammenfassung hinzu.
Verwenden Sie --secret-input-mode ref, um env-gestützte Refs in Auth-Profilen statt Klartextwerten zu speichern.
Die interaktive Auswahl zwischen env-Refs und konfigurierten Provider-Refs (file oder exec) ist im Onboarding-Ablauf verfügbar.
Im nicht interaktiven ref-Modus müssen Provider-Umgebungsvariablen in der Prozessumgebung gesetzt sein.
Das Übergeben von Inline-Key-Flags ohne die passende Umgebungsvariable schlägt jetzt sofort fehl.
Beispiel:
openclaw onboard --non-interactive \
--mode local \
--auth-choice openai-api-key \
--secret-input-mode ref \
--accept-risk
Providerspezifische Beispiele
Beispiel für Anthropic-API-Schlüssel
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
Beispiel für Vercel AI Gateway
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
Beispiel für Cloudflare AI Gateway
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
Wechseln Sie zu --auth-choice opencode-go --opencode-go-api-key "$OPENCODE_API_KEY" für den Go-Katalog.
openclaw onboard --non-interactive \
--mode local \
--auth-choice ollama \
--custom-model-id "qwen3.5:27b" \
--accept-risk \
--gateway-port 18789 \
--gateway-bind loopback
Beispiel für benutzerdefinierten Provider
openclaw onboard --non-interactive \
--mode local \
--auth-choice custom-api-key \
--custom-base-url "https://llm.example.com/v1" \
--custom-model-id "foo-large" \
--custom-api-key "$CUSTOM_API_KEY" \
--custom-provider-id "my-custom" \
--custom-compatibility anthropic \
--gateway-port 18789 \
--gateway-bind loopback
--custom-api-key ist optional. Wenn es weggelassen wird, prüft das Onboarding CUSTOM_API_KEY.Variante im Ref-Modus: export CUSTOM_API_KEY = "your-key"
openclaw onboard --non-interactive \
--mode local \
--auth-choice custom-api-key \
--custom-base-url "https://llm.example.com/v1" \
--custom-model-id "foo-large" \
--secret-input-mode ref \
--custom-provider-id "my-custom" \
--custom-compatibility anthropic \
--gateway-port 18789 \
--gateway-bind loopback
In diesem Modus speichert das Onboarding apiKey als { source: "env", provider: "default", id: "CUSTOM_API_KEY" }.
Anthropic-Setup-Token bleibt als unterstützter Onboarding-Token-Pfad verfügbar, aber OpenClaw bevorzugt jetzt die Wiederverwendung der Claude CLI, wenn verfügbar.
Für den Produktionseinsatz ist ein Anthropic-API-Schlüssel zu bevorzugen.
Weiteren Agenten hinzufügen
Verwenden Sie openclaw agents add <name>, um einen separaten Agenten mit eigenem Workspace,
Sitzungen und Auth-Profilen zu erstellen. Wenn Sie ohne --workspace ausführen, wird der Wizard gestartet.
openclaw agents add work \
--workspace ~/.openclaw/workspace-work \
--model openai/gpt-5.4 \
--bind whatsapp:biz \
--non-interactive \
--json
Was festgelegt wird:
agents.list[].name
agents.list[].workspace
agents.list[].agentDir
Hinweise:
Standard-Workspaces folgen ~/.openclaw/workspace-<agentId>.
Fügen Sie bindings hinzu, um eingehende Nachrichten zu routen (der Wizard kann dies erledigen).
Nicht interaktive Flags: --model, --agent-dir, --bind, --non-interactive.
Verwandte Dokumente