百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
C

create-prisma-generator

> 数据库
开源

只需运行一个命令,即可开始开发自己的 ◭ Prisma 发电机。

194 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

只需运行一个命令,即可开始开发自己的 ◭ Prisma 发电机。

⚠️ Note

create-prisma-generator doesn't support Prisma 4 yet, it works with Prisma 3, but that doesn't mean that you can't upgrade on your own quite smoothly.

Any contributions to support Prisma 4 in the create-prisma-generator are highly appreciated and will be part of the authors/contributors section of this tool.

Prisma

Prisma is Database ORM Library for Node.js, Typescript.

Prisma has a concept called "Generator". A generator is an executable program, which takes the parsed Prisma schema as an input and has full freedom to output anything.

The most prominent generator is called prisma-client-js. It's the ORM Client powering the main TypeScript and JavaScript usage of Prisma from Node.js.

Generators will always be called when you run prisma generate. However, only the generators mentioned in the schema.prisma file are being run.

Strongly recommend reading the full article, It's pretty damn good

Motivation

As a community, developing prisma generators is really hard cause that's a very new concept to us so It's like knowing JS but being exposed to do ML with it for the first time and there is nothing documented about @prisma/sdk (this is done intentionally) which has a very great utilities when developing or testing prisma generators and the only way you can get started is by looking at other generators code which might be useful to get you started.

I'm really obsessed with this architecture that Prisma Client is built on and I can see a bright future for Prisma Generators from the community to integrate Prisma nicely with different frameworks or make tools that can beneift from Prisma models.

But unfortunately I didn't have a smooth experience developing my prisma generator.

So I created this CLI to encourage developers to make their own prisma generators to have a smooth experience with all of the annoying repetitive things carried away like: getting started boilerplate, publishing, testing the gen locally by running prisma generate, ..etc

Also Created a blog on dev.to where we're gonna be discussing the hello world prisma generator together that this CLI has setup for you and the different concepts you'll come across when developing prisma generators, Check It out here

Usage

Answer the prompt questions to setup your project, The project setup will be based on your answers.

bash
npx create-prisma-generator

What’s Included?

Your environment will have everything you need to build your prisma generator like an elite open-source maintainer:

  • Hello World Prisma Generator.
  • Typescript Support.
  • JavaScript setup with babel to enable the usage of the latest JS features.
  • Automatic publishing workflow with Github Actions.
  • Workspace setup for testing the generator locally using prisma generate.
  • Scripts for development, building, packaging and testing.
  • Support for most package-managers yarn, pnpm and npm.
  • Automatic semantic release with safety in mind using commitlint & husky to validate your commit messages.
  • Test environment using Jest with an example & fixtures to help you get started.
  • Dependabot for keeping dependencies up to date.

Architecture

Read Architecture.md to understand how everything is working.

Prisma SDK reference

Read Prisma_SDK_Reference.md

Community

The Create Prisma Generator community can be found on GitHub Discussions, where you can ask questions, suggest ideas, and share your projects.

Contributing

We'll be very thankful for all your contributions, whether it's for helping us find issues in our code, highlighting features that're missing, writing tests for uncovered cases, or contributing to the codebase.

Read the Contributing guide to get started.

All Thanks to Prisma's brilliant developers for making such an awesome Node.js ORM that can be easily built on top of it.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

TypeScriptboilerplateclicpgcreate-prisma-generator

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类数据库
定价开源

> 相关工具

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库