Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/openclaw/openclaw/llms.txt

Use this file to discover all available pages before exploring further.

OpenClaw CLI

The OpenClaw CLI is your primary interface for managing the gateway, agents, channels, and configuration.

Installation

Global Install (npm)

npm install -g openclaw@latest

Source Checkout (git)

git clone https://github.com/openclaw/openclaw
cd openclaw
pnpm install
pnpm build

Usage

openclaw [command] [options]

Global Options

--help
boolean
Display help for any command
--version
boolean
Display the current version
--no-color
boolean
Disable ANSI colors in output
--profile <name>
string
Use a custom profile for configuration

Core Commands

  • gateway - Run and manage the WebSocket Gateway
  • agent - Run one agent turn via the Gateway
  • channels - Manage connected chat channels
  • config - Get, set, or list configuration values
  • onboard - Interactive onboarding wizard

Management Commands

  • daemon - Manage the Gateway service (launchd/systemd/schtasks)
  • logs - Tail gateway file logs via RPC
  • update - Update OpenClaw and inspect update channel status
  • doctor - Health checks and quick fixes

Getting Help

Use --help with any command to see detailed usage information:
openclaw --help
openclaw gateway --help
openclaw agent --help

Examples

# Run gateway in foreground
openclaw gateway run

# Run with custom port
openclaw gateway run --port 18790
The CLI requires Node.js 22 or higher. Use node --version to check your version.

Configuration

The CLI reads configuration from ~/.openclaw/openclaw.json by default. Use openclaw config to manage settings:
# View a configuration value
openclaw config get gateway.port

# Set a configuration value
openclaw config set gateway.port 18790

# Launch interactive config wizard
openclaw configure

Environment Variables

OPENCLAW_GATEWAY_TOKEN
string
Override gateway authentication token
OPENCLAW_GATEWAY_PASSWORD
string
Override gateway authentication password
NO_COLOR
string
Disable ANSI colors (set to any value)
OPENCLAW_PROFILE
string
Use a custom profile for configuration

Next Steps

  1. Run the onboarding wizard: openclaw onboard
  2. Start the gateway: openclaw gateway run
  3. Connect channels: openclaw channels add
  4. Check health: openclaw doctor