# init (/docs/cli/init) > 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. Prepare a repository for Prisma development. Location: CLI > init `init` prepares the current directory for Prisma development. It runs locally and calls no platform API. It does not scaffold the ORM: use [`orm init`](https://www.prisma.io/docs/cli/orm-init) to add the Prisma ORM config, contract, and runtime files to a project. In a project's own directory, `init` makes the changes below. In a package of a monorepo, it only writes `prisma.config.ts`; see [In a monorepo package](#in-a-monorepo-package). 1. Adds a `postinstall` script to `package.json` (`prisma skills sync || exit 0`), so the [Prisma agent skills](https://www.prisma.io/docs/cli/skills) resync on every install and upgrade. 2. Adds `prisma` to `devDependencies` in `package.json`, pinned to the CLI's version, unless it is already listed. It does not install it. 3. Scaffolds a `prisma.config.ts` recording which agents to install skills for, in the [`skills` config section](https://www.prisma.io/docs/cli/configuration#agent-skills). 4. Runs [`skills sync`](https://www.prisma.io/docs/cli/skills) once. It never prompts and is safe to rerun: each step reports what is already done. A step that cannot run, such as one that needs a `package.json` the directory does not have, prints a warning with an `INIT.*` code, and `init` still exits 0. `init` exits 2 in two cases: an option is invalid, such as `--skills` naming an agent the CLI does not know (`CLI.INVALID_ARGUMENTS`), or a `prisma.config.ts` already exists and cannot be used. A Prisma ORM 7 config, which has no `definePrismaConfig`, fails that way, with `CLI.CONFIG_MISSING_MARKER`. A `prisma.config.ts`, `postinstall` script, or `prisma` entry that already exists is never edited. If `package.json` already has a different `postinstall` script, `init` leaves `package.json` alone: it reports the script, tells you what to append, and does not add `prisma` to `devDependencies` either, so add that yourself. ## Usage [#usage] #### npm ```bash npx prisma@latest init npm install ``` #### pnpm ```bash pnpm dlx prisma@latest init pnpm install ``` #### yarn ```bash yarn dlx prisma@latest init yarn install ``` #### bun ```bash bunx --bun prisma@latest init bun install ``` If `init` added `prisma`, run the install straight after, so the package is in `node_modules`. ### In a monorepo package [#in-a-monorepo-package] In a package of a monorepo, `init` only writes the `prisma.config.ts` scaffold. It skips the `postinstall` hook, the `prisma` dev dependency, and the skills sync, and prints a line for each step it skipped. Those steps belong at the root: run `init` there. `init` treats the current directory as a monorepo package when either of these holds: - A `prisma.config.ts` in a parent directory already applies to it. If the directory is not a workspace member, you can run the skipped steps in it anyway: pass `--postinstall` for the hook and the dev dependency, or `--skills` with your agents for the sync. - It is a workspace member: a package that a package-manager workspace lists, in `pnpm-workspace.yaml` or in the `workspaces` field of a `package.json`. This applies whether or not a parent config exists. A workspace keeps one set of skill copies, at the workspace root, and the root's config names the agents; see [Skills in a workspace](https://www.prisma.io/docs/cli/skills#in-a-workspace). So the scaffold has no `skills` section. `init --skills` still syncs, but into the workspace root, and for the agents the root's config names, not the ones you pass. If you pass other agents, `init` removes no copies and prints the `skills` section to add to the root's `prisma.config.ts`. Both checks stop at the Git repository: the CLI looks no higher than the directory that holds `.git`, and outside a Git repository it uses the current directory alone. So outside a Git repository, `init` makes every change in the current directory. ## Options [#options] | Option | What it does | | ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `--skills ` | Agents to install skills for, comma-separated: `claude`, `cursor`, `agents`, `devin`. Pass `none` to record that no agent skills are wanted. Default: all of them. In a monorepo package the sync is skipped unless you pass the flag, and in a workspace member the root's config decides the agents; to record that none are wanted there, set `agents: []` in the root's `prisma.config.ts` (see [In a monorepo package](#in-a-monorepo-package)). | | `--postinstall`/`--no-postinstall` | Add the skills-sync `postinstall` hook and the `prisma` dev dependency. `--no-postinstall` skips both. Default: on, except in a monorepo package (see [In a monorepo package](#in-a-monorepo-package)). | ## Examples [#examples] #### npm ```bash npx prisma@latest init npx prisma@latest init --skills=claude,cursor npx prisma@latest init --skills=none npx prisma@latest init --no-postinstall ``` #### pnpm ```bash pnpm dlx prisma@latest init pnpm dlx prisma@latest init --skills=claude,cursor pnpm dlx prisma@latest init --skills=none pnpm dlx prisma@latest init --no-postinstall ``` #### yarn ```bash yarn dlx prisma@latest init yarn dlx prisma@latest init --skills=claude,cursor yarn dlx prisma@latest init --skills=none yarn dlx prisma@latest init --no-postinstall ``` #### bun ```bash bunx --bun prisma@latest init bunx --bun prisma@latest init --skills=claude,cursor bunx --bun prisma@latest init --skills=none bunx --bun prisma@latest init --no-postinstall ``` ## The scaffolded config [#the-scaffolded-config] `init` writes a minimal `prisma.config.ts` when none exists. Outside a workspace member it looks like this. In a workspace member it has no `skills` section, because the workspace root's config names the agents. ```typescript title="prisma.config.ts" import { definePrismaConfig } from "prisma/config"; export default definePrismaConfig({ skills: { agents: ["claude", "cursor", "agents", "devin"], }, }); ``` The `prisma/config` import resolves from your project's `node_modules`. Until `prisma` is installed, commands that read this file stop at `CLI.CONFIG_UNREADABLE`. See [Configuration](https://www.prisma.io/docs/cli/configuration). Only `init` writes the `postinstall` hook. [`orm init`](https://www.prisma.io/docs/cli/orm-init) also adds `prisma` to `devDependencies`. [`skills sync`](https://www.prisma.io/docs/cli/skills) never touches `package.json`. ## Related pages - [auth](https://www.prisma.io/docs/cli/auth): Sign in to your Prisma account from the CLI, sign out, and manage workspace sessions. - [branch](https://www.prisma.io/docs/cli/branch): List platform branches for a project. - [bucket](https://www.prisma.io/docs/cli/bucket): Create and manage object-store buckets. - [Configuration](https://www.prisma.io/docs/cli/configuration): Configure Prisma ORM CLI commands with prisma.config.ts and global flags. - [contract emit](https://www.prisma.io/docs/cli/contract-emit): Emit Prisma ORM contract artifacts.