Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

prisma-next

Package Overview
Dependencies
Maintainers
1
Versions
304
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prisma-next

Prisma Next CLI: emit, verify, sign, and migrate databases from a type-safe contract.

latest
Source
npmnpm
Version
0.12.0
Version published
Maintainers
1
Created
Source

prisma-next

The Prisma Next CLI. Emit contracts, verify and sign databases, and run migrations from a type-safe contract.

Install

pnpm add -D prisma-next
# or
npm install -D prisma-next
# or
yarn add -D prisma-next
# or
bun add -D prisma-next

No install? Run it directly:

pnpm dlx prisma-next init
npx prisma-next init
bunx prisma-next init
yarn dlx prisma-next init

Quickstart

In a project with a package.json:

pnpm dlx prisma-next init

Init prompts for your database (PostgreSQL or MongoDB) and schema location, scaffolds the config/schema/runtime files, installs the target facade (e.g. @prisma-next/postgres) plus prisma-next, and emits your contract.

Commands

CommandPurpose
prisma-next initScaffold a new Prisma Next project (config, schema, runtime, docs).
prisma-next contract emitEmit contract.json and contract.d.ts from your schema.
prisma-next contract inferIntrospect a database and write an inferred PSL contract.
prisma-next db initBootstrap a database to match the current contract (additive only).
prisma-next db updateUpdate a database to match the current contract (including destructive ops).
prisma-next db schemaInspect the live database schema.
prisma-next db signWrite or update the contract marker on the database.
prisma-next db verifyVerify the database matches the emitted contract.
prisma-next migration planPlan a new migration from contract changes.
prisma-next migration showDisplay a migration package.
prisma-next migration statusShow the migration graph and applied status.
prisma-next migrateApply planned migrations to the database.
prisma-next migration verifyVerify a migration package's integrity.
prisma-next migration refManage named refs in migrations/refs.json.

Run prisma-next --help or prisma-next <command> --help for full options.

Programmatic use

prisma-next is a CLI distribution only — it has no library exports. Importing from prisma-next (root or any subpath) will fail.

Authors of build integrations, extension packs, and advanced config wiring should install @prisma-next/cli and import from its subpaths:

  • @prisma-next/cli/config-typesdefineConfig and config types
  • @prisma-next/cli/control-apicreateControlClient for programmatic control-plane operations
  • @prisma-next/cli/config-loaderloadConfig
  • @prisma-next/cli/commands/* — individual command factories (createContractEmitCommand, createDbInitCommand, …)

These subpaths are less stable than the facade packages (@prisma-next/postgres/config, @prisma-next/mongo/config) — prefer those for application-level config.

FAQs

Package last updated on 02 Jun 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts