Early Access

prisma-to-supabase

Generate production-ready Supabase migrations from your Prisma schema in seconds. Zero config. Auto RLS policies, Realtime publications & Auth helpers.

📋

Reads schema.prisma Directly

No manual mapping. Point at your Prisma project and get Supabase-ready SQL instantly.

🔒

Auto-Generated RLS Policies

Row Level Security policies inferred from your model relations — production-ready from day one.

⚡

Realtime & Auth Ready

Publication setup for Supabase Realtime plus Auth integration helpers, included automatically.

🏠

Runs 100% Locally

No cloud dependency, no blocked domains, no AI hallucinations. Your schema never leaves your machine.

Join 200+ developers on the waitlist

Get launch updates, the lifetime price locked in, and a say in what we build next.

Why not just use...

Featureprisma-to-supabasePrisma MigrateSupabase CLIAI Generators
Source of truth✓ schema.prisma✓ schema.prisma✗ SQL files✗ Prompt-based
Output format✓ Supabase CLI migrations✗ Prisma format✓ Supabase format✗ Inconsistent
RLS policies✓ Auto from relations✗ Manual✓ Manual/diff✗ Hallucinated
Realtime setup✓ Auto publications✗ Manual✓ Manual✗ Often missed
TypeScript types✓ Supabase-compatible✓ Prisma Client✗ Manual✗ Inconsistent
CI/CD friendly✓ No Docker needed✓ Standard✗ Needs Docker✗ Non-deterministic
Deterministic output✓ Same schema = same SQL✓ Yes✓ Yes✗ Never

See the Output

# 1. Install globally
npm install -g prisma-to-supabase

# 2. Run in your Prisma project
npx prisma-to-supabase generate

# 3. Get Supabase-ready migrations
# → supabase/migrations/20240115_initial_schema.sql
# → supabase/migrations/20240115_rls_policies.sql
# → supabase/migrations/20240115_realtime_setup.sql
# → supabase/migrations/20240115_auth_helpers.sql
# → supabase/types/database.ts
-- Generated by prisma-to-supabase

CREATE TABLE "user" (
  "id" UUID PRIMARY KEY NOT NULL DEFAULT gen_random_uuid(),
  "email" TEXT UNIQUE NOT NULL,
  "name" TEXT,
  "createdAt" TIMESTAMPTZ NOT NULL DEFAULT now(),
  "updatedAt" TIMESTAMPTZ NOT NULL
);

CREATE TABLE "post" (
  "id" UUID PRIMARY KEY NOT NULL DEFAULT gen_random_uuid(),
  "title" TEXT NOT NULL,
  "published" BOOLEAN NOT NULL DEFAULT false,
  "authorId" TEXT NOT NULL REFERENCES "user"("id")
);
-- Row Level Security Policies

ALTER TABLE "post" ENABLE ROW LEVEL SECURITY;

CREATE POLICY "Authors can view own posts" ON "post"
  FOR SELECT USING (auth.uid() = author_id);

CREATE POLICY "Authors can insert own posts" ON "post"
  FOR INSERT WITH CHECK (auth.uid() = author_id);

CREATE POLICY "Authors can update own posts" ON "post"
  FOR UPDATE USING (auth.uid() = author_id);
// Supabase-compatible types — generated

export interface User {
  id: string;
  email: string;
  name?: string;
  createdAt: Date;
  updatedAt: Date;
}

export interface Database {
  public: {
    Tables: {
      user: {
        Row: User;
        Insert: Omit<User, 'id' | 'createdAt' | 'updatedAt'>;
        Update: Partial<User>;
      };
    };
  };
}
$29
One-time · Lifetime access
  • CLI tool — unlimited projects
  • Auto RLS policies, Realtime & Auth helpers
  • Supabase-compatible TypeScript types
  • GitHub Actions CI template
  • Priority email support
  • All future updates included
  • No subscription, no seat limits
Get Lifetime Access

Frequently Asked Questions

Does this replace Prisma Migrate?
No — it complements it. Keep using Prisma Migrate for local development. Use prisma-to-supabase when you deploy to Supabase and want Supabase-CLI-compatible migrations with RLS, Realtime and Auth helpers generated automatically.
What Prisma versions are supported?
Prisma 5.x and 6.x. The parser reads schema.prisma directly, so it stays version-agnostic.
Can I customise the generated RLS policies?
Yes. The generated policies are a sensible starting point (owner-based access). Edit the migration files before applying them, or layer on custom policies.
Does it work with Supabase Auth tables?
Yes. It excludes Supabase-managed auth schema tables and only generates migrations for your public schema.
Is the output deterministic?
Completely. The same schema always produces the same SQL. No AI involved, so no variation between runs.
🎯 Built by developers, for developers ⚡ Runs locally, no cloud required 🔒 Your schema never leaves your machine