From 3a34356d3d8074ce50b7d40ecfb2624b47ab7ab6 Mon Sep 17 00:00:00 2001 From: Aman Varshney Date: Wed, 8 Apr 2026 16:47:19 +0200 Subject: [PATCH 1/4] docs(guides): add create-prisma quick start to framework guides Adds a ## Quick start section at the top of each framework guide and the guides index, so users can scaffold a working project in one command with npx create-prisma@latest --template . Co-Authored-By: Claude Sonnet 4.6 --- apps/docs/content/docs/guides/frameworks/astro.mdx | 10 ++++++++++ apps/docs/content/docs/guides/frameworks/elysia.mdx | 10 ++++++++++ apps/docs/content/docs/guides/frameworks/hono.mdx | 10 ++++++++++ apps/docs/content/docs/guides/frameworks/nestjs.mdx | 10 ++++++++++ apps/docs/content/docs/guides/frameworks/nextjs.mdx | 10 ++++++++++ apps/docs/content/docs/guides/frameworks/nuxt.mdx | 10 ++++++++++ apps/docs/content/docs/guides/frameworks/sveltekit.mdx | 10 ++++++++++ .../content/docs/guides/frameworks/tanstack-start.mdx | 10 ++++++++++ apps/docs/content/docs/guides/index.mdx | 10 +++++++++- 9 files changed, 89 insertions(+), 1 deletion(-) diff --git a/apps/docs/content/docs/guides/frameworks/astro.mdx b/apps/docs/content/docs/guides/frameworks/astro.mdx index 855a803f1a..6aa39e050c 100644 --- a/apps/docs/content/docs/guides/frameworks/astro.mdx +++ b/apps/docs/content/docs/guides/frameworks/astro.mdx @@ -13,6 +13,16 @@ Prisma ORM offers type-safe database access, and [Astro](https://astro.build/) i In this guide, you'll learn to integrate Prisma ORM with a Prisma Postgres database in an Astro project from scratch. You can find a complete example of this guide on [GitHub](https://github.com/prisma/prisma-examples/tree/latest/orm/astro). +## Quick start + +Run one command to scaffold an Astro project with Prisma ORM and Prisma Postgres ready to go: + +```bash +npx create-prisma@latest --template astro +``` + +Or follow the steps below to set it up manually. + ## Prerequisites - [Node.js 20+](https://nodejs.org) diff --git a/apps/docs/content/docs/guides/frameworks/elysia.mdx b/apps/docs/content/docs/guides/frameworks/elysia.mdx index 214c2b2d3a..95e96488fa 100644 --- a/apps/docs/content/docs/guides/frameworks/elysia.mdx +++ b/apps/docs/content/docs/guides/frameworks/elysia.mdx @@ -13,6 +13,16 @@ metaDescription: Learn how to use Prisma ORM in an Elysia app In this guide, you'll learn to integrate Prisma ORM with a Prisma Postgres database in an Elysia application. You can find a complete example of this guide on [GitHub](https://github.com/prisma/prisma-examples/tree/latest/orm/elysia). +## Quick start + +Run one command to scaffold an Elysia project with Prisma ORM and Prisma Postgres ready to go: + +```bash +npx create-prisma@latest --template elysia +``` + +Or follow the steps below to set it up manually. + ## Prerequisites - [Bun](https://bun.sh/docs/installation) installed on your system diff --git a/apps/docs/content/docs/guides/frameworks/hono.mdx b/apps/docs/content/docs/guides/frameworks/hono.mdx index 109a55ef60..0a90bf0bb3 100644 --- a/apps/docs/content/docs/guides/frameworks/hono.mdx +++ b/apps/docs/content/docs/guides/frameworks/hono.mdx @@ -13,6 +13,16 @@ Prisma ORM offers type-safe database access, and [Hono](https://hono.dev/) is bu In this guide, you'll learn to integrate Prisma ORM with a Prisma Postgres database in a Hono backend application. You can find a complete example of this guide on [GitHub](https://github.com/prisma/prisma-examples/tree/latest/orm/hono). +## Quick start + +Run one command to scaffold a Hono project with Prisma ORM and Prisma Postgres ready to go: + +```bash +npx create-prisma@latest --template hono +``` + +Or follow the steps below to set it up manually. + ## Prerequisites - [Node.js 20+](https://nodejs.org) diff --git a/apps/docs/content/docs/guides/frameworks/nestjs.mdx b/apps/docs/content/docs/guides/frameworks/nestjs.mdx index f1cfbd3d75..29ff3f65c9 100644 --- a/apps/docs/content/docs/guides/frameworks/nestjs.mdx +++ b/apps/docs/content/docs/guides/frameworks/nestjs.mdx @@ -17,6 +17,16 @@ While Prisma can be used with plain JavaScript, it embraces TypeScript and provi You can find a ready-to-run example [here](https://github.com/prisma/prisma-examples/tree/latest/orm/nest) +## Quick start + +Run one command to scaffold a NestJS project with Prisma ORM and Prisma Postgres ready to go: + +```bash +npx create-prisma@latest --template nestjs +``` + +Or follow the steps below to set it up manually. + ## Prerequisites - [Node.js 20+](https://nodejs.org) diff --git a/apps/docs/content/docs/guides/frameworks/nextjs.mdx b/apps/docs/content/docs/guides/frameworks/nextjs.mdx index 030f8a86cb..eff3e88c99 100644 --- a/apps/docs/content/docs/guides/frameworks/nextjs.mdx +++ b/apps/docs/content/docs/guides/frameworks/nextjs.mdx @@ -14,6 +14,16 @@ This guide shows you how to use Prisma with Next.js, a fullstack React framework You can find a [deployment-ready example on GitHub](https://github.com/prisma/prisma-examples/blob/latest/orm/nextjs). +## Quick start + +Run one command to scaffold a Next.js project with Prisma ORM and Prisma Postgres ready to go: + +```bash +npx create-prisma@latest --template next +``` + +Or follow the steps below to set it up manually. + ## Prerequisites - [Node.js](https://nodejs.org) v20.19+, v22.12+, or v24.0+ diff --git a/apps/docs/content/docs/guides/frameworks/nuxt.mdx b/apps/docs/content/docs/guides/frameworks/nuxt.mdx index 7343293bc4..05cec4ed1f 100644 --- a/apps/docs/content/docs/guides/frameworks/nuxt.mdx +++ b/apps/docs/content/docs/guides/frameworks/nuxt.mdx @@ -10,6 +10,16 @@ aiPrompt: "nuxt" This guide shows you how to set up Prisma ORM in a Nuxt application with [Prisma Postgres](https://prisma.io/postgres). +## Quick start + +Run one command to scaffold a Nuxt project with Prisma ORM and Prisma Postgres ready to go: + +```bash +npx create-prisma@latest --template nuxt +``` + +Or follow the steps below to set it up manually. + ## Prerequisites - Node.js 18+ diff --git a/apps/docs/content/docs/guides/frameworks/sveltekit.mdx b/apps/docs/content/docs/guides/frameworks/sveltekit.mdx index 4ed497703e..1740add533 100644 --- a/apps/docs/content/docs/guides/frameworks/sveltekit.mdx +++ b/apps/docs/content/docs/guides/frameworks/sveltekit.mdx @@ -13,6 +13,16 @@ Prisma ORM simplifies database access with type-safe queries, and when paired wi In this guide, you'll learn to integrate Prisma ORM with a Prisma Postgres database in a SvelteKit project from scratch. You can find a complete example of this guide on [GitHub](https://github.com/prisma/prisma-examples/tree/latest/orm/sveltekit). +## Quick start + +Run one command to scaffold a SvelteKit project with Prisma ORM and Prisma Postgres ready to go: + +```bash +npx create-prisma@latest --template svelte +``` + +Or follow the steps below to set it up manually. + ## Prerequisites - [Node.js 20+](https://nodejs.org) diff --git a/apps/docs/content/docs/guides/frameworks/tanstack-start.mdx b/apps/docs/content/docs/guides/frameworks/tanstack-start.mdx index 7d0ed47431..b584a66a4b 100644 --- a/apps/docs/content/docs/guides/frameworks/tanstack-start.mdx +++ b/apps/docs/content/docs/guides/frameworks/tanstack-start.mdx @@ -13,6 +13,16 @@ Prisma ORM simplifies database interactions, and [TanStack Start](https://tansta This guide will walk you through integrating Prisma ORM with a Prisma Postgres database in a TanStack Start project from scratch. +## Quick start + +Run one command to scaffold a TanStack Start project with Prisma ORM and Prisma Postgres ready to go: + +```bash +npx create-prisma@latest --template tanstack-start +``` + +Or follow the steps below to set it up manually. + ## Prerequisites - [Node.js 20+](https://nodejs.org) diff --git a/apps/docs/content/docs/guides/index.mdx b/apps/docs/content/docs/guides/index.mdx index f19cfd0c21..b14b3358d4 100644 --- a/apps/docs/content/docs/guides/index.mdx +++ b/apps/docs/content/docs/guides/index.mdx @@ -8,7 +8,15 @@ metaDescription: A collection of guides for various tasks and workflows. Welcome to the Guides section! Here you'll find practical, step-by-step guides to help you accomplish specific tasks with Prisma products, including Prisma ORM, Prisma Accelerate, Prisma Postgres, and more. -Browse through our guides using the sidebar navigation or use the search to find specific topics. +## Quick start + +Scaffold a new project with Prisma ORM and Prisma Postgres already set up: + +```bash +npx create-prisma@latest +``` + +Pick your framework and options from the prompts. To skip prompts use `--yes`, to set a framework upfront use `--template` (`next`, `hono`, `svelte`, `astro`, `nuxt`, `tanstack-start`, `nestjs`, `elysia`, `turborepo`). ## Getting started From 9afaf1c0681a3ef21f1986d590c366773c7286f1 Mon Sep 17 00:00:00 2001 From: Aman Varshney Date: Thu, 9 Apr 2026 10:38:41 +0200 Subject: [PATCH 2/4] docs(guides): use npm code blocks for create-prisma commands Switches quick start code blocks from bash to npm so the docs auto-generate pnpm/yarn/bun equivalents. Updates commands to npm create prisma@latest --template . Co-Authored-By: Claude Sonnet 4.6 --- apps/docs/content/docs/guides/frameworks/astro.mdx | 4 ++-- apps/docs/content/docs/guides/frameworks/elysia.mdx | 4 ++-- apps/docs/content/docs/guides/frameworks/hono.mdx | 4 ++-- apps/docs/content/docs/guides/frameworks/nestjs.mdx | 4 ++-- apps/docs/content/docs/guides/frameworks/nextjs.mdx | 4 ++-- apps/docs/content/docs/guides/frameworks/nuxt.mdx | 4 ++-- apps/docs/content/docs/guides/frameworks/sveltekit.mdx | 4 ++-- apps/docs/content/docs/guides/frameworks/tanstack-start.mdx | 4 ++-- apps/docs/content/docs/guides/index.mdx | 4 ++-- 9 files changed, 18 insertions(+), 18 deletions(-) diff --git a/apps/docs/content/docs/guides/frameworks/astro.mdx b/apps/docs/content/docs/guides/frameworks/astro.mdx index 6aa39e050c..ec46538ef5 100644 --- a/apps/docs/content/docs/guides/frameworks/astro.mdx +++ b/apps/docs/content/docs/guides/frameworks/astro.mdx @@ -17,8 +17,8 @@ In this guide, you'll learn to integrate Prisma ORM with a Prisma Postgres datab Run one command to scaffold an Astro project with Prisma ORM and Prisma Postgres ready to go: -```bash -npx create-prisma@latest --template astro +```npm +npm create prisma@latest --template astro ``` Or follow the steps below to set it up manually. diff --git a/apps/docs/content/docs/guides/frameworks/elysia.mdx b/apps/docs/content/docs/guides/frameworks/elysia.mdx index 95e96488fa..5e27f0ce18 100644 --- a/apps/docs/content/docs/guides/frameworks/elysia.mdx +++ b/apps/docs/content/docs/guides/frameworks/elysia.mdx @@ -17,8 +17,8 @@ In this guide, you'll learn to integrate Prisma ORM with a Prisma Postgres datab Run one command to scaffold an Elysia project with Prisma ORM and Prisma Postgres ready to go: -```bash -npx create-prisma@latest --template elysia +```npm +npm create prisma@latest --template elysia ``` Or follow the steps below to set it up manually. diff --git a/apps/docs/content/docs/guides/frameworks/hono.mdx b/apps/docs/content/docs/guides/frameworks/hono.mdx index 0a90bf0bb3..0556e94987 100644 --- a/apps/docs/content/docs/guides/frameworks/hono.mdx +++ b/apps/docs/content/docs/guides/frameworks/hono.mdx @@ -17,8 +17,8 @@ In this guide, you'll learn to integrate Prisma ORM with a Prisma Postgres datab Run one command to scaffold a Hono project with Prisma ORM and Prisma Postgres ready to go: -```bash -npx create-prisma@latest --template hono +```npm +npm create prisma@latest --template hono ``` Or follow the steps below to set it up manually. diff --git a/apps/docs/content/docs/guides/frameworks/nestjs.mdx b/apps/docs/content/docs/guides/frameworks/nestjs.mdx index 29ff3f65c9..574d92f639 100644 --- a/apps/docs/content/docs/guides/frameworks/nestjs.mdx +++ b/apps/docs/content/docs/guides/frameworks/nestjs.mdx @@ -21,8 +21,8 @@ You can find a ready-to-run example [here](https://github.com/prisma/prisma-exam Run one command to scaffold a NestJS project with Prisma ORM and Prisma Postgres ready to go: -```bash -npx create-prisma@latest --template nestjs +```npm +npm create prisma@latest --template nestjs ``` Or follow the steps below to set it up manually. diff --git a/apps/docs/content/docs/guides/frameworks/nextjs.mdx b/apps/docs/content/docs/guides/frameworks/nextjs.mdx index eff3e88c99..4016265667 100644 --- a/apps/docs/content/docs/guides/frameworks/nextjs.mdx +++ b/apps/docs/content/docs/guides/frameworks/nextjs.mdx @@ -18,8 +18,8 @@ You can find a [deployment-ready example on GitHub](https://github.com/prisma/pr Run one command to scaffold a Next.js project with Prisma ORM and Prisma Postgres ready to go: -```bash -npx create-prisma@latest --template next +```npm +npm create prisma@latest --template next ``` Or follow the steps below to set it up manually. diff --git a/apps/docs/content/docs/guides/frameworks/nuxt.mdx b/apps/docs/content/docs/guides/frameworks/nuxt.mdx index 05cec4ed1f..1ad8ec07e3 100644 --- a/apps/docs/content/docs/guides/frameworks/nuxt.mdx +++ b/apps/docs/content/docs/guides/frameworks/nuxt.mdx @@ -14,8 +14,8 @@ This guide shows you how to set up Prisma ORM in a Nuxt application with [Prisma Run one command to scaffold a Nuxt project with Prisma ORM and Prisma Postgres ready to go: -```bash -npx create-prisma@latest --template nuxt +```npm +npm create prisma@latest --template nuxt ``` Or follow the steps below to set it up manually. diff --git a/apps/docs/content/docs/guides/frameworks/sveltekit.mdx b/apps/docs/content/docs/guides/frameworks/sveltekit.mdx index 1740add533..4209dedee9 100644 --- a/apps/docs/content/docs/guides/frameworks/sveltekit.mdx +++ b/apps/docs/content/docs/guides/frameworks/sveltekit.mdx @@ -17,8 +17,8 @@ In this guide, you'll learn to integrate Prisma ORM with a Prisma Postgres datab Run one command to scaffold a SvelteKit project with Prisma ORM and Prisma Postgres ready to go: -```bash -npx create-prisma@latest --template svelte +```npm +npm create prisma@latest --template svelte ``` Or follow the steps below to set it up manually. diff --git a/apps/docs/content/docs/guides/frameworks/tanstack-start.mdx b/apps/docs/content/docs/guides/frameworks/tanstack-start.mdx index b584a66a4b..4f81e1c3c2 100644 --- a/apps/docs/content/docs/guides/frameworks/tanstack-start.mdx +++ b/apps/docs/content/docs/guides/frameworks/tanstack-start.mdx @@ -17,8 +17,8 @@ This guide will walk you through integrating Prisma ORM with a Prisma Postgres d Run one command to scaffold a TanStack Start project with Prisma ORM and Prisma Postgres ready to go: -```bash -npx create-prisma@latest --template tanstack-start +```npm +npm create prisma@latest --template tanstack-start ``` Or follow the steps below to set it up manually. diff --git a/apps/docs/content/docs/guides/index.mdx b/apps/docs/content/docs/guides/index.mdx index b14b3358d4..a6e057d6fc 100644 --- a/apps/docs/content/docs/guides/index.mdx +++ b/apps/docs/content/docs/guides/index.mdx @@ -12,8 +12,8 @@ Welcome to the Guides section! Here you'll find practical, step-by-step guides t Scaffold a new project with Prisma ORM and Prisma Postgres already set up: -```bash -npx create-prisma@latest +```npm +npm create prisma@latest ``` Pick your framework and options from the prompts. To skip prompts use `--yes`, to set a framework upfront use `--template` (`next`, `hono`, `svelte`, `astro`, `nuxt`, `tanstack-start`, `nestjs`, `elysia`, `turborepo`). From 385dcd4ae0c8d73513bad8d3681364d5454ebc56 Mon Sep 17 00:00:00 2001 From: Aman Varshney Date: Thu, 9 Apr 2026 10:41:07 +0200 Subject: [PATCH 3/4] fix(guides): restore -- separator in npm create prisma commands npm passes args before -- to itself; the -- is required for --template to reach create-prisma correctly. Co-Authored-By: Claude Sonnet 4.6 --- apps/docs/content/docs/guides/frameworks/astro.mdx | 2 +- apps/docs/content/docs/guides/frameworks/elysia.mdx | 2 +- apps/docs/content/docs/guides/frameworks/hono.mdx | 2 +- apps/docs/content/docs/guides/frameworks/nestjs.mdx | 2 +- apps/docs/content/docs/guides/frameworks/nextjs.mdx | 2 +- apps/docs/content/docs/guides/frameworks/nuxt.mdx | 2 +- apps/docs/content/docs/guides/frameworks/sveltekit.mdx | 2 +- apps/docs/content/docs/guides/frameworks/tanstack-start.mdx | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/docs/content/docs/guides/frameworks/astro.mdx b/apps/docs/content/docs/guides/frameworks/astro.mdx index ec46538ef5..5b68ece356 100644 --- a/apps/docs/content/docs/guides/frameworks/astro.mdx +++ b/apps/docs/content/docs/guides/frameworks/astro.mdx @@ -18,7 +18,7 @@ In this guide, you'll learn to integrate Prisma ORM with a Prisma Postgres datab Run one command to scaffold an Astro project with Prisma ORM and Prisma Postgres ready to go: ```npm -npm create prisma@latest --template astro +npm create prisma@latest -- --template astro ``` Or follow the steps below to set it up manually. diff --git a/apps/docs/content/docs/guides/frameworks/elysia.mdx b/apps/docs/content/docs/guides/frameworks/elysia.mdx index 5e27f0ce18..a1556954df 100644 --- a/apps/docs/content/docs/guides/frameworks/elysia.mdx +++ b/apps/docs/content/docs/guides/frameworks/elysia.mdx @@ -18,7 +18,7 @@ In this guide, you'll learn to integrate Prisma ORM with a Prisma Postgres datab Run one command to scaffold an Elysia project with Prisma ORM and Prisma Postgres ready to go: ```npm -npm create prisma@latest --template elysia +npm create prisma@latest -- --template elysia ``` Or follow the steps below to set it up manually. diff --git a/apps/docs/content/docs/guides/frameworks/hono.mdx b/apps/docs/content/docs/guides/frameworks/hono.mdx index 0556e94987..809d2632ab 100644 --- a/apps/docs/content/docs/guides/frameworks/hono.mdx +++ b/apps/docs/content/docs/guides/frameworks/hono.mdx @@ -18,7 +18,7 @@ In this guide, you'll learn to integrate Prisma ORM with a Prisma Postgres datab Run one command to scaffold a Hono project with Prisma ORM and Prisma Postgres ready to go: ```npm -npm create prisma@latest --template hono +npm create prisma@latest -- --template hono ``` Or follow the steps below to set it up manually. diff --git a/apps/docs/content/docs/guides/frameworks/nestjs.mdx b/apps/docs/content/docs/guides/frameworks/nestjs.mdx index 574d92f639..c4cfb1143c 100644 --- a/apps/docs/content/docs/guides/frameworks/nestjs.mdx +++ b/apps/docs/content/docs/guides/frameworks/nestjs.mdx @@ -22,7 +22,7 @@ You can find a ready-to-run example [here](https://github.com/prisma/prisma-exam Run one command to scaffold a NestJS project with Prisma ORM and Prisma Postgres ready to go: ```npm -npm create prisma@latest --template nestjs +npm create prisma@latest -- --template nestjs ``` Or follow the steps below to set it up manually. diff --git a/apps/docs/content/docs/guides/frameworks/nextjs.mdx b/apps/docs/content/docs/guides/frameworks/nextjs.mdx index 4016265667..727db37df6 100644 --- a/apps/docs/content/docs/guides/frameworks/nextjs.mdx +++ b/apps/docs/content/docs/guides/frameworks/nextjs.mdx @@ -19,7 +19,7 @@ You can find a [deployment-ready example on GitHub](https://github.com/prisma/pr Run one command to scaffold a Next.js project with Prisma ORM and Prisma Postgres ready to go: ```npm -npm create prisma@latest --template next +npm create prisma@latest -- --template next ``` Or follow the steps below to set it up manually. diff --git a/apps/docs/content/docs/guides/frameworks/nuxt.mdx b/apps/docs/content/docs/guides/frameworks/nuxt.mdx index 1ad8ec07e3..f62ca14b11 100644 --- a/apps/docs/content/docs/guides/frameworks/nuxt.mdx +++ b/apps/docs/content/docs/guides/frameworks/nuxt.mdx @@ -15,7 +15,7 @@ This guide shows you how to set up Prisma ORM in a Nuxt application with [Prisma Run one command to scaffold a Nuxt project with Prisma ORM and Prisma Postgres ready to go: ```npm -npm create prisma@latest --template nuxt +npm create prisma@latest -- --template nuxt ``` Or follow the steps below to set it up manually. diff --git a/apps/docs/content/docs/guides/frameworks/sveltekit.mdx b/apps/docs/content/docs/guides/frameworks/sveltekit.mdx index 4209dedee9..4dccac116f 100644 --- a/apps/docs/content/docs/guides/frameworks/sveltekit.mdx +++ b/apps/docs/content/docs/guides/frameworks/sveltekit.mdx @@ -18,7 +18,7 @@ In this guide, you'll learn to integrate Prisma ORM with a Prisma Postgres datab Run one command to scaffold a SvelteKit project with Prisma ORM and Prisma Postgres ready to go: ```npm -npm create prisma@latest --template svelte +npm create prisma@latest -- --template svelte ``` Or follow the steps below to set it up manually. diff --git a/apps/docs/content/docs/guides/frameworks/tanstack-start.mdx b/apps/docs/content/docs/guides/frameworks/tanstack-start.mdx index 4f81e1c3c2..158007144b 100644 --- a/apps/docs/content/docs/guides/frameworks/tanstack-start.mdx +++ b/apps/docs/content/docs/guides/frameworks/tanstack-start.mdx @@ -18,7 +18,7 @@ This guide will walk you through integrating Prisma ORM with a Prisma Postgres d Run one command to scaffold a TanStack Start project with Prisma ORM and Prisma Postgres ready to go: ```npm -npm create prisma@latest --template tanstack-start +npm create prisma@latest -- --template tanstack-start ``` Or follow the steps below to set it up manually. From a26b4ae72560b8416ccabdf7c2157d6ac2d732ad Mon Sep 17 00:00:00 2001 From: Aman Varshney Date: Thu, 9 Apr 2026 11:18:51 +0200 Subject: [PATCH 4/4] fix(source-config): correct npm create conversions for non-npm package managers Bypass npm-to-yarn for `npm create X@latest` since the library strips @latest and handles the -- separator inconsistently. Now produces: - pnpm: pnpm create prisma@latest --template - yarn: yarn create prisma@latest --template - bun: bun create prisma@latest --template Co-Authored-By: Claude Sonnet 4.6 --- apps/docs/source.config.ts | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/apps/docs/source.config.ts b/apps/docs/source.config.ts index c799ee8067..ad18f0a866 100644 --- a/apps/docs/source.config.ts +++ b/apps/docs/source.config.ts @@ -12,7 +12,24 @@ import remarkConsoleUtm from "@/lib/remark-console-utm"; function convertLine(cmd: string, pm: "npm" | "pnpm" | "yarn" | "bun"): string { return cmd .split("\n") - .map((line) => convert(line.replace(/^npm init -y$/, "npm init"), pm)) + .map((line) => { + // npm-to-yarn strips @latest from `npm create X@latest` and handles the + // npm-specific `--` separator inconsistently across PMs. Handle this + // pattern directly instead of fighting the library's output. + const m = line.match(/^npm create ([^\s]+@latest)((?:\s+--\s*.*)?)$/); + if (m) { + const pkg = m[1]; // e.g. "prisma@latest" + const flags = m[2].replace(/^\s+--\s*/, " ").trim(); // strip -- separator + const f = flags ? ` ${flags}` : ""; + switch (pm) { + case "npm": return line; + case "pnpm": return `pnpm create ${pkg}${f}`; + case "yarn": return `yarn create ${pkg}${f}`; + case "bun": return `bun create ${pkg}${f}`; + } + } + return convert(line.replace(/^npm init -y$/, "npm init"), pm); + }) .join("\n"); }