### LiteLLM Proxy Setup Source: https://openclawlab.com/en/docs/providers/litellm Instructions for installing LiteLLM and starting the proxy server. ```APIDOC ## Install LiteLLM Proxy ```bash pip install 'litellm[proxy]' ``` ## Start LiteLLM Proxy ```bash litellm --model claude-opus-4-6 ``` This command starts the LiteLLM proxy, making it available for OpenClaw to connect to. ``` -------------------------------- ### OpenClaw CLI Commands for Setup Source: https://openclawlab.com/en/docs/start/openclaw These commands are used to initiate the OpenClaw setup process, including logging in to channels and starting the gateway. Ensure OpenClaw is installed and onboarded before running these. ```bash openclaw channels login ``` ```bash openclaw gateway --port 18789 ``` ```bash openclaw setup ``` ```bash openclaw dashboard ``` -------------------------------- ### Nix Quick Start Prompt Source: https://openclawlab.com/en/docs/install/nix A prompt to guide an AI agent in setting up nix-openclaw on a Mac, including dependency checks, flake creation, bot setup, secret management, and verification steps. ```plaintext I want to set up nix-openclaw on my Mac. Repository: github:openclaw/nix-openclaw What I need you to do: 1. Check if Determinate Nix is installed (if not, install it) 2. Create a local flake at ~/code/openclaw-local using templates/agent-first/flake.nix 3. Help me create a Telegram bot (@BotFather) and get my chat ID (@userinfobot) 4. Set up secrets (bot token, Anthropic key) - plain files at ~/.secrets/ is fine 5. Fill in the template placeholders and run home-manager switch 6. Verify: launchd running, bot responds to messages Reference the nix-openclaw README for module options. ``` -------------------------------- ### Bootstrap OpenClaw Setup Source: https://openclawlab.com/en/docs/start/setup Initializes the OpenClaw environment. This command can be run globally or from within the project repository. It ensures the necessary configurations and workspaces are set up. ```bash openclaw setup ``` -------------------------------- ### Run Docker Setup Script for OpenClaw Source: https://openclawlab.com/en/docs/install/docker Executes the primary Docker setup script to build the gateway image, run the onboarding wizard, and start the gateway via Docker Compose. This is the recommended quick start for a containerized OpenClaw environment. It generates a gateway token and writes it to the .env file. ```bash ./docker-setup.sh ``` -------------------------------- ### Nostr Channel Quick Setup Source: https://openclawlab.com/en/docs/channels/nostr A step-by-step guide to quickly set up the Nostr channel, including key generation, configuration, and Gateway restart. ```APIDOC ## Quick Setup 1. **Generate a Nostr Keypair (if needed):** ```bash # Using nak nak key generate ``` 2. **Add to OpenClaw Configuration:** ```json { "channels": { "nostr": { "privateKey": "${NOSTR_PRIVATE_KEY}" } } } ``` 3. **Export the Private Key:** ```bash export NOSTR_PRIVATE_KEY="nsec1..." ``` 4. **Restart the Gateway.** ``` -------------------------------- ### Openclaw Onboarding with OpenCode Zen Source: https://openclawlab.com/en/docs/reference/wizard Example of non-interactive onboarding using OpenCode Zen. This configuration sets up the gateway with the necessary API key and network parameters. ```bash openclaw onboard --non-interactive \ --mode local \ --auth-choice opencode-zen \ --opencode-zen-api-key "$OPENCODE_API_KEY" \ --gateway-port 18789 \ --gateway-bind loopback ``` -------------------------------- ### Start OpenClaw Gateway in Watch Mode Source: https://openclawlab.com/en/docs/start/setup Installs project dependencies and starts the OpenClaw Gateway in watch mode using pnpm. This enables hot reloading for TypeScript changes, ideal for the bleeding-edge workflow. ```bash pnpm install pnpm gateway:watch ``` -------------------------------- ### Basic 'openclaw onboard' Commands Source: https://openclawlab.com/en/docs/cli/onboard These commands initiate the interactive onboarding wizard. You can specify different flows like 'quickstart' or 'manual', or set up a remote gateway by providing its WebSocket URL. ```bash openclaw onboard openclaw onboard --flow quickstart openclaw onboard --flow manual openclaw onboard --mode remote --remote-url ws://gateway-host:18789 ``` -------------------------------- ### Openclaw Onboarding with Vercel AI Gateway API Key Source: https://openclawlab.com/en/docs/reference/wizard Example for non-interactive onboarding with Vercel AI Gateway API key. It sets up the gateway with the specified authentication and network configurations. ```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 ``` -------------------------------- ### Openclaw Onboarding with Gemini API Key Source: https://openclawlab.com/en/docs/reference/wizard Example of non-interactive onboarding using a Gemini API key. This configuration sets up the gateway with specific authentication and network parameters. ```bash openclaw onboard --non-interactive \ --mode local \ --auth-choice gemini-api-key \ --gemini-api-key "$GEMINI_API_KEY" \ --gateway-port 18789 \ --gateway-bind loopback ``` -------------------------------- ### Check OpenClaw Health Status Source: https://openclawlab.com/en/docs/start/setup Verifies the operational status of the OpenClaw Gateway and its connected components. This is a crucial step for sanity checking the setup and diagnosing potential issues. ```bash openclaw health ``` -------------------------------- ### Setup Anthropic Token for Models Source: https://openclawlab.com/en/docs/cli This snippet demonstrates how to set up authentication for the Anthropic provider using a setup token. It first shows the general setup command and then the specific command for the Anthropic provider, followed by a command to check the models' status. ```bash claude setup-token openclaw models auth setup-token --provider anthropic openclaw models status ``` -------------------------------- ### CLI Setup for OpenCode Zen Onboarding Source: https://openclawlab.com/en/docs/providers/opencode These commands demonstrate how to onboard the OpenCode Zen model provider using the Openclaw CLI. It includes both interactive and non-interactive methods for setting up the API key. ```bash openclaw onboard --auth-choice opencode-zen # or non-interactive openclaw onboard --opencode-zen-api-key "$OPENCODE_API_KEY" ``` -------------------------------- ### Comprehensive OpenClaw Assistant Configuration Source: https://openclawlab.com/en/docs/start/openclaw An example of a detailed OpenClaw configuration file tailored for an 'assistant' setup. It includes settings for logging, agent model, workspace, thinking defaults, timeouts, heartbeats, WhatsApp channel restrictions, routing, and session management. ```json { "logging": { "level": "info" }, "agent": { "model": "anthropic/claude-opus-4-6", "workspace": "~/.openclaw/workspace", "thinkingDefault": "high", "timeoutSeconds": 1800, "heartbeat": { "every": "0m" }, }, "channels": { "whatsapp": { "allowFrom": ["+15555550123"], "groups": { "*": { "requireMention": true }, }, }, }, "routing": { "groupChat": { "mentionPatterns": ["@openclaw", "openclaw"], }, }, "session": { "scope": "per-sender", "resetTriggers": ["/new", "/reset"], "reset": { "mode": "daily", "atHour": 4, "idleMinutes": 10080, }, }, } ``` -------------------------------- ### Signal-cli Installation Script Source: https://openclawlab.com/en/docs/reference/wizard This section describes the process of installing `signal-cli` using the wizard, which involves downloading release assets, storing them in a specific directory, and updating the configuration. It notes JVM requirements and native build usage. ```bash # The wizard downloads the appropriate release asset for signal-cli. # It stores the executable under ~/.openclaw/tools/signal-cli//. # Finally, it updates the config with channels.signal.cliPath. ``` -------------------------------- ### Restart macOS App from Source Source: https://openclawlab.com/en/docs/start/setup A shell script to restart the macOS application from its source code. This is part of the bleeding-edge workflow, allowing the macOS app to run with the latest changes. ```bash ./scripts/restart-mac.sh ``` -------------------------------- ### Quick Setup for Synthetic Provider Source: https://openclawlab.com/en/docs/providers/synthetic This command initiates the onboarding process for the Synthetic provider, allowing you to authenticate using an API key. It's a prerequisite for using Synthetic models with OpenClaw. ```bash openclaw onboard --auth-choice synthetic-api-key ``` -------------------------------- ### Running Openclaw Container Manually (Single User) Source: https://openclawlab.com/en/docs/install/podman This example demonstrates how to manually run the Openclaw container for a single-user setup. It specifies user namespace options and mounts for configuration and workspace directories. ```bash podman run --userns=keep-id -v ~/.openclaw:/root/.openclaw -v :/etc/openclaw -v :/workspace openclaw ``` -------------------------------- ### Openclaw Onboarding with Synthetic API Key Source: https://openclawlab.com/en/docs/reference/wizard This command demonstrates non-interactive onboarding using a Synthetic API key, configuring the gateway with the specified authentication and network settings. ```bash openclaw onboard --non-interactive \ --mode local \ --auth-choice synthetic-api-key \ --synthetic-api-key "$SYNTHETIC_API_KEY" \ --gateway-port 18789 \ --gateway-bind loopback ``` -------------------------------- ### Send Media Attachment (Text) Source: https://openclawlab.com/en/docs/start/openclaw This example demonstrates how an agent can send an outbound attachment by specifying 'MEDIA:' followed by a path or URL on its own line. OpenClaw will extract and send this as a media attachment. ```text Here’s the screenshot. MEDIA:https://example.com/screenshot.png ``` -------------------------------- ### Run OpenClaw Gateway from Local Repo Source: https://openclawlab.com/en/docs/start/setup Executes the OpenClaw Gateway directly from the local repository after building. This is useful for development and testing purposes, allowing specific port and verbosity configurations. ```bash node openclaw.mjs gateway --port 18789 --verbose ``` -------------------------------- ### Openclaw Onboarding with Moonshot API Key Source: https://openclawlab.com/en/docs/reference/wizard Example of non-interactive onboarding using a Moonshot API key. This configuration sets up the gateway with the required authentication and network parameters. ```bash openclaw onboard --non-interactive \ --mode local \ --auth-choice moonshot-api-key \ --moonshot-api-key "$MOONSHOT_API_KEY" \ --gateway-port 18789 \ --gateway-bind loopback ``` -------------------------------- ### Install Binaries in Dockerfile (Dockerfile) Source: https://openclawlab.com/en/docs/install/hetzner This Dockerfile snippet demonstrates how to install external binaries like gog, goplaces, and wacli into the Docker image at build time. It uses `curl` to download archives, `tar` to extract them into `/usr/local/bin`, and `chmod` to make them executable. This ensures binaries are available when the container starts. ```dockerfile FROM node:22-bookworm RUN apt-get update && apt-get install -y socat && rm -rf /var/lib/apt/lists/* # Example binary 1: Gmail CLI RUN curl -L https://github.com/steipete/gog/releases/latest/download/gog_Linux_x86_64.tar.gz \ | tar -xz -C /usr/local/bin && chmod +x /usr/local/bin/gog # Example binary 2: Google Places CLI RUN curl -L https://github.com/steipete/goplaces/releases/latest/download/goplaces_Linux_x86_64.tar.gz \ | tar -xz -C /usr/local/bin && chmod +x /usr/local/bin/goplaces # Example binary 3: WhatsApp CLI RUN curl -L https://github.com/steipete/wacli/releases/latest/download/wacli_Linux_x86_64.tar.gz \ | tar -xz -C /usr/local/bin && chmod +x /usr/local/bin/wacli # Add more binaries below using the same pattern WORKDIR /app COPY package.json pnpm-lock.yaml pnpm-workspace.yaml .npmrc ./ COPY ui/package.json ./ui/package.json COPY scripts ./scripts RUN corepack enable RUN pnpm install --frozen-lockfile COPY . . RUN pnpm build RUN pnpm ui:install RUN pnpm ui:build ENV NODE_ENV=production CMD ["node","dist/index.js"] ``` -------------------------------- ### Openclaw Lab Recommended Starter Configuration (JSON) Source: https://openclawlab.com/en/docs/gateway/configuration-examples A recommended starter configuration for Openclaw Lab, including identity settings, agent model, and more detailed channel configurations like requiring mentions in WhatsApp groups. This configuration expands on the minimum setup with additional customization options. ```json { "identity": { "name": "Clawd", "theme": "helpful assistant", "emoji": "🦞", }, "agent": { "workspace": "~/.openclaw/workspace", "model": { "primary": "anthropic/claude-sonnet-4-5" }, }, "channels": { "whatsapp": { "allowFrom": ["+15555550123"], "groups": { "*": { "requireMention": true } }, }, }, } ``` -------------------------------- ### OpenClaw Per-Hook Configuration Example (JSON) Source: https://openclawlab.com/en/docs/automation/hooks Demonstrates how to configure individual hooks with custom settings, such as enabling a hook and defining environment variables specific to that hook. This allows for fine-grained control over hook behavior. ```json { "hooks": { "internal": { "enabled": true, "entries": { "my-hook": { "enabled": true, "env": { "MY_CUSTOM_VAR": "value" } } } } } } ``` -------------------------------- ### Manual Docker Compose Flow for OpenClaw Source: https://openclawlab.com/en/docs/install/docker Provides the manual steps to build the OpenClaw Docker image, run the onboard command, and start the gateway using Docker Compose. This method is an alternative to the automated setup script. ```bash docker build -t openclaw:local -f Dockerfile . docker compose run --rm openclaw-cli onboard docker compose up -d openclaw-gateway ``` -------------------------------- ### Openclaw Onboarding with Z.AI API Key Source: https://openclawlab.com/en/docs/reference/wizard This command shows how to perform non-interactive onboarding using a Z.AI API key, configuring the gateway with the necessary authentication and network settings. ```bash openclaw onboard --non-interactive \ --mode local \ --auth-choice zai-api-key \ --zai-api-key "$ZAI_API_KEY" \ --gateway-port 18789 \ --gateway-bind loopback ``` -------------------------------- ### Enable Systemd Lingering for User Service Source: https://openclawlab.com/en/docs/start/setup Enables the systemd linger option for the current user. This prevents user services, like the OpenClaw Gateway, from being stopped on logout or idle, ensuring continuous operation on Linux. ```bash sudo loginctl enable-linger $USER ``` -------------------------------- ### OpenClaw Installation Methods Source: https://openclawlab.com/en/docs/help/faq Compares the 'hackable git install' and 'npm install' methods for OpenClaw, highlighting their use cases for contributors versus general users. ```APIDOC ## OpenClaw Installation Methods ### Description This section compares two primary methods for installing OpenClaw: the 'hackable git install' and the 'npm install'. It outlines the advantages of each method, catering to different user needs, such as development and contribution versus straightforward usage. ### Method N/A (Installation Comparison) ### Endpoint N/A (Installation Comparison) ### Parameters N/A ### Request Body N/A ### Request Example N/A ### Response #### Success Response (200) N/A #### Response Example N/A ### Comparison - **Hackable (git) install:** - Provides a full source checkout, allowing for local modifications and contributions. - Best suited for developers and contributors who need to patch code or documentation. - Requires running local builds. - **npm install:** - Installs OpenClaw as a global CLI tool without direct access to the repository. - Best suited for users who want to "just run it" without modifying the source code. - Updates are managed through npm dist-tags. ### Docs - Getting started - Updating ``` -------------------------------- ### Install OpenClaw CLI (Run Onboarding) Source: https://openclawlab.com/en/docs/install/installer Installs the OpenClaw CLI and automatically runs the onboarding process after installation. This is convenient for initial setup and configuration. ```shell curl -fsSL --proto '=https' --tlsv1.2 https://openclaw.ai/install-cli.sh | bash -s -- --onboard ``` -------------------------------- ### Anthropic Setup-Token Live Test Setup Source: https://openclawlab.com/en/docs/help/testing Instructions for setting up and running live tests to verify Anthropic's Claude Code CLI setup-token or a pasted setup-token profile. This includes enabling the test and specifying the token source, either via a profile or a raw token value. ```bash export OPENCLAW_LIVE_SETUP_TOKEN=1 export OPENCLAW_LIVE_SETUP_TOKEN_PROFILE=anthropic:setup-token-test export OPENCLAW_LIVE_SETUP_TOKEN_VALUE=sk-ant-oat01-... export OPENCLAW_LIVE_SETUP_TOKEN_MODEL=anthropic/claude-opus-4-6 ``` -------------------------------- ### Create macOS VM with Lume Source: https://openclawlab.com/en/docs/install/macos-vm Creates a new macOS virtual machine named 'openclaw' using Lume. It specifies the operating system as 'macos' and fetches the latest available IPSW file for installation. A VNC window will open to guide through the initial setup. ```bash lume create openclaw --os macos --ipsw latest ``` -------------------------------- ### Remove OpenClaw CLI Installation Source: https://openclawlab.com/en/docs/install/uninstall Commands to remove the OpenClaw CLI installed via npm, pnpm, or bun. Choose the command corresponding to your installation method. ```bash npm rm -g openclaw ``` ```bash pnpm remove -g openclaw ``` ```bash bun remove -g openclaw ``` -------------------------------- ### Run OpenClaw Onboarding Wizard Source: https://openclawlab.com/en/docs/platforms/digitalocean Initiates the OpenClaw onboarding process, which includes setting up model authentication, configuring channels (like Telegram, WhatsApp, Discord), generating a gateway token, and installing the gateway as a systemd service. ```bash openclaw onboard --install-daemon ``` -------------------------------- ### Skill Installation Command Source: https://openclawlab.com/en/docs/tools/clawhub Installs a skill from the registry. Allows specifying a version and forcing an overwrite if the directory exists. ```bash clawhub install [--version ] [--force] ``` -------------------------------- ### Remove OpenClaw macOS Application Source: https://openclawlab.com/en/docs/install/uninstall Deletes the OpenClaw macOS application if it was installed separately. ```bash rm -rf /Applications/OpenClaw.app ``` -------------------------------- ### Reset OpenClaw Installation Source: https://openclawlab.com/en/docs/help/faq Commands to perform a full reset of the OpenClaw installation, including non-interactive options and re-running the onboarding process. This is useful for troubleshooting or starting fresh. ```bash openclaw reset ``` ```bash openclaw reset --scope full --yes --non-interactive ``` ```bash openclaw onboard --install-daemon ``` ```bash openclaw gateway --dev --reset ``` -------------------------------- ### Install Node.js 22 (ARM64) on Raspberry Pi Source: https://openclawlab.com/en/docs/platforms/raspberry-pi Install Node.js version 22.x on your Raspberry Pi using the NodeSource repository. This command fetches the setup script, executes it, and then installs the Node.js package. Verify the installation by checking the Node.js and npm versions. ```bash # Install Node.js via NodeSource curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash - sudo apt install -y nodejs # Verify node --version # Should show v22.x.x npm --version ``` -------------------------------- ### Install Project Dependencies with pnpm Source: https://openclawlab.com/en/docs/platforms/mac/dev-setup Installs all project-wide dependencies required for building and running the OpenClaw application. This command should be run in the root directory of the project. ```shell pnpm install ``` -------------------------------- ### OpenClaw Plugin Configuration Example Source: https://openclawlab.com/en/docs/plugins/zalouser Configuration snippet for enabling and setting up a plugin. This example shows how to enable a plugin and configure its specific settings. ```yaml plugins: entries: voice-call: enabled: true config: # Voice Call specific configuration some_setting: "value" ``` -------------------------------- ### OpenClaw CLI Examples for Onboarding and Model Management Source: https://openclawlab.com/en/docs/concepts/model-providers Examples of using the OpenClaw CLI to onboard a provider with an API key, set a specific model, and list available models. ```bash openclaw onboard --auth-choice opencode-zen openclaw models set opencode/claude-opus-4-6 openclaw models list ``` -------------------------------- ### Windows: Verbose Installer Output with PowerShell Tracing Source: https://openclawlab.com/en/docs/install/installer This script demonstrates how to enable PowerShell tracing to get verbose output from the install.ps1 script for debugging purposes. It sets the trace level, executes the installer script, and then resets the trace level. ```powershell Set-PSDebug -Trace 1 & ([scriptblock]::Create((iwr -useb https://openclaw.ai/install.ps1))) -NoOnboard Set-PSDebug -Trace 0 ``` -------------------------------- ### OpenClaw HOOK.md File Example Source: https://openclawlab.com/en/docs/automation/hooks Example content for the HOOK.md file, which serves as the hook's description and configuration entry point. It includes frontmatter for metadata and a markdown section for detailed explanations. ```markdown --- name: my-hook description: "Does something useful" metadata: { "openclaw": { "emoji": "🎯", "events": ["command:new"] } } --- # My Custom Hook This hook does something useful when you issue `/new`. ``` -------------------------------- ### Install OpenClaw and Node.js on Ubuntu Source: https://openclawlab.com/en/docs/platforms/digitalocean Installs Node.js version 22 and the OpenClaw application on an Ubuntu system. It first updates the system's package list and upgrades existing packages, then fetches and executes the NodeSource setup script for Node.js 22, installs Node.js, and finally downloads and runs the OpenClaw installation script. The installation concludes with a version check. ```bash # Update system apt update && apt upgrade -y # Install Node.js 22 curl -fsSL https://deb.nodesource.com/setup_22.x | bash - apt install -y nodejs # Install OpenClaw curl -fsSL https://openclaw.ai/install.sh | bash # Verify openclaw --version ```