CLI Automation
Gebruik --non-interactive om openclaw onboard te automatiseren.
Opmerking:
--jsonimpliceert geen niet-interactieve modus. Gebruik--non-interactive(en--workspace) voor scripts.
Basis niet-interactief voorbeeld
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
Voeg --json toe voor een machineleesbare samenvatting.
Gebruik --secret-input-mode ref om env-backed refs op te slaan in auth-profielen in plaats van plaintext-waarden.
Interactieve selectie tussen env refs en geconfigureerde provider refs (file of exec) is beschikbaar in de onboarding-wizardflow.
In niet-interactieve ref-modus moeten provider env vars zijn ingesteld in de procesomgeving.
Inline key-flags meegeven zonder de bijbehorende env var faalt nu direct.
Voorbeeld:
openclaw onboard --non-interactive \
--mode local \
--auth-choice openai-api-key \
--secret-input-mode ref \
--accept-risk
Providerspecifieke voorbeelden
Gemini-voorbeeld
```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-voorbeeld
```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-voorbeeld
```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-voorbeeld
```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-voorbeeld
```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-voorbeeld
```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-voorbeeld
```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-voorbeeld
```bash
openclaw onboard --non-interactive \
--mode local \
--auth-choice opencode-zen \
--opencode-zen-api-key "$OPENCODE_API_KEY" \
--gateway-port 18789 \
--gateway-bind loopback
```
Wissel naar `--auth-choice opencode-go --opencode-go-api-key "$OPENCODE_API_KEY"` voor de Go-catalogus.
Ollama-voorbeeld
```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-voorbeeld
```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` is optioneel. Indien weggelaten, controleert onboarding `CUSTOM_API_KEY`.
Ref-modus variant:
```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 deze modus slaat onboarding `apiKey` op als `{ source: "env", provider: "default", id: "CUSTOM_API_KEY" }`.
Nog een agent toevoegen
Gebruik openclaw agents add <name> om een aparte agent aan te maken met eigen workspace, sessions en auth-profielen. Zonder --workspace draaien start de wizard.
openclaw agents add work \
--workspace ~/.openclaw/workspace-work \
--model openai/gpt-5.2 \
--bind whatsapp:biz \
--non-interactive \
--json
Wat het instelt:
agents.list[].nameagents.list[].workspaceagents.list[].agentDir
Opmerkingen:
- Standaard workspaces volgen
~/.openclaw/workspace-<agentId>. - Voeg
bindingstoe om inkomende berichten te routeren (de wizard kan dit doen). - Niet-interactieve flags:
--model,--agent-dir,--bind,--non-interactive.
Gerelateerde docs
- Onboarding-hub: Onboarding Wizard (CLI)
- Volledige referentie: CLI Onboarding-referentie
- Commandoreferentie:
openclaw onboard