Skip to main content

OpenClaw CLI

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

Installation

Global Install (npm)

Source Checkout (git)

Usage

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:

Examples

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:

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