rtk-ai/rtk

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

Open

#1,401 建立於 2026年4月19日

在 GitHub 查看
 (1 留言) (0 反應) (0 負責人)Rust (48,085 star) (2,914 fork)batch import
effort-smallenhancementgood first issue

描述

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.

貢獻者指南

feat: rewrite bunx prisma → rtk prisma (bun runner for Prisma CLI) · rtk-ai/rtk#1401 | Good First Issue