# Introduction to Prisma 8 (/docs/v8)

> For the complete Prisma documentation index, see [llms.txt](https://www.prisma.io/docs/llms.txt). A markdown version of any docs page is available by appending `.md` to its URL.

Prisma 8 is the next major version of Prisma ORM, available as a Release Candidate.

Location: Introduction to Prisma 8

Prisma 8 is a ground-up rebuild of Prisma ORM, covering the runtime, query APIs, migration flow, and project setup.

> [!NOTE]
> The Prisma 8 Release Candidate is available
> 
> Prisma 8 is the next major version of Prisma ORM, now available as a Release Candidate. It’s the cutting-edge version of Prisma ORM and will become the future of Prisma, so we’d love for you to try it, explore what’s new, and [share your feedback in Discord](https://pris.ly/discord).
> 
> If you want to stay on the current generally available version of Prisma ORM, you can continue with [Prisma 7](https://www.prisma.io/docs/getting-started).

Prisma 8 is the recommended starting point for new projects: the new developer experience today, on the path to general availability.

  

#### bun

```bash
bunx create-prisma@next
```

#### pnpm

```bash
pnpm dlx create-prisma@next
```

#### yarn

```bash
yarn dlx create-prisma@next
```

#### npm

```bash
npx create-prisma@next
```

Start with the setup page when you want a guided first run.

- [Full-stack tutorial](https://www.prisma.io/docs/v8/full-stack-tutorial): Scaffold, provision Prisma Postgres, query, and deploy to Prisma Compute in one sitting.

- [Choose a setup path](https://www.prisma.io/docs/v8/getting-started): Pick a new-project quickstart or add Prisma 8 to an existing app.

## Use with your agent [#use-with-your-agent]

Copy this prompt, replace the placeholders, and hand it to your coding agent. The scaffold installs [Prisma 8 skills](https://www.prisma.io/docs/ai/tools/skills) into `.claude/skills/` and `.agents/skills/`:

```text
Create a new [framework] application with Prisma 8, seed it, and run it locally.

If I have not told you which framework, stop and ask before scaffolding. Valid --template values: next, hono, nuxt, astro, nest, svelte, tanstack-start, elysia.

1. Scaffold the app: `npx create-prisma@next create my-app --template [framework] --provider postgres --prisma-postgres --yes`. The `--prisma-postgres` flag provisions a Prisma Postgres database. If I give you a connection string, pass `--database-url "<url>"` instead of `--prisma-postgres`.
2. From the project directory, apply the starter contract and seed: `npm run db:init`, then `npm run db:seed`. If seeding fails with `Cannot read properties of undefined (reading 'where')`, change `db.orm.User` to `db.orm.public.User` in `src/prisma/seed.ts`, `src/prisma/users.ts`, and any route files that query `db.orm`, then rerun.
3. Edit the starter contract under `src/prisma/` into a small schema for my use case, then run `npm run contract:emit` and plan and apply the migration: `npx @prisma/cli@next migration plan`, then `npx @prisma/cli@next migrate --yes`. Migration planning diffs the emitted contract, so the emit step is required.
4. Update the seed script and the app routes to query the new schema, start `npm run dev` in the background, and verify with a request against the running app. For the `nest` template, if routes return 500s with `reading 'findAll'` in the logs, add explicit `@Inject()` tokens as shown in https://www.prisma.io/docs/guides/v8/frameworks/nestjs.md.
5. Deploy with Prisma Compute. First apply the framework's deploy requirement from the guide at https://www.prisma.io/docs/guides/v8/frameworks/[guide].md, where [guide] is the template name except: template `next` → guide `nextjs`, `nest` → `nestjs`, `svelte` → `sveltekit`. The requirements: Next.js needs `output: "standalone"` in `next.config.ts` (without it the deployed app returns 504s), TanStack Start needs the nitro build plugin, Astro needs the `@astrojs/node` adapter plus `--env HOST=0.0.0.0`, and Elysia needs `--framework bun --entry src/index.ts` on the deploy command. If the template is `svelte`, skip this step; Compute does not support SvelteKit yet. Check `npx @prisma/cli@latest auth whoami`. If I am not signed in, stop and ask me to run `npx @prisma/cli@latest auth login`, because that step opens a browser. Then run `npx @prisma/cli@latest app deploy --create-project my-app --env .env` so DATABASE_URL reaches the deployment, and verify the deployed URL with curl.

Use the installed Prisma 8 skills and the current Prisma docs: https://www.prisma.io/docs/llms.txt (append `.md` to any docs URL for a markdown version).
```

## Add Prisma 8 to your framework [#add-prisma-8-to-your-framework]

Each guide runs the same journey for a specific framework: scaffold, connect Prisma Postgres, query, and deploy where the framework is supported on Compute.

- [Next.js](https://www.prisma.io/docs/guides/v8/frameworks/nextjs)

- [Hono](https://www.prisma.io/docs/guides/v8/frameworks/hono)

- [TanStack Start](https://www.prisma.io/docs/guides/v8/frameworks/tanstack-start)

- [NestJS](https://www.prisma.io/docs/guides/v8/frameworks/nestjs)

- [Astro](https://www.prisma.io/docs/guides/v8/frameworks/astro)

- [Nuxt](https://www.prisma.io/docs/guides/v8/frameworks/nuxt)

- [SvelteKit](https://www.prisma.io/docs/guides/v8/frameworks/sveltekit)

- [Bun](https://www.prisma.io/docs/guides/v8/runtimes/bun)

- [Elysia](https://www.prisma.io/docs/guides/v8/frameworks/elysia)

- [Deno](https://www.prisma.io/docs/guides/v8/runtimes/deno)

## Learn the fundamentals [#learn-the-fundamentals]

Once you are connected, the Fundamentals section teaches the everyday query patterns.

- [Reading data](https://www.prisma.io/docs/orm/v8/fundamentals/reading-data): Filter with where, project with select, sort, and paginate.

- [Writing data](https://www.prisma.io/docs/orm/v8/fundamentals/writing-data): Create, update, delete, upsert, and the bulk write variants.

- [Relations and joins](https://www.prisma.io/docs/orm/v8/fundamentals/relations-and-joins): Read related records with include on PostgreSQL and MongoDB.

- [Transactions](https://www.prisma.io/docs/orm/v8/fundamentals/transactions): Make several writes succeed or fail together.

- [Advanced queries](https://www.prisma.io/docs/orm/v8/fundamentals/advanced-queries): The SQL builder and the MongoDB pipeline builder for shapes the ORM can't express.

## Learn the concepts [#learn-the-concepts]

- [Prisma 8 overview](https://www.prisma.io/docs/orm/v8): Learn the core ideas behind contracts, emitted artifacts, runtime clients, query styles, and migrations.

## Related pages

- [`Build faster with Prisma + AI`](https://www.prisma.io/docs/ai): Build faster with Prisma and AI coding tools like Cursor, Codex, and ChatGPT
- [`CLI Overview`](https://www.prisma.io/docs/cli): The Prisma CLI is the command-line interface for Prisma ORM. Use it to initialize projects, generate Prisma Client, manage databases, run migrations, and more
- [`Console`](https://www.prisma.io/docs/console): Learn how to use the Console to manage and integrate Prisma products into your application.
- [`Guides`](https://www.prisma.io/docs/guides): A collection of guides for various tasks and workflows
- [`Management API`](https://www.prisma.io/docs/management-api): Programmatically manage your Prisma Postgres databases, projects, and workspaces with the Management API