CLI Reference
claw-insights start
Start the Claw Insights server as a background daemon.
| Option | Description |
|---|---|
--port <number> | Server port (default: 41041) |
--web-port <number> | Web UI port (default: 41042, ignored in server-only mode) |
--no-auth | Disable authentication (not recommended for production) |
--server-only | Start API server without serving web UI |
--open | Open 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.
| Option | Description |
|---|---|
--lines <number>, -n | Number 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.
| Option | Description |
|---|---|
--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 |
--quick | Shorthand for --detail compact --format png |
--dry-run | Show 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
--rangeto6h. The REST API defaults to24h.
Environment Variables
| Variable | Description |
|---|---|
CLAW_INSIGHTS_SNAPSHOT_DIR | Default directory for saved snapshots (default: ~/.claw-insights/snapshots) |
CLAW_INSIGHTS_API_TOKEN | Auth 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