- Reset master to upstream/main (16,697 commits) - Overlay 2,271 local-only files (skills, tools, workspace, configs, apps) - Restore IDENTITY.md and USER.md templates - Build verified, gateway running, Discord working Co-Authored-By: Claude Opus 4.6 <[email protected]>
5.6 KiB
5.6 KiB
OpenClaw CLI Commands Reference
Core Commands
openclaw agent
Run an agent turn via the Gateway or locally.
# Basic usage with message
openclaw agent --to +15555550123 --message "status update"
# Use specific agent
openclaw agent --agent ops --message "Summarize logs"
# Target existing session
openclaw agent --session-id 1234 --message "Continue task"
# Run locally (bypass gateway)
openclaw agent --local --agent test --message "Hello"
# Deliver response to channel
openclaw agent --to +15555550123 --message "Report" --deliver
# Custom thinking level
openclaw agent --session-id 1234 --message "Complex task" --thinking medium
# JSON output
openclaw agent --agent ops --message "Get data" --json
# Override delivery channel/target
openclaw agent --agent ops --message "Alert" --deliver --reply-channel slack --reply-to "#alerts"
Options:
-m, --message <text>- Message body for the agent-t, --to <number>- Recipient number in E.164 format--session-id <id>- Explicit session ID--agent <id>- Agent ID (overrides routing)--thinking <level>- Thinking level: off | minimal | low | medium | high--verbose <on|off>- Persist verbose level for session--channel <channel>- Delivery channel--reply-to <target>- Delivery target override--reply-channel <channel>- Delivery channel override--local- Run embedded agent locally--deliver- Send reply back to channel--json- Output result as JSON--timeout <seconds>- Override agent timeout
openclaw gateway
Gateway management and control.
# Start gateway
openclaw gateway run
# Start with custom binding
openclaw gateway run --bind loopback
# Start with custom port
openclaw gateway run --port 18790
# Force start (kill existing)
openclaw gateway run --force
# Start in background
nohup openclaw gateway run > /tmp/openclaw-gateway.log 2>&1 &
Options:
--bind <mode>- Binding mode: loopback | lan | public--port <number>- Port number (default: 18789)--force- Kill existing gateway before starting
openclaw channels
Channel status and management.
# List all channels
openclaw channels list
# Get channel status
openclaw channels status
# Probe channels (deep check)
openclaw channels status --deep
# Status for all channels (read-only)
openclaw channels status --all
# Check specific channel
openclaw channels status telegram
Options:
--deep- Probe actual connectivity--all- Show all channels (read-only format)--probe- Test channel connectivity
openclaw skills
Skill management.
# List all skills
openclaw skills list
# Show skill details
openclaw skills info <skill-name>
# Check skill readiness
openclaw skills check
openclaw config
Configuration management.
# Interactive wizard
openclaw config
# Get config value
openclaw config get <path>
# Set config value
openclaw config set <path> <value>
# Unset config value
openclaw config unset <path>
# Configure specific section
openclaw config --section gateway
See references/config-guide.md for detailed configuration options.
openclaw login
Provider authentication.
# Login to web provider
openclaw login
# Login to specific provider
openclaw login --provider anthropic
openclaw doctor
Diagnostic and troubleshooting tool.
# Run diagnostics
openclaw doctor
# Check specific component
openclaw doctor --check gateway
Helper Commands
openclaw message send
Send messages via channels (advanced).
# Send message (use heredoc for special characters)
openclaw message send --channel telegram --to <chat-id> <<'EOF'
Message with special characters!
EOF
openclaw version
Show version information.
openclaw version
openclaw help
Get help for commands.
# General help
openclaw --help
# Command-specific help
openclaw agent --help
openclaw gateway --help
openclaw config --help
Common Workflows
Start Gateway Locally
# Configure local mode
openclaw config set gateway.mode local
# Start gateway
openclaw gateway run --bind loopback --port 18789
Send Agent Message
# Interactive session
openclaw agent --to +15555550123 --message "Hello"
# With delivery
openclaw agent --to +15555550123 --message "Report" --deliver --channel whatsapp
Check Channel Status
# Quick status
openclaw channels status
# Deep probe
openclaw channels status --deep
# Specific channel
openclaw channels status telegram --probe
Manage Skills
# List available skills
openclaw skills list
# Get skill info
openclaw skills info nvidia-agent
# Search for skills on ClawHub
npx clawhub search <query>
# Install skill from ClawHub
npx clawhub install <skill-name>
Environment Variables
Gateway
OPENCLAW_GATEWAY_URL- Override gateway URLOPENCLAW_GATEWAY_TOKEN- Gateway auth token
Credentials
ANTHROPIC_API_KEY- Anthropic API keyOPENAI_API_KEY- OpenAI API keyNVIDIA_API_KEY- NVIDIA NIM API keyGOOGLE_API_KEY- Google Gemini API key
Development
OPENCLAW_DIR- Override default~/.openclawdirectoryNODE_ENV- Set todevelopmentfor dev modeDEBUG- Enable debug logging
Exit Codes
0- Success1- General error2- Invalid arguments or configuration130- Interrupted (Ctrl+C)
Docs
Full documentation: https://docs.openclaw.ai/
Command-specific docs:
- Agent: https://docs.openclaw.ai/cli/agent
- Gateway: https://docs.openclaw.ai/cli/gateway
- Config: https://docs.openclaw.ai/cli/config
- Skills: https://docs.openclaw.ai/cli/skills