contract emit
Emit Prisma ORM contract artifacts.
contract emit reads your contract source (TypeScript or Prisma schema) and writes the generated artifacts used by the runtime, verification, and migration tooling.
The command is offline. It does not need a database connection.
Usage
bunx prisma@latest contract emitOptions
| Option | What it does |
|---|---|
--output-path <dir> | Writes contract.json and contract.d.ts into a specific directory. |
--config <path> | Read this config file instead of ./prisma.config.ts. |
--json | Prints a machine-readable result. |
What it creates
The command emits:
contract.json, the canonical machine-readable contractcontract.d.ts, the generated TypeScript contract declarations
Do not edit these files by hand. Re-run contract emit after changing the contract source or extension pack list.
Examples
bunx prisma@latest contract emit
bunx prisma@latest contract emit --output-path ./generated
bunx prisma@latest contract emit --jsonNext steps
After emitting, choose the database workflow:
- use
db initfor first-time bootstrap - use
db updatefor direct reconciliation - use
migration planfor checked-in migrations - use
db verifyto check drift
