orm README

The project's README from github.com/prisma/orm. As one markdown file: README.md.

Prisma Next

Discord | X | Blog Post | Architecture

License: Apache-2.0 npm CI


Looking for Prisma ORM 7? It lives on the v7 branch of this repository, and the prisma and @prisma/* packages on npm continue to be published from there.

Prisma Next is currently in Early Access and we're building it in the open with the community. APIs will still evolve as your feedback shapes them, so we don't recommend it for production workloads yet. Come along for the ride: star the repo, follow @prisma on X, or read along on the Prisma blog.

Prisma Next is a TypeScript rewrite of Prisma ORM, designed to be extensible, composable, and AI-agent friendly by default. Read the full announcement: The Next Evolution of Prisma ORM.

Prerequisites

Getting started

1. Scaffold a new project

The interactive scaffolder picks a JavaScript framework (Next.js, Vite, Hono, and others) and wires Prisma Next in with your chosen database (PostgreSQL or MongoDB):

npm create prisma@next

You finish with a runnable app, a starter contract, and the agent skills already registered.

2. Or, add Prisma Next to an existing project

Run this from your repo root:

npx @prisma/cli@next orm init

prisma orm init writes prisma.config.ts, scaffolds a starter contract and db.ts under src/prisma/, installs the runtime, emits the contract, and registers the agent skills. It does not touch your framework or build setup.

3. Use your AI agent for everything Prisma Next

Both installers leave a top-level prisma-next.md primer at your project root for any agent to read first. init additionally materialises one SKILL.md per workflow in two places, so different agent runtimes can find them at their expected paths:

A skills-lock.json at the project root tracks which skill versions are installed. Your editor's AI assistant auto-loads the right skill when your prompt matches.

Just describe what you want. For example:

"Add a posts model with a relation to users, then write a query that loads each user's three most recent posts."

The agent loads the prisma-8 skill, opens its contract and queries references, then drives the change end-to-end.

For the full catalogue and what each skill covers, see skills/README.md.

Found a bug, missing a feature, or have a question for the team?

Ask your agent. The prisma-8 skill's feedback flow drafts a structured GitHub issue or hands you a Prisma Discord link for live Q&A. You can review and confirm before anything is submitted.

For extension authors

Prisma Next has a minimal core. Everything around it, including Postgres support itself, is built on the same public SPI that's available to any author. If you've wanted to integrate your tool, your database, or your library with Prisma, this is the way in.

A few extensions already shipping:

Want to ship your own? The Authoring Prisma Next Extensions blog walks through the SPI, the layers your extension can hook into, and how the team features new extensions in the Prisma Next directory.

Supported databases

Prisma 8 carries PostgreSQL to general availability — and that is all at this stage:

MySQL follows later. See the roadmap for what must happen before the 8.0.0-rc.1 release.

Contributing

See CONTRIBUTING.md for setup, commands, DCO signoff, and PR expectations. For substantive changes, please open an issue first so we can give direction-fit feedback before you invest implementation time.

Security issues: follow the Private Vulnerability Reporting flow in SECURITY.md. Please do not file them as public issues.

Community

Built something with Prisma Next? Tag @prisma on X. The best community builds get a shout-out and a link here.

License

Apache 2.0. See LICENSE.

orm (prisma/orm)

Searching Database…

47.7K ·GitHub
这是什么?Prisma ORM 是面向 Node.js 和 TypeScript 的新一代 ORM,支持 PostgreSQL、MySQL、MariaDB、SQL Server、SQLite、MongoDB 和 CockroachDB。本仓库目前展示的是 'Prisma Next',这是一个用 TypeScript 重写的版本,设计上可扩展、可组合,并且对 AI 智能体友好。
这是库还是独立工具?它是一个库/ORM,你可以把它添加到 Node.js/TypeScript 项目中,同时还提供一个命令行脚手架工具(prisma orm init),用于将其接入你的应用。
我要怎么在项目中把它跑起来?可以使用交互式脚手架,选择你喜欢的框架创建新项目;或者在仓库根目录运行 'prisma orm init',将其添加到现有项目中。
我需要特定的 Node.js 版本或包管理器吗?需要 Node.js 24 或更高版本,以及 npm、pnpm 或 yarn 等包管理器。
这个能直接用于生产环境吗?不能。Prisma Next 目前处于抢先体验(Early Access)阶段,API 仍在不断演进,官方明确表示暂时不要将其用于生产环境的工作负载。
目前哪些数据库已经完全支持?PostgreSQL 刚在 Prisma 8 中实现正式可用(General Availability);MongoDB 处于抢先体验阶段,SQLite 仅是概念验证。MySQL 的支持计划在之后推出。
这里的 AI 智能体支持实际是如何工作的?init 命令会在 .claude/skills/ 和 .agents/skills/ 中注册按工作流划分的 SKILL.md 文件,并在顶层添加一个 prisma-next.md 入门说明。这样,编辑器中的 AI 助手(Claude Code、Cursor、Copilot Agent)就能根据你的提示自动加载合适的技能。
我能为 Prisma Next 添加自定义功能吗?可以。Prisma Next 拥有一个精简的核心,并开放了一个公共 SPI 接口,pgvector、ParadeDB(全文搜索)、PostGIS 和 CipherStash 加密等官方扩展都基于它实现,因此任何人都可以构建自己的数据库或工具集成。
Creator
prisma
Size
276.4 MB
Stars
47.7K
Age
7y
Commits · 90 Days