You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A modern Prisma 7 CLI with first-party project templates and a smooth create flow.
3
+
Scaffold a new app with Prisma already wired up.
4
4
5
-
## Stack
5
+
`create-prisma` gives you a project template, Prisma setup, database scripts, and a working starting point without making you assemble everything by hand.
6
6
7
-
-`trpc-cli` for command routing
8
-
-`zod@4` for validated input schemas
9
-
-`@clack/prompts@1` for interactive UX
10
-
-`execa` for external command execution
11
-
-`fs-extra` for filesystem operations
12
-
-`handlebars` for conditional template rendering
13
-
-`tsdown` for ESM builds
7
+
## What It Does
14
8
15
-
## Usage
9
+
- creates a new app from a supported template
10
+
- adds Prisma 7 dependencies for your database
11
+
- scaffolds `prisma/schema.prisma`, `prisma/seed.ts`, and `prisma.config.ts`
12
+
- writes a Prisma client singleton in the right place for the selected template
13
+
- adds `db:generate`, `db:migrate`, and `db:seed` scripts
14
+
- creates or updates `.env` with `DATABASE_URL`
15
+
- can install dependencies and run `prisma generate` for you
-`--force` allow scaffolding into a non-empty directory
120
+
-`--verbose` print full command output
112
121
113
-
Enable add-ons with individual flags:
122
+
## Add-ons
114
123
115
-
```bash
116
-
create-prisma --name my-app --template next --skills --mcp --extension
117
-
```
124
+
`create-prisma` can also help with a few optional extras:
125
+
126
+
- Prisma skills for coding agents
127
+
- Prisma MCP setup
128
+
- Prisma IDE extension install
118
129
119
-
Or run locally:
130
+
These can be selected interactively or enabled with flags.
131
+
132
+
## Local Development
120
133
121
134
```bash
122
135
bun install
@@ -125,64 +138,20 @@ bun run build
125
138
bun run start
126
139
```
127
140
128
-
The CLI updates `package.json` with Prisma dependencies, optionally runs dependency installation with your selected package manager, and scaffolds Prisma 7 setup files directly inside each app template:
129
-
130
-
-`prisma/schema.prisma`
131
-
-`prisma/seed.ts`
132
-
-`src/lib/prisma.ts`, `src/lib/prisma.server.ts`, `src/lib/server/prisma.ts`, `server/utils/prisma.ts`, or `packages/db/src/client.ts`
133
-
-`prisma.config.ts`
134
-
-`src/generated/prisma` or `server/generated/prisma` (Nuxt) or `packages/db/src/generated/prisma` (Turborepo)
135
-
-`.env` (creates or updates `DATABASE_URL`, and writes `CLAIM_URL` when Prisma Postgres is provisioned)
136
-
- runs `prisma generate` automatically after scaffolding
137
-
138
-
`create` is the default command and currently supports:
`--verbose` prints full install/generate command output; default mode keeps output concise.
151
-
`--force` (create only) allows scaffolding in a non-empty target directory.
152
-
Add-ons can be selected interactively or through flags: `--skills`, `--mcp`, `--extension`.
153
-
When add-ons are enabled, `create` prompts for the relevant agent and IDE selections, then installs curated Prisma skills (`skills@latest`), configures Prisma MCP (`add-mcp@latest`), and installs the Prisma IDE extension for supported IDE CLIs.
154
-
When `postgresql` is selected, `create` can provision Prisma Postgres via `create-db --json` and auto-fill `DATABASE_URL`.
155
-
Generated projects also include `db:seed` and configure Prisma's `migrations.seed` hook to run `tsx prisma/seed.ts`.
141
+
Useful repo scripts:
156
142
157
-
## Telemetry
143
+
-`bun run dev`
144
+
-`bun run typecheck`
145
+
-`bun run format`
146
+
-`bun run lint`
147
+
-`bun run bump`
158
148
159
-
Published builds may send anonymous PostHog telemetry for `create` runs to help improve the CLI. It does not include project names, file paths, or database URLs. Disable it with `DO_NOT_TRACK`, `CREATE_PRISMA_DISABLE_TELEMETRY`, or `CREATE_PRISMA_TELEMETRY_DISABLED`.
160
-
161
-
## Scripts
162
-
163
-
-`bun run build` - Build to `dist/`
164
-
-`bun run check` - Run formatting and lint checks
165
-
-`bun run dev` - Watch mode build
166
-
-`bun run start` - Run built CLI
167
-
-`bun run lint` - Run `oxlint` with warnings treated as failures
168
-
-`bun run lint:fix` - Apply safe `oxlint` fixes
169
-
-`bun run format` - Format the repo with `oxfmt`
170
-
-`bun run format:check` - Check formatting with `oxfmt`
171
-
-`bun run typecheck` - TypeScript checks only
172
-
-`bun run bump` - Create a release PR (interactive semver bump)
173
-
-`bun run bump -- patch|minor|major|x.y.z` - Non-interactive bump
174
-
-`bun run bump -- --dry-run patch` - Preview next version without changing files
175
-
-`bun run release-notes` - Generate GitHub release notes via `changelogithub`
176
-
177
-
## Release Workflow
149
+
## Telemetry
178
150
179
-
This repo uses a manual, script-driven release flow:
151
+
Published builds may send anonymous usage telemetry to help improve the CLI. It does not include project names, file paths, or database URLs.
180
152
181
-
1. Run `bun run bump` (or pass `patch|minor|major|x.y.z`).
182
-
2. The script creates a `release/vX.Y.Z` branch and a PR with commit `chore(release): X.Y.Z`.
183
-
3. Merge that PR to `main` with squash (keep commit title `chore(release): X.Y.Z`).
184
-
4. GitHub Actions runs `bun run check`, `bun run typecheck`, and `bun run build` before publishing.
185
-
5. GitHub Actions creates the `vX.Y.Z` tag and GitHub Release notes via `changelogithub`.
186
-
6. GitHub Actions publishes only for `chore(release):` commits, using npm trusted publishing (OIDC, no npm token secret).
153
+
Disable it with any of:
187
154
188
-
Every PR from a branch in this repository also publishes a preview package to npm using the dist-tag `pr<PR_NUMBER>`, so PR 3 is installable as `create-prisma@pr3`.
0 commit comments