A local baby of
your production stack.
Every test run and every AI-agent session gets its own fresh, seeded, disposable copy of your app's real backing services — spun up in Docker, thrown away after. Not mocks. Not an emulator. Real MySQL today; more engines next.
Describe your backend once in babystack.config.ts. Your tests just read DATABASE_URL — they never import babystack.
# the agent loop — wake · home · break · reset, on repeat
Delete your test-database plumbing.
A real engine, isolated per worker, seeded from a baseline built once — instead of a shared dev DB you truncate by hand, or mocks that quietly drift from production.
- ✕ A shared dev database every suite races to reset
-
✕
beforeEachtruncation that forgets a table - ✕ Mocks that pass while production would 500
- ✕ Lifecycle glue copy-pasted across repos
-
✓
One
babystack.config.ts— the migrate/seed you already run -
✓
Three lines in
vitest.config.ts, zero test-code changes - ✓ A fresh, seeded, isolated real MySQL per worker
- ✓ Gone after the run — nothing to clean up
// vitest.config.ts — the whole integration test: { globalSetup: ['@babystack/vitest/global-setup'], setupFiles: ['@babystack/vitest/setup'], }
A real backend an agent can break — and undo.
The baby CLI hands an agent a persistent, seeded
MySQL that survives across commands, plus a one-word reset back to pristine. The
connection URL never changes — so it experiments, checks, and wipes as many times as it
needs.
# a coding agent breaks a real DB, then undoes it — same URL, no cleanup
Provision + seed a real MySQL and leave it running. Rediscovered across commands by a per-project label — no daemon, no state file.
Export a DATABASE_URL for the seeded database.
Non-destructive — run it as often as you like.
Reload the pristine baseline in place — same URL, no container re-provision. The agent's undo button.
One engine, small pieces.
A pure core with pluggable seams; adapters that orchestrate the real engine and never emulate it. MySQL + Vitest is the first delivery vehicle.
mysql:8.4 — a seeded mysqldump baseline,
then a fresh leased database per worker.
baby binary (operator + agent surface):
doctor · wake · home · reset · sleep, all
--json.
Orchestrate & delegate, never emulate. Your app talks to a real MySQL server over a normal connection string — it can't tell it's in a test. No in-memory fake, no reimplemented wire protocol.
Try it today.
Now on npm (v0.1.0). With Docker running, the runnable proof is a real Express + Drizzle + MySQL app whose tests hit fresh, seeded, isolated real MySQL — with zero babystack imports in the test code.
# clone + install (pnpm) git clone https://github.com/babystack/babystack && cd babystack pnpm install # with Docker running — the example app's suite against real MySQL: pnpm --filter users-api test