OpenClaw·Beginner·Last tested: 2026-03·~5 min read
CLI Reference
Quick reference for common OpenClaw CLI commands.
Agent Management
openclaw agents add <id>— Create a new agentopenclaw agents set-identity --agent <id> --name "Name"— Set agent display nameopenclaw agents list --bindings— List all agents and their routing bindingsopenclaw agents bind --agent <id> --bind slack:<account>— Bind agent to a Slack accountopenclaw agents unbind --agent <id> --bind slack:<account>— Remove a Slack binding
Gateway
openclaw gateway --port 18789— Start the gateway on a specific portopenclaw gateway restart— Restart the gateway processopenclaw onboard --install-daemon— Install as a systemd daemon
Channel & Connectivity
openclaw channels status --probe— Check all channel connectionsopenclaw pairing list slack— List pending Slack pairing requestsopenclaw pairing approve slack <code> --account <account>— Approve a Slack pairing code
Updates & Security
openclaw update— Update OpenClaw to the latest versionopenclaw security audit— Scan for config issues, exposed secrets, and permission gaps
Device Management
openclaw devices list— List all paired devicesopenclaw devices approve <id>— Approve a pending device pairing request
Diagnostics
openclaw doctor— Run a full health check
Common Workflows
Set up a new agent from scratch
# 1. Create the agent
openclaw agents add my-agent
# 2. Set its display name
openclaw agents set-identity --agent my-agent --name "My Agent"
# 3. Bind to a channel
openclaw agents bind --agent my-agent --bind slack:my-account
# 4. Restart the gateway
openclaw gateway restart
# 5. Verify
openclaw agents list --bindings
openclaw channels status --probe
Diagnose a non-responsive agent
# Check the gateway is running
openclaw doctor
# Check channel connectivity
openclaw channels status --probe
# Verify the agent's bindings
openclaw agents list --bindings
# Check pairing status (for Slack)
openclaw pairing list slack
Approve a new Slack user
# List pending pairings
openclaw pairing list slack
# Approve a specific pairing code
openclaw pairing approve slack <CODE> --account <account>