Prisma Next CLI
Reference for the Prisma Next command line interface.
The Prisma Next CLI is exposed as prisma-next. It reads your prisma-next.config.ts, emits contract artifacts, verifies databases, and manages Prisma Next migrations.
Prisma Next is the next major version of Prisma ORM, available now in Early Access. 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.
If you want to stay on the current generally available version of Prisma ORM, you can continue with Prisma 7.
Install the CLI package in a Prisma Next project:
npm install -D prisma-nextThen run commands with your package manager:
npx prisma-next help
npx prisma-next contract emitFor a full app scaffold, use a Prisma Next quickstart. That path creates the project files and package scripts for you. This CLI reference is for the lower-level commands those scripts call.
Common workflows
Start an existing project:
prisma-next init --target postgres --authoring psl
prisma-next contract emit
prisma-next db init --db "$DATABASE_URL"Adopt an existing database:
prisma-next contract infer --db "$DATABASE_URL" --output ./prisma/contract.prisma
prisma-next contract emit
prisma-next db sign --db "$DATABASE_URL"
prisma-next db verify --db "$DATABASE_URL"Use checked-in migrations:
prisma-next contract emit
prisma-next migration plan --name add-users
prisma-next migration status --db "$DATABASE_URL"
prisma-next migration apply --db "$DATABASE_URL"
prisma-next db verify --db "$DATABASE_URL"Command groups
| Command | Purpose |
|---|---|
prisma-next init | Add Prisma Next files to a project. |
prisma-next contract emit | Emit contract.json and contract.d.ts from your contract source. |
prisma-next contract infer | Infer a starter PSL contract from an existing database. |
prisma-next db init | Create missing database structures from the current contract and sign the database. |
prisma-next db update | Reconcile an existing database with the current contract. |
prisma-next db schema | Inspect the live database schema. |
prisma-next db sign | Record that a database matches the current contract. |
prisma-next db verify | Check that a database still matches the current contract. |
prisma-next migration plan | Create an on-disk migration package from contract changes. |
prisma-next migration new | Scaffold a migration package for manual authoring. |
prisma-next migration apply | Apply pending on-disk migrations. |
prisma-next migration status | Show migration history and applied state. |
prisma-next migration show | Inspect a migration package. |
prisma-next migration ref | Manage named migration refs. |
Global flags
Most Prisma Next commands accept these flags.
| Flag | What it does |
|---|---|
--json | Print machine-readable output. Use this in CI and scripts. |
-q, --quiet | Suppress nonessential output. |
-v, --verbose | Print more detail. |
--trace | Include stack traces for failures. |
--color | Force colored output. |
--no-color | Disable colored output. |
--interactive | Allow prompts. |
--no-interactive | Disable prompts. |
-y, --yes | Accept prompts where the command supports confirmation. |
Use prisma-next <command> --help when you need the exact command help from the installed preview version.