HomeOpen workspace

Command Line (CLI) & Local Runtime

A developer and operator reference for running the shebang runtime (@sav/runtime) and CLI (@sav/cli) locally.

Requirements and quick setup

Running the shebang runtime and CLI tools locally requires Node.js >=24 <25 and PostgreSQL for durable state tests.

Terminal — Install & Health Check
# Clean install dependencies and build all workspaces
npm ci
npm run build

# Run offline health check (free)
npm run doctor

# Run offline deterministic demo
npm run demo

Core CLI and workspace commands

CommandModeDescription
npm run doctorOffline · FreeChecks Node version, workspace environment, filesystem guard, and configuration health.
npm run demoOffline · FreeSimulates the deterministic task → model → sandbox → build → acceptance loop offline.
npm run pilotOffline · FreeVerifies the pilot flow and budget reservation/settlement steps offline.
npm run pilot -- --liveLive · PaidMakes real E2B sandbox and live model API calls; deducts real budget from the ledger.
npm run uiLocal ServerStarts the local transparency and workspace UI at http://127.0.0.1:55433.
npm run db:dev:startLocal DatabaseStarts the local PostgreSQL instance on 127.0.0.1:55432.
Important · Live execution notice

doctor, demo, and unflagged pilot commands run 100% offline and spend zero API credits. Only the --live flag performs real model and sandbox calls.

Monorepo workspaces and verification tests

The shebang repository consists of four npm workspaces: @sav/runtime (durable task loop, budget ledger, and filesystem guard), @sav/cli (command-line tools), @sav/web (React 19 client and Fastify product server), and @sav/verification-harness (acceptance checks).

Terminal — Verification Suites
# Run all unit and integration tests
npm test

# Critical subsystem suites
npm run test:durable     # Durable state machine and lease recovery
npm run test:budget      # Credit reservation and settlement ledger
npm run test:resume      # Checkpoint resume after interruption
npm run test:scheduler   # Task queue and priority scheduling