# Complete CLI Reference Documentation

## Overview

This documentation provides comprehensive reference material for OpenClaw's command-line interface, detailing all available commands, options, and usage patterns.

## Core Structure

The CLI organizes functionality through a primary command with subcommands:

```
openclaw [--dev] [--profile <name>] <command>
```

### Global Options

The system supports several flags applicable across commands:
- `--dev`: Isolates state to `~/.openclaw-dev` with shifted default ports
- `--profile <name>`: Isolates state to `~/.openclaw-<name>`
- `--no-color`: Disables ANSI styling
- `--version`: Displays version information

### Output Formatting

ANSI colors and progress indicators only render in TTY sessions. OSC-8 hyperlinks render as clickable links in supported terminals; otherwise we fall back to plain URLs.

## Command Categories

### Setup & Configuration

**`setup`** initializes configuration and workspace with options for workspace path, wizard mode, and remote gateway configuration.

**`onboard`** provides an interactive wizard supporting multiple flows (quickstart, advanced, manual) with authentication provider selection and gateway binding options.

**`configure`** launches an interactive configuration wizard for models, channels, skills, and gateway settings.

**`config`** offers non-interactive helpers for retrieving, setting, or removing configuration values using dot/bracket path notation.

**`doctor`** performs health checks and applies quick fixes for configuration, gateway, and legacy services.

### Channel Management

**`channels`** manages chat channel accounts across platforms including WhatsApp, Telegram, Discord, Slack, Signal, iMessage, and Microsoft Teams.

Subcommands include:
- `list`: Display configured channels
- `status`: Check gateway reachability
- `add`: Wizard-style or non-interactive setup
- `remove`: Disable or delete configurations
- `login`/`logout`: Interactive authentication (platform-dependent)
- `logs`: Display recent channel activity

### Skill & Plugin Management

**`skills`** lists available skills and readiness information:
- `list`: Enumerate all skills
- `info <name>`: Display specific skill details
- `check`: Summary of ready versus missing requirements

**`plugins`** manages extensions and their configuration:
- `list`: Discover available plugins
- `install`: Add plugins from various sources
- `enable`/`disable`: Toggle activation
- `doctor`: Report load errors

### Messaging & Agent Control

**`message`** provides unified outbound messaging with subcommands for sending, polling, reacting, editing, deleting, and managing permissions across channels.

**`agent`** executes a single agent turn via the Gateway with options for message content, destination, session tracking, and verbose output.

**`agents`** manages isolated agent workspaces:
- `list`: Display configured agents
- `add`: Create new isolated agent
- `delete`: Remove agent and prune state

### Gateway Operations

**`gateway`** runs the WebSocket Gateway with binding, authentication, and Tailscale options.

Gateway service management includes:
- `status`: Probe gateway health
- `install`: Install service
- `start`/`stop`/`restart`: Control service state

**`logs`** tails Gateway file logs via RPC, with support for colorized structured output in TTY sessions and JSON formatting.

### System & Monitoring

**`status`** displays linked session health and recent recipients with options for comprehensive diagnostics and provider usage information.

**`health`** fetches current health status from the running Gateway.

**`sessions`** lists stored conversation sessions with filtering by activity duration.

**`system`** manages system-level operations:
- `event`: Enqueue system events
- `heartbeat`: Control heartbeat functionality
- `presence`: List system presence entries

### Model Configuration

**`models`** manages AI model selection and authentication:
- `list`: Enumerate available models
- `status`: Display current configuration
- `set`: Designate primary model
- `scan`: Discover new models with filtering options
- `auth`: Configure authentication credentials
- `aliases`: Create model shortcuts
- `fallbacks`: Define backup models

### Automation

**`cron`** manages scheduled jobs with support for:
- Time-based scheduling (`--at`, `--every`, `--cron`)
- System events or messaging payloads
- Job lifecycle management (enable/disable/edit)

### Node Management

**`node`** operates headless node hosts or manages them as background services.

**`nodes`** communicates with Gateway-paired nodes supporting:
- Status monitoring and connection filtering
- Command invocation with timeout control
- Camera operations (snap, clip)
- Canvas and screen management
- Location tracking

### Browser Control

**`browser`** controls dedicated Chrome/Brave/Edge/Chromium instances:

Management: `status`, `start`, `stop`, `reset-profile`, `profiles`, `create-profile`, `delete-profile`

Inspection: `screenshot`, `snapshot` with format and selector options

Actions: `navigate`, `click`, `type`, `press`, `hover`, `drag`, `select`, `upload`, `fill`, `dialog`, `wait`, `evaluate`, `console`, `pdf`

### Additional Tools

**`memory`** enables vector search over markdown files:
- `status`: Display index statistics
- `index`: Rebuild index
- `search`: Execute semantic queries

**`approvals`** manages approval configurations with allowlist operations.

**`security`** provides audit functionality with optional deep probing and automatic fixes.

**`tui`** opens an interactive terminal user interface connected to the Gateway.

**`docs`** searches live documentation.

## Reset & Cleanup

**`reset`** clears local configuration and state with scoping options (config only, config+credentials+sessions, or full reset).

**`uninstall`** removes the gateway service and associated data while preserving the CLI installation.

**`update`** manages version upgrades.

## Color Palette

OpenClaw employs a distinctive color scheme for terminal output:
- accent (#FF5A2D): headings, labels, primary highlights
- accentBright (#FF7A3D): command names, emphasis
- success (#2FBF71): success states
- error (#E23D2D): errors, failures

This reference encompasses the complete command taxonomy with emphasis on practical usage patterns and option availability across the OpenClaw platform.
