# create-prisma (/docs/prisma-orm/create-prisma) > For the complete Prisma documentation index, see [llms.txt](https://www.prisma.io/docs/llms.txt). A markdown version of any docs page is available by appending `.md` to its URL. Scaffold a new Prisma ORM app with create-prisma, with Prisma Composer, Prisma Postgres, and a deploy path built in. Location: Prisma ORM > create-prisma `create-prisma` creates a new Prisma ORM project from an app template. It installs Prisma ORM, emits the contract, and generates a deployable [Prisma Composer](https://www.prisma.io/docs/composer) app. PostgreSQL projects use Composer's native Prisma Postgres provider, including migrations and a typed runtime client. For PostgreSQL, the scaffold also plans the first migration from the starter contract, in `migrations/app/_init`. When the project folder is new or empty and is not already inside a Git repository, it creates a Git repository with one commit, `Initial commit from create-prisma`. Use it when you want to start from a working app. If you already have an app, follow [Add Prisma ORM to an existing PostgreSQL database](https://www.prisma.io/docs/prisma-orm/add-to-existing-project/postgresql) or [Add Prisma ORM to an existing MongoDB database](https://www.prisma.io/docs/prisma-orm/add-to-existing-project/mongodb) instead. > [!NOTE] > Prisma ORM 7 > > `create-prisma@latest` scaffolds Prisma ORM 8, so to scaffold a Prisma ORM 7 app, run `npm create prisma@stable` and follow the [Prisma ORM 7 setup paths](https://www.prisma.io/docs/v7/getting-started). ## Prerequisites [#prerequisites] - **Node.js 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer.** Check with `node --version`. Node.js 24 is recommended. [Supported versions](https://www.prisma.io/docs/orm/supported-versions) has every floor. - **A package manager.** The npm that ships with your Node.js release works; on Node.js 22 that is npm 10. pnpm, Bun, and Yarn 4.10 or newer are also supported. On any other Node.js version, `create-prisma` stops before it writes any files and prints the required range. It skips this check when you run it with Bun or Deno. ## Create a project [#create-a-project] Run the CLI with your package manager and answer the prompts: #### npm ```bash npm create prisma@latest -- my-app ``` #### pnpm ```bash pnpm create prisma@latest my-app ``` #### yarn ```bash yarn create prisma@latest my-app ``` #### bun ```bash bun create prisma@latest my-app ``` The prompts cover the project name, the app template, the database provider, the contract authoring style, the package manager, whether to install agent skill files for coding assistants, and whether to deploy right away. Skill files go into `.claude/`, `.cursor/`, `.agents/`, and `.devin/` by default; answer no, or pass `--skills none`, to skip them. To remove them later, set `skills: { agents: [] }` in `prisma.config.ts` and run `prisma skills sync`; see [Configuration](https://www.prisma.io/docs/cli/configuration). Generated Node.js projects expect the Node.js versions listed under [Prerequisites](#prerequisites). The last prompt is: ```text Deploy to Prisma now? ``` The prompt defaults to Yes, but `--yes`, which accepts the defaults for the other prompts, answers No here, so `--yes` on its own never deploys; `--json` deploys unless you pass `--no-deploy`. Choose no to deploy later with the generated `deploy` script. When more than one Prisma workspace session is available, the CLI asks which workspace receives the deployment; pass `--workspace ` to pick one without a prompt, or omit it to use the active workspace. Choosing another workspace also updates the Prisma CLI's active workspace session. ## Skip the prompts [#skip-the-prompts] Pass flags when you already know the project shape. `--yes` accepts the defaults for anything you leave out: #### npm ```bash npm create prisma@latest -- my-app --template next --provider postgres --yes ``` #### pnpm ```bash pnpm create prisma@latest my-app --template next --provider postgres --yes ``` #### yarn ```bash yarn create prisma@latest my-app --template next --provider postgres --yes ``` #### bun ```bash bun create prisma@latest my-app --template next --provider postgres --yes ``` `create` is the default subcommand, so `npm create prisma@latest -- create my-app ...` and `npm create prisma@latest -- my-app ...` are the same command. Everything after `--` goes to `create-prisma`; without the separator npm keeps the flags for itself. | Flag | What it does | | ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `` or `--name ` | The project name and directory. | | `--template ` | Chooses the app template (see below). | | `--provider postgres\|postgresql\|mongo\|mongodb` | Chooses the database: PostgreSQL relational models or MongoDB document models. | | `--authoring psl\|typescript` | Chooses the [contract authoring](https://www.prisma.io/docs/orm/contract-authoring/the-data-contract) style. | | `--package-manager npm\|pnpm\|yarn\|bun\|deno` | Chooses the package manager used to install dependencies. | | `--skills \|none` | Which coding agents get skill files, or `none` to opt out. Same values and effect as [`prisma init --skills`](https://www.prisma.io/docs/cli/init); the choice is recorded in the [`skills` config section](https://www.prisma.io/docs/cli/configuration#agent-skills). | | `--deploy` / `--no-deploy` | Deploys the generated app to Prisma immediately, or skips that step. | | `--workspace ` | The Prisma workspace to deploy into. | | `--yes` | Skips prompts and accepts the default choices, which means no deploy. | | `--force` | Scaffolds into a non-empty directory, overwriting the generated starter and Prisma files (config, contract, and `db.ts`). It refuses when the target has a non-empty `migrations/` directory. | | `--verbose` | Shows the full command output during setup. Not compatible with `--json`. | | `--json` | Runs non-interactively and writes one JSON result object to stdout, for agents and automation. Deploys unless you pass `--no-deploy`. | If the project folder already exists and is not empty, `create-prisma` writes nothing, unless you pass `--force`. What it does instead depends on how you run it. With `--yes` or `--json`, it stops with a message. If the folder holds an app, which means it has a `package.json` and no `prisma.config.ts`, the message suggests running `npx prisma@latest orm init` in that folder to add Prisma ORM to the app. If the folder has a `prisma.config.ts`, as every Prisma ORM 7 project does, the message says it already holds a Prisma project and suggests using the Prisma CLI there. In a terminal without `--yes`, it asks what to do: create the project in a new folder with a free name, such as `my-app-1`, choose another name, or cancel. If the folder holds an app, it also offers **Add Prisma to the existing app**, which runs `prisma orm init` there and adds no starter app and no deploy setup. [Add Prisma ORM and PostgreSQL to an existing app](https://www.prisma.io/docs/prisma-orm/quickstart/existing-app/postgresql) and [Add Prisma ORM and MongoDB to an existing app](https://www.prisma.io/docs/prisma-orm/quickstart/existing-app/mongodb) walk through what `orm init` does. ## Templates [#templates] | `--template` | App | | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | | `minimal` | A minimal server with one query | | `next` | Next.js | | `hono` | Hono | | `elysia` | Elysia | | `nest` | NestJS | | `svelte` | SvelteKit | | `astro` | Astro | | `nuxt` | Nuxt (needs Node.js 22.22.3 or newer on the 22 line, 24.15 or newer on the 24 line, or 26 or newer) | | `tanstack-start` | TanStack Start | | `turborepo` | A Turborepo monorepo: a minimal Node.js server in `apps/server`, and the contract and database client in a shared package, `packages/database` | Every template supports PostgreSQL and MongoDB, PSL or TypeScript contract authoring, and npm, pnpm, Yarn, and Bun. Each [framework guide](https://www.prisma.io/docs/guides) walks the generated app from the first query to a deploy. Deno is supported for local minimal PostgreSQL apps: ```bash deno run -A --minimum-dependency-age=0 npm:create-prisma@latest my-deno-app --template minimal --provider postgres --package-manager deno --no-deploy ``` Deno 2.9 skips packages published in the previous 24 hours by default, so without `--minimum-dependency-age=0` a newly published `create-prisma` release resolves to an older cached version. Prisma Compute does not support Deno deployments yet, so Deno projects stop at a verified local run. ## Start the app [#start-the-app] Export `DATABASE_URL` in your shell, as in `export DATABASE_URL=""`, then initialize the database and start the dev server. The generated `prisma.config.ts` reads `DATABASE_URL` from the process environment and loads no dotenv file, so a value in `.env` is not used (Deno projects are the exception: their scripts pass `--env-file=.env`). If you have no database yet, [A database on your machine](https://www.prisma.io/docs/prisma-orm/local-database) gives you one. ```bash cd my-app npm run db:init npm run dev ``` Sample records are seeded on the app's first query. From there, change the contract under `src/prisma/` (`packages/database/src/` in the `turborepo` template), run `npm run contract:emit`, plan the migration with `npm run migration:plan -- --name `, and apply it with `npm run migrate`. Each apply points the `db` ref at the state you applied, and the next `migration plan` starts from there. [Create a new app with PostgreSQL](https://www.prisma.io/docs/prisma-orm/quickstart/postgresql) covers that loop in detail, and [Create a new app with MongoDB](https://www.prisma.io/docs/prisma-orm/quickstart/mongodb) covers the MongoDB connection string. ### Generated scripts [#generated-scripts] The scaffold adds these scripts to `package.json`: | Script | Runs | | ------------------ | ------------------------------------------------------------------------------ | | `contract:emit` | `prisma contract emit` | | `db:init` | `prisma db init` | | `db:update` | `prisma db update` | | `db:verify` | `prisma db verify` | | `migration:plan` | `prisma migration plan` | | `migrate` | `prisma db migrate` | | `migration:status` | `prisma migration status` | | `migration:show` | `prisma migration show` | | `skills:sync` | `prisma skills sync \|\| exit 0` | | `postinstall` | `prisma skills sync \|\| exit 0`, added by the `prisma init` the scaffold runs | | `composer:dev` | `prisma dev` | | `composer:deploy` | `prisma deploy` | | `dev:composer` | the build script, then `composer:dev` | | `deploy` | the build script, then `composer:deploy` | Deno projects get the Prisma scripts only, each wrapped in `deno run -A npm:...`, without `skills:sync`, without `postinstall`, and without the Composer scripts. `--skills none` also leaves out `skills:sync` and `postinstall`. ## Telemetry [#telemetry] Published builds may send anonymous usage telemetry. It never includes project names, file paths, or database URLs. Disable it by setting `DO_NOT_TRACK`, `CREATE_PRISMA_DISABLE_TELEMETRY`, or `CREATE_PRISMA_TELEMETRY_DISABLED` in your environment. The CLI is open source at [prisma/create-prisma](https://github.com/prisma/create-prisma). ## Related pages - [A database on your machine](https://www.prisma.io/docs/prisma-orm/local-database): Get a PostgreSQL or MongoDB database for a Prisma ORM project without signing up for anything, and look at the rows your app writes. - [From scratch](https://www.prisma.io/docs/prisma-orm/from-scratch): Set up Prisma ORM with PostgreSQL by hand, with one config file, one contract, and one index.ts.