Carabase ships a set of pnpm scripts that wrap shell scripts under scripts/. The shell scripts are the canonical implementation; the pnpm script is just a typed alias.
| Script | What it does |
|---|
pnpm bootstrap | One-command first-run setup: pre-flight checks → install → env scaffold → migrate → seed |
pnpm bootstrap --env <env> | Same, for staging or prod |
pnpm setup:env <env> | Just the env-scaffold step (idempotent; refuses to overwrite without --force) |
pnpm setup:envs | Create + migrate all three databases (idempotent) |
pnpm dev:dev | Run the host against the dev DB with file-watching |
pnpm dev:staging | Same, against staging |
pnpm start:prod | Run the built host against prod |
| Script | What it does |
|---|
pnpm db:generate | Drizzle migration codegen from schema |
pnpm db:migrate | Run migrations against current DATABASE_URL |
pnpm db:migrate:<env> | Run migrations against a specific env |
pnpm db:seed | Tiny 4-entity hand-written CI fixture |
pnpm db:seed:<env> | Same, scoped to an env |
pnpm db:seed:eval | Realistic sam-rivera fixture (~30 entities, ~90 daily notes) |
pnpm db:seed:eval:<env> | Same, scoped (no :prod — refuses) |
pnpm db:reset:dev / :staging | Truncate + reseed |
pnpm db:studio | Drizzle Studio (DB browser) |
There is intentionally no pnpm db:reset:prod. To wipe prod, you have to type CARABASE_I_KNOW=1 ./scripts/with-env.sh prod -- tsx src/db/reset.ts yourself.
| Script | What it does |
|---|
pnpm test | Vitest test suite |
pnpm test:ci | Same with JSON reporter for CI |
pnpm check | Biome lint + format check |
pnpm lint | Biome CI mode (stricter) |
pnpm smoke:mcp | Run the in-memory MCP smoke (every Phase 11–15 capability) |
pnpm smoke:e2e | Full E2E smoke against a throwaway scratch DB |
pnpm smoke:prod --url <host> | Read-only prod smoke against a deployed host |
pnpm eval:agent | Phase 12 agent-eval harness (replays scripted trajectories) |
| Script | What it does |
|---|
pnpm deploy:prod | Backup → pull → migrate → build → restart → smoke → auto-rollback |
pnpm deploy:prod --tag v0.2.0 | Pin to a specific release tag |
pnpm rollback:prod --to <ref> | Manual rollback (no migrations) |
pnpm install-prod-service | Install the launchd LaunchAgent (KeepAlive=true) |
| Script | What it does |
|---|
pnpm backup:dev / :staging / :prod | Encrypted nightly backup |
pnpm backup:prune <env> | Apply 7d / 4w / 3m retention policy |
pnpm backup:status | Report age of latest backup per env. Non-zero exit if any FAIL |
pnpm backup:restore <env> <file> | Interactive restore. Production guardrail in place |
pnpm backup:install-cron <env> | Install the launchd backup cron (03:17 nightly) |
| Script | What it does |
|---|
pnpm build | Build admin SPA + TypeScript compilation |
pnpm build:admin | Build just the Admin SPA |
pnpm docs:dev | Local dev server for the docs site (this site) |
pnpm docs:build | Production build of the docs site |
| Script | What it does |
|---|
./scripts/gen-secret.sh [bytes] | Print a fresh hex secret (default 32 bytes / 256 bits) |
./scripts/agent-pickup.sh <issue> | Headless issue-to-PR automation |
./scripts/auto-fix.sh | Autonomous test-failure repair loop |