feat: rewrite bunx prisma → rtk prisma (bun runner for Prisma CLI)
#1401 opened on Apr 19, 2026
Description
Context
RTK already handles npx prisma → rtk prisma. When using Bun as the runtime, the equivalent invocation is bunx prisma — but the hook doesn't rewrite it, so output lands unfiltered.
Usage data (rtk discover, 30-day scan, 13,730 Bash calls)
| Command | Monthly runs | Example |
|---|---|---|
bunx prisma |
45 | bunx prisma migrate dev --name add_venue_col |
Expected behavior
The hook rewrite registry should map bunx prisma → rtk prisma, identical to how npx prisma is already handled.
bunx prisma is semantically equivalent to npx prisma — same CLI, same output format, same subcommands (migrate dev, migrate deploy, migrate status, generate, db seed, studio). No new output-filtering logic is needed; just a new rewrite rule pointing at the existing Prisma handler.
Proposed rewrite rules
bunx prisma migrate dev → rtk prisma migrate dev
bunx prisma migrate deploy → rtk prisma migrate deploy
bunx prisma migrate status → rtk prisma migrate status
bunx prisma generate → rtk prisma generate
bunx prisma db seed → rtk prisma db seed
bunx prisma studio → rtk prisma studio
Or simply: bunx prisma <subcmd> → rtk prisma <subcmd> as a prefix match.
Stack context
Bun 1.2.19 + Elysia.js + Prisma + PostgreSQL monorepo. We run bunx prisma migrate dev and bunx prisma migrate deploy heavily during development and CI. Currently 45 calls/month flow through unoptimized because the rewrite rule only covers npx prisma.
RTK already has the hard part (Prisma output filtering). This is just a hook wiring change.