Prisma ORM 8 is here.Read the docs

init

Prepare a repository for Prisma development.

init prepares the current directory for Prisma development. It runs locally and calls no platform API. It does not scaffold the ORM: use orm init to add the Prisma ORM config, contract, and runtime files to a project.

init does four things:

  1. Adds a postinstall script to package.json (prisma skills sync || exit 0), so the Prisma agent skills resync on every install and upgrade.
  2. Adds prisma to devDependencies in package.json, pinned to the CLI's version, unless it is already listed. It does not install it.
  3. Scaffolds a prisma.config.ts recording which agents to install skills for, in the skills config section.
  4. Runs skills sync once.

It never prompts, always exits 0, and is safe to rerun: each step reports what is already done. A prisma.config.ts, postinstall script, or prisma entry that already exists is never edited. If package.json already has a different postinstall script, init reports it and tells you what to append instead of chaining or replacing it.

Usage

bunx --bun prisma@latest init
bun install

If init added prisma, run the install straight after, so the package is in node_modules.

Options

OptionWhat it does
--skills <agents>Agents to install skills for, comma-separated: claude, cursor, agents, devin. Pass none to record that no agent skills are wanted. Default: all of them.
--postinstall/--no-postinstallAdd the skills-sync postinstall hook. --no-postinstall skips that step.

Examples

bunx --bun prisma@latest init
bunx --bun prisma@latest init --skills=claude,cursor
bunx --bun prisma@latest init --skills=none
bunx --bun prisma@latest init --no-postinstall

The scaffolded config

init writes a minimal prisma.config.ts when none exists:

prisma.config.ts
import { definePrismaConfig } from "prisma/config";

export default definePrismaConfig({
  skills: {
    agents: ["claude", "cursor", "agents", "devin"],
  },
});

The prisma/config import resolves from your project's node_modules. Until prisma is installed, commands that read this file stop at CLI.CONFIG_UNREADABLE. See Configuration.

Only init writes the postinstall hook. orm init also adds prisma to devDependencies. skills sync never touches package.json.

On this page