Sherpa
Reference

CLI & Scripts

Command reference for the Sherpa CLI and dispatch scripts.

sherpa init

Scaffold governance into an existing project.

sherpa init

Creates:

PathPurpose
sherpa.jsonProject configuration
.claude/rules/Convention rule files
.claude/skills/Skill definitions
docs/agents/roles/Agent role definitions
docs/initiatives/Initiative directory

Runs interactively -- prompts for project name, description, and which conventions to include.

Status: Under development. Available in @sherpa/studio-cli.

sherpa sync

Update conventions from upstream template.

sherpa sync

Three-way merge at heading granularity: keeps local customizations while applying upstream updates. Files with maintained-by: human in provenance frontmatter are skipped.

Status: Under development.

Dispatch Scripts

Available now in the monorepo. These scripts route tasks to agent backends.

Interactive Dispatch

./scripts/dispatch.sh <role-slug>

Launch an interactive CLI session with a specific agent role loaded. The role's behavioral constraints, context packages, and tool permissions are injected into the session.

Headless Worker

./scripts/worker.sh <task-slug>

Dispatch a task to its assigned backend for autonomous execution. Backend selection follows the routing table in sherpa.config.ts.

Judge Review

./scripts/auto-judge.sh <task-slug>

Run the Judge role against a completed task's output. Evaluates against the role's quality-bar criteria and the content quality scorecard.

Batch Dispatch

./scripts/dispatch-queue.sh --pending

Dispatch all pending tasks in queue order. Respects dependency ordering -- a task blocked by an incomplete dependency is skipped.

Backends

BackendTypeNotes
claudeCLIClaude Code interactive session
opencodeCLIOpenCode CLI
codexCLIOpenAI Codex CLI
geminiCLIGoogle Gemini CLI
lm-studioCLILocal LM Studio CLI
groqAPIGroq cloud inference
google-aiAPIGoogle AI Studio API
lm-studio-apiAPILocal LM Studio HTTP API
openclawGatewayRemote OpenClaw agent (WebSocket v3)

Backend routing is configured in the dispatch section of sherpa.config.ts. Task type determines backend unless explicitly overridden.

Database Sync

pnpm sync:db

Rebuild the knowledge index from the filesystem. Scans initiatives, agent roles, rules, and skills, then writes to the local SQLite database used by Studio and the MCP server.

On this page