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.
# 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 demoCore CLI and workspace commands
| Command | Mode | Description |
|---|---|---|
| npm run doctor | Offline · Free | Checks Node version, workspace environment, filesystem guard, and configuration health. |
| npm run demo | Offline · Free | Simulates the deterministic task → model → sandbox → build → acceptance loop offline. |
| npm run pilot | Offline · Free | Verifies the pilot flow and budget reservation/settlement steps offline. |
| npm run pilot -- --live | Live · Paid | Makes real E2B sandbox and live model API calls; deducts real budget from the ledger. |
| npm run ui | Local Server | Starts the local transparency and workspace UI at http://127.0.0.1:55433. |
| npm run db:dev:start | Local Database | Starts 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).
# 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