Skip to content

CLI Reference

claw-insights start

Start the Claw Insights server as a background daemon.

OptionDescription
--port <number>Server port (default: 41041)
--web-port <number>Web UI port (default: 41042, ignored in server-only mode)
--no-authDisable authentication (not recommended for production)
--server-onlyStart API server without serving web UI
--openOpen dashboard in browser after start
--gateway <url>OpenClaw gateway URL
--log-dir <dir>Log directory

claw-insights stop

Stop the running daemon.

claw-insights status

Show current server status (running/stopped, port, PID).

claw-insights logs

View daemon log output.

OptionDescription
--lines <number>, -nNumber of log lines to display

claw-insights restart

Restart the daemon. Accepts the same options as start.

claw-insights snapshot

Generate a dashboard snapshot from the command line. The server must be running.

OptionDescription
--format <type>Output format: png, svg, json (default: png)
--detail <level>Detail level: compact, standard, full (default: standard)
--range <range>Time range: 1h, 6h, 12h, 24h (default: 6h)
--theme <theme>Theme: dark, light (default: dark)
--lang <lang>Language: en, zh (default: en)
-o, --output <path>Output file path
--quickShorthand for --detail compact --format png
--dry-runShow what would be generated without executing
--port <number>Target server port (default: 41041)
-t, --token <token>Auth token (or auto-detected from ~/.claw-insights/auth-token)

Note: The CLI defaults --range to 6h. The REST API defaults to 24h.

Environment Variables

VariableDescription
CLAW_INSIGHTS_SNAPSHOT_DIRDefault directory for saved snapshots (default: ~/.claw-insights/snapshots)
CLAW_INSIGHTS_API_TOKENAuth token (fallback when --token not provided)

Examples

bash
# Start with default settings
claw-insights start

# Start on a custom port, no browser
claw-insights start --port 4000 --server-only

# Check daemon status
claw-insights status

# View last 50 log lines
claw-insights logs --lines 50

# Restart with new options
claw-insights restart --port 5000

# Quick compact snapshot
claw-insights snapshot --quick -o status.png

# Full detail, light theme, Chinese
claw-insights snapshot --detail full --theme light --lang zh -o report.png

# JSON export of last hour
claw-insights snapshot --format json --range 1h -o metrics.json

# Dry run to preview parameters
claw-insights snapshot --dry-run --detail full --range 24h

Released under the MIT License.