Skip to main content
Prisma Documentation Docs

Search documentation

Type to search this documentation.

On this pageOverview

Prisma ORM

Create a Prisma ORM app backed by Prisma Postgres.

bun create prisma@latest
Bash
pnpm create prisma@latest
Bash
yarn create prisma@latest
Bash
npm create prisma@latest

Run this from a Node.js 22.18 or newer (on the 24 line, 24.11 or newer) environment; Node.js 24 is recommended. When prompted, choose PostgreSQL, and answer No to Deploy to Prisma now?.

Setup adds a starter contract, creates prisma-8.md, installs project-level Prisma ORM skills for your coding agent, and adds package scripts for the database steps below. Choose the minimal template if you want the fastest first run, or a framework template when you want the first query wired into an app route or page.

Run this from a Node.js 22.18 or newer (on the 24 line, 24.11 or newer) environment; Node.js 24 is recommended. When prompted, choose PostgreSQL, and answer No to Deploy to Prisma now?.

Setup adds a starter contract, creates prisma-8.md, installs project-level Prisma ORM skills for your coding agent, and adds package scripts for the database steps below. Choose the minimal template if you want the fastest first run, or a framework template when you want the first query wired into an app route or page.

Create a Prisma Postgres database from the terminal and export its connection string. The generated scripts read the environment variable, not .env:

bunx create-db@latest
Bash
pnpm dlx create-db@latest
Bash
yarn dlx create-db@latest
Bash
npx create-db@latest
Bash
export DATABASE_URL="<the connection string create-db printed>"

The command also prints a claim URL; open it within 24 hours to keep the database in your account.

export DATABASE_URL="<the connection string create-db printed>"

The command also prints a claim URL; open it within 24 hours to keep the database in your account.

From the generated project directory, run db:init to apply the starter schema to Prisma Postgres and sign the database.

title="bun"
bun run db:init
pnpm
pnpm run db:init
yarn
yarn db:init
npm
npm run db:init

Sample users are seeded automatically the first time the app queries the database, so there is no separate seed step.

Start the app and confirm the sample query runs successfully.

title="bun"
bun run dev
pnpm
pnpm run dev
yarn
yarn dev
npm
npm run dev

Use the URL or terminal output shown by your template to confirm the sample query runs successfully.

Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu