prisma/orm

Developer Tools

TypeScript ORM letting developers query PostgreSQL and MongoDB with typed, human-readable code instead of SQL.

47,666
2,575
TypeScript
Apache-2.0
7 years old

Prisma ORM is a TypeScript-first database toolkit: you define a contract (schema) for your models and write typed queries in application code instead of hand-written SQL. It belongs to the application-data layer, not to a hosted database product, though the project also points at Prisma Postgres and Prisma Compute as companion services. The current release line, Prisma 8, is a TypeScript rewrite of the ORM designed to be extensible and friendly to coding agents; Prisma 7 remains maintained separately on a v7 branch.

What changes in a workflow

Instead of maintaining SQL strings and separate migration files by hand, you describe models in a Prisma contract, and the CLI emits a typed client. The README's example workflow is adding a posts model related to users and querying the three most recent posts per user — the agent loads the Prisma skill, opens its contract and query references, and drives the change. npx prisma orm init writes prisma.config.ts, scaffolds a starter contract and db.ts, installs the runtime and emits the contract, deliberately not touching your framework or build setup (README, orm init reference).

Two mechanisms distinguish Prisma 8 from a conventional ORM:

  • Skills for coding agents. Both install paths leave a prisma-8.md primer and install per-workflow SKILL.md files into .claude/skills, .cursor/skills, .agents/skills (Copilot Agent and others) and .devin/skills, so assistant prompts can load version-matched guidance automatically (skills catalogue, skills CLI). The skills ship inside the installed Prisma packages, so they track the version in use rather than a generic doc.
  • A public extension SPI. The core is minimal and even PostgreSQL support is built on the same SPI available to outside authors. Published extensions cover pgvector columns and similarity search, PostGIS geometry, BM25 full-text search (experimental), Supabase auth/storage tables (experimental), arktype-validated JSON columns, and searchable encryption (using extensions, extension author call). That matters if your database needs types the core does not model.

Setup paths and requirements

Two documented starting points share the same prerequisites: Node.js 24 or newer and npm, pnpm or yarn (README).

Compatibility and release cautions

Database support is uneven and explicitly tracked. PostgreSQL is the primary first-class target, MongoDB is first-class, SQLite is a proof of concept planned next, and MySQL follows after SQLite; the feature scoreboard lists per-database gaps (README, scoreboard). Check your database against that scoreboard before committing — the Topics list naming MariaDB, CockroachDB, SQL Server and others is not evidence of current support in this line.

Prisma 8 ships as a release candidate, with 8.0.0 final expected in four to eight weeks. The authors say candidates may include breaking changes, that every release ships an upgrade recipe applied by the prisma-8 skill, and that the risk is a not-yet-built feature rather than churn; the named gaps are in the feature scoreboard (README). Prisma 7 stays maintained on the v7 branch for eighteen months after 8.0.0 final, with supported versions defined separately (versioning policy, v7 branch, Prisma 7 docs). Pin versions and plan for incremental migration if you adopt the candidate.

The code is licensed Apache-2.0, which permits commercial use and modification subject to its terms (LICENSE). Security reports should use the repository's private vulnerability reporting flow rather than public issues (SECURITY.md).

Written by AI from the project's README, updated October 29, 2026. The project's own docs are the source of truth.