Skip to content

Conversation

@AmanVarshney01
Copy link
Member

@AmanVarshney01 AmanVarshney01 commented Dec 22, 2025

Summary by CodeRabbit

  • Documentation
    • Updated Prisma CLI command examples to use bunx with --bun flag for Bun users
    • Added clarification on --bun flag ensuring proper Bun runtime usage
    • Simplified configuration by removing unnecessary dotenv imports with Bun
    • Updated command syntax references across guides and reference documentation

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 22, 2025

Walkthrough

This PR updates Prisma CLI invocations across documentation to standardize Bun runtime usage by adding the --bun flag to all bunx prisma commands. It also updates prisma.config.ts examples to remove the dotenv/config import (unnecessary in Bun) and add seed configuration for the Bun guide.

Changes

Cohort / File(s) Summary
Bun runtime flag standardization
content/200-orm/400-tools/05-prisma-cli.mdx, content/200-orm/500-reference/325-prisma-config-reference.mdx, content/800-guides/370-bun.mdx, content/800-guides/440-elysia.mdx
Updated all Bun-based Prisma CLI commands from bunx prisma to bunx --bun prisma. Added explanatory notes clarifying that the --bun flag explicitly runs Prisma with Bun runtime; without it, Prisma falls back to Node.js due to the CLI shebang.
Bun-specific Prisma configuration
content/800-guides/370-bun.mdx
Removed the dotenv/config import from prisma.config.ts example (Bun automatically loads .env files). Added seed configuration under migrations with value bun run prisma/seed.ts. Included note explaining dotenv removal for Bun.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

This is a highly homogeneous set of changes: consistent pattern replacements across documentation files with no logic complexity or structural modifications. The updates are straightforward CLI syntax changes and configuration adjustments specific to Bun runtime behavior.

Possibly related PRs

  • docs(): more v7 updates #7333 — Introduces migrations.seed property in prisma.config.ts, directly overlapping with the seed configuration added in this PR.
  • docs: update nuxt guide #7387 — Adds migrations.seed configuration to prisma.config.ts, sharing the same configuration surface changes.
  • feat: add bun guide #7092 — Modifies the Bun guide and updates prisma.config.ts seed setup, creating direct overlap with this PR's Bun-specific changes.

Pre-merge checks

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures the main changes: updating Prisma CLI invocations across multiple documentation files to use bunx --bun and adding Bun-specific configuration guidance.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Contributor

Dangerous URL check

No absolute URLs to prisma.io/docs found.
No local URLs found.

@github-actions
Copy link
Contributor

Redirect check

This PR probably requires the following redirects to be added to static/_redirects:

  • This PR does not change any pages in a way that would require a redirect.

@github-actions
Copy link
Contributor

🍈 Lychee Link Check Report

Note: Links are cached for 5 minutes. Failed links (timeouts, rate limits) are retried in a second run with longer timeout.

📊 Results Overview

Status Count
🔍 Total 2276
✅ Successful 2241
⏳ Timeouts 0
🔀 Redirected 6
👻 Excluded 24
❓ Unknown 0
🚫 Errors 4
⛔ Unsupported 1

Errors per input

Errors in 200-orm/800-more/350-ai-tools/100-cursor.mdx

Errors in 800-guides/380-vercel-app-deployment.mdx

@cloudflare-workers-and-pages
Copy link

Deploying docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0b1d3e8
Status: ✅  Deploy successful!
Preview URL: https://836da326.docs-51g.pages.dev
Branch Preview URL: https://dr-6458-use-bun-bun-run-pris.docs-51g.pages.dev

View logs

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
content/200-orm/500-reference/325-prisma-config-reference.mdx (1)

747-775: Consider adding bunx command examples for completeness.

The section heading mentions both npx prisma and bunx --bun prisma, but all the examples (lines 760, 768, 775) only show npx commands. While the current approach is acceptable since the heading makes it clear the behavior applies to both, adding corresponding bunx --bun examples would improve clarity.

Optional: Add bunx examples alongside npx

For example, at line 760:

 Example run from the project root:
 
 ```bash
 npx prisma validate
+# or with Bun:
+bunx --bun prisma validate
 # → Works as expected

And similarly for lines 768 and 775.
</details>

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used**: Path: .coderabbit.yaml

**Review profile**: CHILL

**Plan**: Pro

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between fc2b71945b99e4100f86ad37c18414ab7e0280b7 and 0b1d3e80590d33d7eb3db5aaa165cec9cce59e48.

</details>

<details>
<summary>📒 Files selected for processing (4)</summary>

* `content/200-orm/400-tools/05-prisma-cli.mdx`
* `content/200-orm/500-reference/325-prisma-config-reference.mdx`
* `content/800-guides/370-bun.mdx`
* `content/800-guides/440-elysia.mdx`

</details>

<details>
<summary>⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)</summary>

* GitHub Check: Check internal links
* GitHub Check: Cloudflare Pages

</details>

<details>
<summary>🔇 Additional comments (5)</summary><blockquote>

<details>
<summary>content/800-guides/370-bun.mdx (3)</summary><blockquote>

`60-67`: **LGTM! Consistent update with clear explanation.**

The addition of the `--bun` flag to the `prisma init` command is correct, and the accompanying note clearly explains why it's necessary. This matches the guidance provided throughout the PR.

---

`210-224`: **LGTM! Correct seed configuration for Bun.**

The seed script configuration using `bun run prisma/seed.ts` is appropriate for the Bun runtime. The example correctly omits the `import 'dotenv/config'` line since Bun auto-loads environment variables, which aligns with the guidance in the note below.

---

`227-231`: **LGTM! Helpful clarification for Bun users.**

The note clearly explains that Bun auto-loads `.env` files and that the `dotenv/config` import (which `prisma init` generates) can be safely removed. This is valuable guidance that helps Bun users understand the difference from Node.js behavior.

</blockquote></details>
<details>
<summary>content/200-orm/400-tools/05-prisma-cli.mdx (1)</summary><blockquote>

`76-83`: **LGTM! Clean and consistent update.**

The update to include the `--bun` flag in the Bun usage example is correct, and the accompanying note clearly explains the requirement. This change is consistent with the Bun-specific guidance throughout the PR.

</blockquote></details>
<details>
<summary>content/800-guides/440-elysia.mdx (1)</summary><blockquote>

`55-55`: **LGTM! Comprehensive and consistent updates across all Prisma commands.**

All `bunx prisma` commands have been correctly updated to `bunx --bun prisma` throughout this guide:
- Line 55: `init` command
- Line 114: `migrate dev` command  
- Line 115: `generate` command
- Line 166: `db seed` command
- Line 172: `studio` command

The changes are consistent with the Bun-specific guidance introduced in the other documentation files. While this guide doesn't include explanatory notes (unlike the Bun and reference guides), this is appropriate for an integration guide where readers are assumed to be familiar with the basic Bun setup.




Also applies to: 114-115, 166-166, 172-172

</blockquote></details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

@AmanVarshney01 AmanVarshney01 merged commit 85e7a8d into main Dec 22, 2025
7 of 8 checks passed
@AmanVarshney01 AmanVarshney01 deleted the dr-6458-use-bun-bun-run-prisma-init-instead-of-bun-prisma-init-to branch December 22, 2025 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants