KrillSwitch docs

Getting started

Edit page ↗

Getting started

Requirements

  • Node.js 22.22 or newer
  • Corepack and pnpm 11.2.2
  • No Cloudflare account for local development

Start the local stack

sh
git clone https://github.com/openclaw/krillswitch.git
cd krillswitch
corepack pnpm install
pnpm dev

The command builds the dashboard, applies local D1 migrations, seeds a clawhub project, and starts the Worker at http://localhost:8799.

Open that URL and choose a development persona:

PersonaRoleUse
AdminadminFull management, roles, keys, projects
EditoreditorRead and change flags
ViewerviewerRead-only inspection
No grantnoneAccess-denied behavior

Development personas are loopback-only. They are never enabled by the production configuration.

Evaluate the seeded flag

sh
EVAL_KEY=ks_clawhub_development_local
curl -sS -X POST http://localhost:8799/v1/eval \
  -H "Authorization: Bearer ${EVAL_KEY}" \
  -H 'Content-Type: application/json' \
  -d '{"context":{"key":"some-user"}}'
json
{
  "flags": {
    "souls": {
      "value": true,
      "variationId": "var_souls_on",
      "reason": { "kind": "default" }
    }
  }
}

Make a change

Sign in as the admin or editor persona, open the clawhub project, choose the development environment, and toggle souls. The next evaluation reflects the change. Open the change log to see the actor and before/after state.

Use the CLI

Build the local executable, then onboard it against the local API:

sh
pnpm --dir packages/cli build
node packages/cli/dist/index.js onboard \
  --base-url http://localhost:8799 \
  --token ksat_...

Mint the ksat_... access token from Access → Access tokens in the dashboard. Continue with the CLI guide.

Next