rtk-ai/rtk

feat: rewrite bunx prisma → rtk prisma (bun runner for Prisma CLI)

Open

#1,401 opened on Apr 19, 2026

View on GitHub
 (1 comment) (0 reactions) (0 assignees)Rust (2,914 forks)batch import
area:clieffort-smallenhancementgood first issuepriority:low

Repository metrics

Stars
 (48,085 stars)
PR merge metrics
 (Avg merge 11d 1h) (45 merged PRs in 30d)

Description

Context

RTK already handles npx prismartk 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 prismartk 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.

Contributor guide