Prisma ORM 8 is here.Read the docs

From the CLI

Start a Prisma ORM app with Prisma Postgres from the command line.

Use the CLI when you want Prisma ORM and Prisma Postgres set up without leaving the terminal.

Start a new app

bun create prisma@latest

Choose PostgreSQL when prompted. Setup adds prisma-8.md, installs project-level Prisma ORM skills for your coding agent, and writes the generated scripts used below.

Create the database

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
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.

Initialize the database

From the generated project directory, run:

bun run db:init

Run the app

Sample users are seeded automatically on the app's first query.

bun run dev

Add Prisma ORM to an existing app

If the app already exists, run Prisma ORM from the project root:

bunx prisma@latest orm init

Choose PostgreSQL and set DATABASE_URL to your Prisma Postgres connection string. Init adds prisma-8.md, package scripts, and the Prisma ORM skills for your coding agent. Then follow the PostgreSQL existing-project guide.

Import an existing database

On this page