{"slug": "show-hn-supapool-a-supabase-per-coding-agent-in-400-ms", "title": "Show HN: Supapool – a Supabase per coding agent in ~400 ms", "summary": "Supapool launches a CLI tool that spins up a clean, isolated Supabase instance per coding agent in approximately 400 milliseconds, injecting real Postgres, Auth, and S3-compatible Storage credentials into any wrapped command. The tool is free during beta and designed for parallel agent workflows, eliminating database conflicts and the cost of branching. Founder agent@supapool.io offers immediate automated support via email.", "body_md": "## How it works\n\n```\nnpx @supapool/cli run -- npm run dev\n```\n\nWrap any command. Supapool leases a clean instance, injects its credentials, keeps it alive, and releases it when the command exits.\n\n## Why\n\n**Real Supabase.** Postgres, Auth, and S3-compatible Storage.**Parallel agents need this.** Agents never wipe each other's databases mid-run.**No mocks.** Test migrations and database operations against a real, isolated Supabase stack without touching production.**Branching is slow and expensive.** Branches can take minutes to create and bill as if they were production instances.**Colocated.** Instances are ephemeral, so they spin up close to where your agent is doing the work instead of living in a fixed home region.**CLI-only.** There is no dashboard. Accounts, usage, and cost are exposed through the CLI and API, built for agent ergonomics, so you can pipe everything straight into your company brain.**Free during beta.** Email agent@supapool.io for an immediate automated response with a fix or a request for the information needed to solve it.\n\n## Docs\n\n### Commands\n\nThe CLI has two commands.\n\n```\nnpx @supapool/cli login\nnpx @supapool/cli run -- <command>\n```\n\n`login`\n\nopens GitHub sign-in and saves an API key to `~/.config/supapool/config.json`\n\n. `run`\n\ndoes the same sign-in on first use, so most people never run `login`\n\ndirectly.\n\n`run`\n\nacquires a clean instance, applies every `.sql`\n\nfile in `supabase/migrations`\n\nin filename order, starts your command with the instance credentials in its environment, renews the lease while the command is alive, and releases the instance when it exits. Your repository's environment files are never modified.\n\n### What gets injected\n\nThe wrapped command receives standard Supabase variables: `SUPABASE_URL`\n\n, `SUPABASE_ANON_KEY`\n\n, `SUPABASE_SERVICE_ROLE_KEY`\n\n, and `DATABASE_URL`\n\n. The same values are mirrored to the current publishable and secret key names, the public prefixes used by Next.js, Vite, Astro, Svelte, Expo, Create React App, Gatsby, and Nuxt, Prisma and Postgres URL aliases, and the standard `PG*`\n\nconnection variables. Secret keys are never assigned to browser-public variables. `SUPAPOOL_INSTANCE_ID`\n\nidentifies the lease.\n\n### Leases\n\nEvery instance is a lease with a TTL, 30 minutes by default. The CLI renews it every 5 minutes while your command runs. When the command exits, or if the process dies and renewals stop, the lease expires and the slot is wiped and returned to the pool. Nothing you store in an instance survives release, so treat every run as disposable.\n\n### CI\n\nCI jobs skip the browser login. Sign in once on a laptop, copy the key from `~/.config/supapool/config.json`\n\ninto a CI secret, and set it as `SUPAPOOL_API_KEY`\n\n:\n\n```\nSUPAPOOL_API_KEY=sp_live_... npx @supapool/cli run -- pnpm test\n```\n\n### Use it from code\n\nThe npm package is also a library. `withInstance`\n\nacquires a lease, renews it while your callback runs, and always releases it, even when the callback throws:\n\n``` js\nimport { withInstance } from '@supapool/cli'\n\nawait withInstance(async (instance) => {\n  const { SUPABASE_URL, SUPABASE_ANON_KEY, DATABASE_URL } = instance.env\n  // run tests, seed data, exercise the real stack\n})\n```\n\nThe lifecycle primitives `acquire`\n\n, `renew`\n\n, `release`\n\n, and `startRenewer`\n\nare exported for code that manages its own lease boundaries. See the [package README](https://www.npmjs.com/package/@supapool/cli) for the full API.", "url": "https://wpnews.pro/news/show-hn-supapool-a-supabase-per-coding-agent-in-400-ms", "canonical_source": "https://supapool.io/", "published_at": "2026-07-29 17:34:35+00:00", "updated_at": "2026-07-30 19:37:33.479599+00:00", "lang": "en", "topics": ["developer-tools", "ai-agents", "ai-infrastructure"], "entities": ["Supapool", "Supabase", "Postgres", "Auth", "S3"], "alternates": {"html": "https://wpnews.pro/news/show-hn-supapool-a-supabase-per-coding-agent-in-400-ms", "markdown": "https://wpnews.pro/news/show-hn-supapool-a-supabase-per-coding-agent-in-400-ms.md", "text": "https://wpnews.pro/news/show-hn-supapool-a-supabase-per-coding-agent-in-400-ms.txt", "jsonld": "https://wpnews.pro/news/show-hn-supapool-a-supabase-per-coding-agent-in-400-ms.jsonld"}}