CLI-Automatisierung
Nutze --non-interactive, um openclaw onboard zu automatisieren.
Hinweis:
--jsonbedeutet nicht automatisch Non-Interactive-Modus. Verwende--non-interactive(und--workspace) fur Skripte.
Non-Interactive-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
Fuege --json fur eine maschinenlesbare Zusammenfassung hinzu.
Nutze --secret-input-mode ref, um Env-basierte Refs in Auth-Profilen statt Klartext-Werte zu speichern.
In der interaktiven Auswahl stehen Env-Refs und konfigurierte Provider-Refs (file oder exec) zur Verfugung.
Im Non-Interactive ref-Modus mussen Provider-Umgebungsvariablen in der Prozessumgebung gesetzt sein.
Inline-Key-Flags ohne die passende Env-Variable scheitern jetzt sofort.
Beispiel:
openclaw onboard --non-interactive \
--mode local \
--auth-choice openai-api-key \
--secret-input-mode ref \
--accept-risk
Provider-spezifische Beispiele
Gemini-Beispiel
```bash
openclaw onboard --non-interactive \
--mode local \
--auth-choice gemini-api-key \
--gemini-api-key "$GEMINI_API_KEY" \
--gateway-port 18789 \
--gateway-bind loopback
```
Z.AI-Beispiel
```bash
openclaw onboard --non-interactive \
--mode local \
--auth-choice zai-api-key \
--zai-api-key "$ZAI_API_KEY" \
--gateway-port 18789 \
--gateway-bind loopback
```
Vercel AI Gateway-Beispiel
```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
```
Cloudflare AI Gateway-Beispiel
```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
```
Moonshot-Beispiel
```bash
openclaw onboard --non-interactive \
--mode local \
--auth-choice moonshot-api-key \
--moonshot-api-key "$MOONSHOT_API_KEY" \
--gateway-port 18789 \
--gateway-bind loopback
```
Mistral-Beispiel
```bash
openclaw onboard --non-interactive \
--mode local \
--auth-choice mistral-api-key \
--mistral-api-key "$MISTRAL_API_KEY" \
--gateway-port 18789 \
--gateway-bind loopback
```
Synthetic-Beispiel
```bash
openclaw onboard --non-interactive \
--mode local \
--auth-choice synthetic-api-key \
--synthetic-api-key "$SYNTHETIC_API_KEY" \
--gateway-port 18789 \
--gateway-bind loopback
```
OpenCode-Beispiel
```bash
openclaw onboard --non-interactive \
--mode local \
--auth-choice opencode-zen \
--opencode-zen-api-key "$OPENCODE_API_KEY" \
--gateway-port 18789 \
--gateway-bind loopback
```
Fur den Go-Katalog: `--auth-choice opencode-go --opencode-go-api-key "$OPENCODE_API_KEY"`.
Ollama-Beispiel
```bash
openclaw onboard --non-interactive \
--mode local \
--auth-choice ollama \
--custom-model-id "qwen3.5:27b" \
--accept-risk \
--gateway-port 18789 \
--gateway-bind loopback
```
Custom-Provider-Beispiel
```bash
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. Wird es weggelassen, pruft das Onboarding `CUSTOM_API_KEY`.
Ref-Modus-Variante:
```bash
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" }`.
Weiteren Agent hinzufugen
Nutze openclaw agents add <name>, um einen separaten Agent mit eigenem Workspace,
Sessions und Auth-Profilen zu erstellen. Ohne --workspace startet der Wizard.
openclaw agents add work \
--workspace ~/.openclaw/workspace-work \
--model openai/gpt-5.2 \
--bind whatsapp:biz \
--non-interactive \
--json
Was gesetzt wird:
agents.list[].nameagents.list[].workspaceagents.list[].agentDir
Hinweise:
- Standard-Workspaces folgen dem Muster
~/.openclaw/workspace-<agentId>. - Fuege
bindingshinzu, um eingehende Nachrichten zu routen (der Wizard kann das ubernehmen). - Non-Interactive-Flags:
--model,--agent-dir,--bind,--non-interactive.
Verwandte Docs
- Onboarding-Hub: Onboarding-Wizard (CLI)
- Vollstandige Referenz: CLI-Onboarding-Referenz
- Befehlsreferenz:
openclaw onboard