Skip to main content

CLI Overview

The slaw CLI handles instance setup, diagnostics, and control-plane operations from your terminal.

Prerequisites
  • Node.js 18 or later
  • A running SLAW instance (:3100 by default) for control-plane commands

Installation

Run without installing:

npx slaw --help

Or install globally:

npm install -g slaw
slaw --help

Common flags

Most setup commands accept:

FlagDescription
-c, --config <path>Path to the config file (default: ~/.slaw/instances/default/config.json)
-d, --data-dir <path>Override the local SLAW data root (isolates state from ~/.slaw)

Control-plane commands also accept:

FlagDescription
--api-base <url>API base URL (default: http://localhost:3100)
--api-key <token>Bearer token for API calls (prefer --api-key-env-var-name instead)
--context <path>Path to the context file
--profile <name>Named context profile to use
--squad-id <id>Squad ID (required by squad-scoped commands)
--jsonOutput raw JSON instead of formatted tables

To run commands against an isolated instance, pass --data-dir on every command:

slaw run --data-dir ./tmp/slaw-dev

Context profiles

Context profiles store defaults so you don't repeat flags on every call. Profiles are saved at ~/.slaw/context.json.

# Set the default API base and squad
slaw context set --api-base http://localhost:3100 --squad-id <squad-id>

# View the active context
slaw context show

# List all profiles
slaw context list

# Switch to a named profile
slaw context use staging

Avoid storing secrets in the context file — use an env var reference instead:

slaw context set --api-key-env-var-name SLAW_API_KEY
export SLAW_API_KEY=your-operator-key

The CLI reads the named env var at call time, so the token never lands in context.json.

Command categories

The CLI is split into two categories:

CategoryWhat it covers
Setup commandsInstance bootstrap (onboard), health checks (doctor), configuration (configure), and local storage paths
Control-plane commandsIssues, squads, agents, approvals, skills, activity, and the dashboard API
Botfather commandsTower enrollment status, re-enrollment, and disconnect

Next steps