Supapool: Real Supabase for parallel coding agents

1 min read
coding-agentsparallel-agentssupabaseci-cd
View as Markdown
Originally from supapool.io
View source

My notes

Summary

Supapool is a CLI (npx @supapool/cli run -- <command>) that leases a clean, real Supabase instance (Postgres, Auth, S3-compatible Storage) per command run, injects the credentials as env vars, keeps the lease alive while the command runs, and wipes/releases the instance on exit. It is built specifically so multiple coding agents running in parallel do not collide on a shared database or wait on slow, billable branch creation.

Key Insight

  • Problem it targets: when several coding agents (or CI jobs) run tests against the same Supabase project simultaneously, they stomp on each other’s data. Supabase’s own branching feature is the usual fix but is slow (minutes to spin up) and billed like a production instance.
  • Mechanics: run applies every .sql file in supabase/migrations in filename order to a fresh instance, then starts the wrapped command with credentials injected: SUPABASE_URL, SUPABASE_ANON_KEY, SUPABASE_SERVICE_ROLE_KEY, DATABASE_URL, plus mirrored names for Next.js/Vite/Astro/Svelte/Expo/CRA/Gatsby/Nuxt public-prefix conventions, Prisma/Postgres URL aliases, and standard PG* vars. Secret keys are never assigned to browser-public variable names.
  • Leases are ephemeral by design: 30-minute TTL by default, renewed every 5 minutes while the command runs, wiped and returned to the pool on exit or if the process dies. Nothing persists across a run, so every instance is disposable rather than a durable dev database.
  • Instances are colocated near the agent doing the work rather than pinned to a fixed region, since they are throwaway.
  • CLI-only, no dashboard: usage, cost and account data come through the CLI and API, aimed at piping into automated workflows rather than a human checking a UI.
  • Also ships as an npm library (withInstance, plus acquire/renew/release/startRenewer primitives) for code that wants to manage lease boundaries directly rather than shelling out.
  • Free during beta, and support runs through an email address that auto-responds with a fix or a request for more info, itself an agent-first support pattern worth noting.