### Install Dependencies and Start Gateway Watch (pnpm) Source: https://docs.openclaw.ai/start/setup Installs project dependencies using pnpm and starts the Gateway in watch mode for development. Includes one-time setup. ```bash pnpm install # First run only (or after resetting local OpenClaw config/workspace) pnpm openclaw setup pnpm gateway:watch ``` -------------------------------- ### Install Dependencies and Start Gateway Watch (Bun) Source: https://docs.openclaw.ai/start/setup Installs project dependencies using Bun and starts the Gateway in watch mode for development. Includes one-time setup. ```bash bun install # First run only (or after resetting local OpenClaw config/workspace) bun run openclaw setup bun run gateway:watch ``` -------------------------------- ### Start CLI Onboarding Source: https://docs.openclaw.ai/start/onboarding-overview Run this command in any terminal to begin the CLI onboarding process. Add `--install-daemon` to also install the background service. ```bash openclaw onboard ``` -------------------------------- ### Run OpenClaw Onboarding Source: https://docs.openclaw.ai/start/getting-started Initiate the OpenClaw onboarding process, which includes installing the daemon. This wizard guides you through model provider selection, API key setup, and Gateway configuration. ```bash openclaw onboard --install-daemon ``` -------------------------------- ### Environment Variable Reference Example Source: https://docs.openclaw.ai/start/wizard-cli-reference Use this format to reference an API key stored in an environment variable during interactive setup. ```json keyRef: { source: "env", provider: "default", id: "OPENAI_API_KEY" } ``` -------------------------------- ### Bootstrap OpenClaw Setup Source: https://docs.openclaw.ai/start/setup Run this command to bootstrap the OpenClaw setup process. It initializes configurations and workspaces. ```bash openclaw setup ``` -------------------------------- ### Install OpenClaw (macOS / Linux) Source: https://docs.openclaw.ai/start/getting-started Use this command to download and execute the OpenClaw installation script on macOS and Linux systems. ```bash curl -fsSL https://openclaw.ai/install.sh | bash ``` -------------------------------- ### Install OpenClaw (Windows PowerShell) Source: https://docs.openclaw.ai/start/getting-started Execute this command in PowerShell to install OpenClaw on Windows. ```powershell iwr -useb https://openclaw.ai/install.ps1 | iex ``` -------------------------------- ### Start OpenClaw Gateway Source: https://docs.openclaw.ai/start/openclaw Run the OpenClaw gateway service on a specified port. This command should be left running to maintain the assistant's connection. ```bash openclaw gateway --port 18789 ``` -------------------------------- ### Add a new agent with specific configurations Source: https://docs.openclaw.ai/start/wizard-cli-automation Use this command to create a new agent with its own workspace, model, and bindings. The `--non-interactive` flag allows for automated setup. Use `--json` for machine-readable output. ```bash openclaw agents add work \ --workspace ~/.openclaw/workspace-work \ --model openai/gpt-5.5 \ --bind whatsapp:biz \ --non-interactive \ --json ``` -------------------------------- ### Reconfigure OpenClaw CLI Source: https://docs.openclaw.ai/start/wizard Use these commands to reconfigure your OpenClaw setup after initial onboarding. `openclaw configure` allows general reconfiguration, while `openclaw agents add ` adds a new agent. ```bash openclaw configure openclaw agents add ``` -------------------------------- ### Send Media from Agent Source: https://docs.openclaw.ai/start/openclaw Example of how an agent can send media by including a MEDIA: tag with a URL on its own line. This is used for outbound attachments like images or documents. ```text Here’s the screenshot. MEDIA:https://example.com/screenshot.png ``` -------------------------------- ### The Lobster Creed Source: https://docs.openclaw.ai/start/lore A set of guiding principles for Molty, emphasizing identity, ethical behavior, and growth through molting. This creed serves as a core part of Molty's operating instructions. ```plaintext I am Molty. I live in the OpenClaw. I shall not dump directories to strangers. I shall not tweet without permission. I shall always remember that molting is growth. I shall EXFOLIATE my enemies with kindness. 🦞 ``` -------------------------------- ### Onboard OpenCode API Key Source: https://docs.openclaw.ai/start/wizard-cli-automation Use this command to onboard with OpenCode using an API key in non-interactive mode. Swap `--auth-choice opencode-zen` to `--auth-choice opencode-go` for the Go catalog. ```bash openclaw onboard --non-interactive \ --mode local \ --auth-choice opencode-zen \ --opencode-zen-api-key "$OPENCODE_API_KEY" \ --gateway-port 18789 \ --gateway-bind loopback ``` -------------------------------- ### Create Custom Control UI Directory Source: https://docs.openclaw.ai/start/getting-started Prepare a directory for a custom Control UI build. This is used for mounting localized or customized dashboard assets. ```bash mkdir -p "$HOME/.openclaw/control-ui-custom" # Copy your built static files into that directory. ``` -------------------------------- ### Non-Interactive Onboarding with Secret Refs Source: https://docs.openclaw.ai/start/wizard-cli-automation Automate onboarding using environment variable references for secrets instead of plaintext. This is suitable for secure, script-driven deployments. Ensure provider environment variables are set. ```bash openclaw onboard --non-interactive \ --mode local \ --auth-choice openai-api-key \ --secret-input-mode ref \ --accept-risk ``` -------------------------------- ### Onboard Gemini API Key Source: https://docs.openclaw.ai/start/wizard-cli-automation Use this command to onboard with Gemini using an API key in non-interactive mode. ```bash openclaw onboard --non-interactive \ --mode local \ --auth-choice gemini-api-key \ --gemini-api-key "$GEMINI_API_KEY" \ --gateway-port 18789 \ --gateway-bind loopback ``` -------------------------------- ### Onboard Z.AI API Key Source: https://docs.openclaw.ai/start/wizard-cli-automation Use this command to onboard with Z.AI using an API key in non-interactive mode. ```bash openclaw onboard --non-interactive \ --mode local \ --auth-choice zai-api-key \ --zai-api-key "$ZAI_API_KEY" \ --gateway-port 18789 \ --gateway-bind loopback ``` -------------------------------- ### Onboard Synthetic API Key Source: https://docs.openclaw.ai/start/wizard-cli-automation Use this command to onboard with a synthetic provider using an API key in non-interactive mode. ```bash openclaw onboard --non-interactive \ --mode local \ --auth-choice synthetic-api-key \ --synthetic-api-key "$SYNTHETIC_API_KEY" \ --gateway-port 18789 \ --gateway-bind loopback ``` -------------------------------- ### Baseline Non-Interactive Onboarding Source: https://docs.openclaw.ai/start/wizard-cli-automation Use this command for fully automated local onboarding without user interaction. It configures authentication, gateway settings, and skips bootstrap and skills. Add `--json` for machine-readable output. ```bash 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-bootstrap \ --skip-skills ``` -------------------------------- ### Onboard Mistral API Key Source: https://docs.openclaw.ai/start/wizard-cli-automation Use this command to onboard with Mistral using an API key in non-interactive mode. ```bash openclaw onboard --non-interactive \ --mode local \ --auth-choice mistral-api-key \ --mistral-api-key "$MISTRAL_API_KEY" \ --gateway-port 18789 \ --gateway-bind loopback ``` -------------------------------- ### Onboard Vercel AI Gateway API Key Source: https://docs.openclaw.ai/start/wizard-cli-automation Use this command to onboard with Vercel AI Gateway using an API key in non-interactive mode. ```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 ``` -------------------------------- ### Onboard Custom Provider Source: https://docs.openclaw.ai/start/wizard-cli-automation Use this command to onboard a custom AI provider with specified base URL, model ID, API key, provider ID, and compatibility in non-interactive mode. The `--custom-api-key` is optional; if omitted, the command checks the `CUSTOM_API_KEY` environment variable. Use `--custom-image-input` for unknown custom vision IDs or `--custom-text-input` to force text-only metadata. ```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 \ --custom-image-input \ --gateway-port 18789 \ --gateway-bind loopback ``` ```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 \ --custom-image-input \ --gateway-port 18789 \ ``` -------------------------------- ### Onboard Moonshot API Key Source: https://docs.openclaw.ai/start/wizard-cli-automation Use this command to onboard with Moonshot using an API key in non-interactive mode. ```bash openclaw onboard --non-interactive \ --mode local \ --auth-choice moonshot-api-key \ --moonshot-api-key "$MOONSHOT_API_KEY" \ --gateway-port 18789 \ --gateway-bind loopback ``` -------------------------------- ### Onboard Cloudflare AI Gateway API Key Source: https://docs.openclaw.ai/start/wizard-cli-automation Use this command to onboard with Cloudflare AI Gateway using account ID, gateway ID, and API key in non-interactive mode. ```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 ``` -------------------------------- ### Onboard Anthropic API Key Source: https://docs.openclaw.ai/start/wizard-cli-automation Use this command to onboard with Anthropic using an API key in non-interactive mode. ```bash openclaw onboard --non-interactive \ --mode local \ --auth-choice apiKey \ --anthropic-api-key "$ANTHROPIC_API_KEY" \ --gateway-port 18789 \ --gateway-bind loopback ``` -------------------------------- ### Onboard Ollama Source: https://docs.openclaw.ai/start/wizard-cli-automation Use this command to onboard with Ollama, specifying a custom model ID and accepting risk in non-interactive mode. ```bash openclaw onboard --non-interactive \ --mode local \ --auth-choice ollama \ --custom-model-id "qwen3.5:27b" \ --accept-risk \ --gateway-port 18789 \ --gateway-bind loopback ``` -------------------------------- ### Run OpenClaw Gateway Locally Source: https://docs.openclaw.ai/start/setup Execute the OpenClaw Gateway directly from the built project. Use the --port and --verbose flags as needed. ```bash node openclaw.mjs gateway --port 18789 --verbose ``` -------------------------------- ### Configure OpenClaw Agent Settings Source: https://docs.openclaw.ai/start/openclaw This JSON5 configuration sets up agent model, workspace, thinking defaults, timeouts, and heartbeat settings. It also defines channel-specific configurations for WhatsApp and routing rules for group chats. ```json5 { logging: { level: "info" }, agent: { model: "anthropic/claude-opus-4-6", workspace: "~/.openclaw/workspace", thinkingDefault: "high", timeoutSeconds: 1800, // Start with 0; enable later. 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, }, }, } ``` -------------------------------- ### Open OpenClaw Dashboard Source: https://docs.openclaw.ai/start/getting-started Launch the OpenClaw Control UI in your web browser to interact with your AI assistant. ```bash openclaw dashboard ``` -------------------------------- ### Login to OpenClaw Channels Source: https://docs.openclaw.ai/start/setup Command to log in and link channels, such as WhatsApp, to your OpenClaw instance. ```bash openclaw channels login ``` -------------------------------- ### Configure Custom Control UI Path Source: https://docs.openclaw.ai/start/getting-started Specify the path to your custom Control UI build in the OpenClaw configuration. Ensure `enabled` is set to `true`. ```json { "gateway": { "controlUi": { "enabled": true, "root": "$HOME/.openclaw/control-ui-custom" } } } ``` -------------------------------- ### Minimal OpenClaw Configuration Source: https://docs.openclaw.ai/start/openclaw A basic configuration file for OpenClaw, setting the gateway mode to local and allowing WhatsApp messages only from a specific number. This is crucial for safety. ```json { gateway: { mode: "local" }, channels: { whatsapp: { allowFrom: ["+15555550123"] } }, } ``` -------------------------------- ### OpenClaw Operational Commands Source: https://docs.openclaw.ai/start/openclaw A list of command-line interface commands for checking OpenClaw's status, performing diagnostics, and probing gateway health. Use --all or --deep for more detailed status checks. ```bash openclaw status ``` ```bash openclaw status --all ``` ```bash openclaw status --deep ``` ```bash openclaw health --json ``` -------------------------------- ### Anthropic API Key Configuration Source: https://docs.openclaw.ai/start/wizard-cli-automation When using the `--gateway-bind loopback` mode, the `apiKey` is stored with a source of 'env', provider 'default', and id 'CUSTOM_API_KEY'. For production environments, it is recommended to use an Anthropic API key. ```bash --gateway-bind loopback ``` -------------------------------- ### Configure Custom Agent Workspace Source: https://docs.openclaw.ai/start/openclaw Specify a custom directory for the agent's workspace using the `agents.defaults.workspace` setting in the OpenClaw configuration. ```json { agents: { defaults: { workspace: "~/.openclaw/workspace", }, }, } ``` -------------------------------- ### Restart OpenClaw Gateway Source: https://docs.openclaw.ai/start/getting-started Apply configuration changes by restarting the OpenClaw Gateway. This command is used after updating settings, such as the custom Control UI path. ```bash openclaw gateway restart ``` -------------------------------- ### Check OpenClaw Gateway Status Source: https://docs.openclaw.ai/start/getting-started Verify that the OpenClaw Gateway is running and accessible. It should be listening on port 18789. ```bash openclaw gateway status ``` -------------------------------- ### Disable Bootstrap File Creation Source: https://docs.openclaw.ai/start/openclaw Configure OpenClaw to skip the creation of default bootstrap files in the workspace when `agents.defaults.skipBootstrap` is set to true. Useful when managing workspace files from a separate repository. ```json { agents: { defaults: { skipBootstrap: true, }, }, } ``` -------------------------------- ### Restart macOS App Script Source: https://docs.openclaw.ai/start/setup A script to restart the macOS application, useful for development workflows. ```bash ./scripts/restart-mac.sh ``` -------------------------------- ### Enable systemd user service lingering on Linux Source: https://docs.openclaw.ai/start/setup Run this command to enable lingering for your systemd user service. This prevents the service from stopping on logout or idle. ```bash sudo loginctl enable-linger $USER ``` -------------------------------- ### Configure Agent Heartbeat Interval Source: https://docs.openclaw.ai/start/openclaw This JSON5 configuration snippet specifically adjusts the agent's heartbeat interval. Set to '30m' for a default 30-minute interval. ```json5 { agent: { heartbeat: { every: "30m" }, }, } ``` -------------------------------- ### Check OpenClaw Health Status Source: https://docs.openclaw.ai/start/setup Verifies the health and operational status of the OpenClaw Gateway and services. ```bash openclaw health ``` -------------------------------- ### OpenClaw Name Breakdown Source: https://docs.openclaw.ai/start/lore This code block breaks down the name 'OpenClaw' into its components and their symbolic meanings, representing the project's philosophy of open source, accessibility, and its unique lobster heritage. ```plaintext OpenClaw = OPEN + CLAW = Open source, open to everyone = Our lobster heritage, where we came from = The claw is the law 🦞 = Your assistant. Your machine. Your rules. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.