# Prisma 8 CLI (/docs/cli/v8)

> 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.

Reference for the Prisma 8 commands in the unified Prisma CLI.

Location: CLI > Prisma 8 CLI

Prisma 8 ships with a new, unified Prisma CLI. One binary contains the commands for the whole platform: the Prisma 8 data workflow (contracts, databases, migrations), [Prisma Composer](https://www.prisma.io/docs/composer), [Prisma Compute](https://www.prisma.io/docs/compute), and workspace management. This page describes the Prisma 8 data commands and lists where the rest are documented.

> [!NOTE]
> The Prisma 8 Release Candidate is available
> 
> Prisma 8 is the next major version of Prisma ORM, now available as a Release Candidate. It's the cutting-edge version of Prisma ORM and will become the future of Prisma, so we'd love for you to try it, explore what's new, and [share your feedback in Discord](https://pris.ly/discord).
> 
> If you want to stay on the current generally available version of Prisma ORM, you can continue with [Prisma 7](https://www.prisma.io/docs/getting-started).

The Prisma 8 RC CLI is the `next` tag of the `prisma` package. Run it without installing:

  

#### bun

```bash
bunx prisma@next --help
bunx prisma@next contract emit
```

#### pnpm

```bash
pnpm dlx prisma@next --help
pnpm dlx prisma@next contract emit
```

#### yarn

```bash
yarn dlx prisma@next --help
yarn dlx prisma@next contract emit
```

#### npm

```bash
npx prisma@next --help
npx prisma@next contract emit
```

At general availability these commands become plain `prisma contract emit` and so on.

For a full app scaffold, use a [Prisma 8 quickstart](https://www.prisma.io/docs/v8/quickstart/postgresql). That path creates the project files and package scripts for you. This CLI reference is for the lower-level commands those scripts call.

## Common workflows [#common-workflows]

Start in an existing project:

  

#### bun

```bash
bunx prisma@next orm init --target postgres --authoring psl
bunx prisma@next contract emit
bunx prisma@next db init --db "$DATABASE_URL"
```

#### pnpm

```bash
pnpm dlx prisma@next orm init --target postgres --authoring psl
pnpm dlx prisma@next contract emit
pnpm dlx prisma@next db init --db "$DATABASE_URL"
```

#### yarn

```bash
yarn dlx prisma@next orm init --target postgres --authoring psl
yarn dlx prisma@next contract emit
yarn dlx prisma@next db init --db "$DATABASE_URL"
```

#### npm

```bash
npx prisma@next orm init --target postgres --authoring psl
npx prisma@next contract emit
npx prisma@next db init --db "$DATABASE_URL"
```

Adopt an existing database:

  

#### bun

```bash
bunx prisma@next contract infer --db "$DATABASE_URL" --output ./prisma/contract.prisma
bunx prisma@next contract emit
bunx prisma@next db sign --db "$DATABASE_URL"
bunx prisma@next db verify --db "$DATABASE_URL"
```

#### pnpm

```bash
pnpm dlx prisma@next contract infer --db "$DATABASE_URL" --output ./prisma/contract.prisma
pnpm dlx prisma@next contract emit
pnpm dlx prisma@next db sign --db "$DATABASE_URL"
pnpm dlx prisma@next db verify --db "$DATABASE_URL"
```

#### yarn

```bash
yarn dlx prisma@next contract infer --db "$DATABASE_URL" --output ./prisma/contract.prisma
yarn dlx prisma@next contract emit
yarn dlx prisma@next db sign --db "$DATABASE_URL"
yarn dlx prisma@next db verify --db "$DATABASE_URL"
```

#### npm

```bash
npx prisma@next contract infer --db "$DATABASE_URL" --output ./prisma/contract.prisma
npx prisma@next contract emit
npx prisma@next db sign --db "$DATABASE_URL"
npx prisma@next db verify --db "$DATABASE_URL"
```

Use checked-in migrations:

  

#### bun

```bash
bunx prisma@next contract emit
bunx prisma@next migration plan --name add-users
bunx prisma@next migration status --db "$DATABASE_URL"
bunx prisma@next migrate --db "$DATABASE_URL"
bunx prisma@next db verify --db "$DATABASE_URL"
```

#### pnpm

```bash
pnpm dlx prisma@next contract emit
pnpm dlx prisma@next migration plan --name add-users
pnpm dlx prisma@next migration status --db "$DATABASE_URL"
pnpm dlx prisma@next migrate --db "$DATABASE_URL"
pnpm dlx prisma@next db verify --db "$DATABASE_URL"
```

#### yarn

```bash
yarn dlx prisma@next contract emit
yarn dlx prisma@next migration plan --name add-users
yarn dlx prisma@next migration status --db "$DATABASE_URL"
yarn dlx prisma@next migrate --db "$DATABASE_URL"
yarn dlx prisma@next db verify --db "$DATABASE_URL"
```

#### npm

```bash
npx prisma@next contract emit
npx prisma@next migration plan --name add-users
npx prisma@next migration status --db "$DATABASE_URL"
npx prisma@next migrate --db "$DATABASE_URL"
npx prisma@next db verify --db "$DATABASE_URL"
```

## Data commands [#data-commands]

| Command                                        | Purpose                                                                             |
| ---------------------------------------------- | ----------------------------------------------------------------------------------- |
| [`orm init`](https://www.prisma.io/docs/cli/v8/init)                     | Add Prisma 8 files to a project.                                                    |
| [`contract emit`](https://www.prisma.io/docs/cli/v8/contract-emit)       | Emit `contract.json` and `contract.d.ts` from your contract source.                 |
| [`contract infer`](https://www.prisma.io/docs/cli/v8/contract-infer)     | Infer a starter PSL contract from an existing database.                             |
| [`db init`](https://www.prisma.io/docs/cli/v8/db-init)                   | Create missing database structures from the current contract and sign the database. |
| [`db update`](https://www.prisma.io/docs/cli/v8/db-update)               | Reconcile an existing database with the current contract.                           |
| [`db schema`](https://www.prisma.io/docs/cli/v8/db-schema)               | Inspect the live database schema.                                                   |
| [`db sign`](https://www.prisma.io/docs/cli/v8/db-sign)                   | Record that a database matches the current contract.                                |
| [`db verify`](https://www.prisma.io/docs/cli/v8/db-verify)               | Check that a database still matches the current contract.                           |
| [`migration plan`](https://www.prisma.io/docs/cli/v8/migration-plan)     | Create an on-disk migration package from contract changes.                          |
| [`migration new`](https://www.prisma.io/docs/cli/v8/migration-new)       | Scaffold a migration package for manual authoring.                                  |
| [`migrate`](https://www.prisma.io/docs/cli/v8/migration-apply)           | Apply pending on-disk migrations.                                                   |
| [`migration status`](https://www.prisma.io/docs/cli/v8/migration-status) | Show the migration path and pending status.                                         |
| [`migration show`](https://www.prisma.io/docs/cli/v8/migration-show)     | Inspect a migration package.                                                        |
| [`ref`](https://www.prisma.io/docs/cli/v8/migration-ref)                 | Manage named refs that point at contracts.                                          |
| `format`                                       | Format your PSL contract source in place.                                           |
| `lsp`                                          | Start the Prisma 8 language server (spawned by editors, not run interactively).     |

The `migration` group also has read-only inspection commands without dedicated pages yet: `migration list` (on-disk migrations per contract space; `--space`, `--ascii`, `--legend`), `migration log` (executed history from the database ledger; `--db`, `--utc`, `--ascii`), `migration graph` (graph topology; `--space`, `--dot` for Graphviz output, `--ascii`, `--legend`), and `migration check [target]` (artifact and graph integrity; `--space`). Run any of them with `--help` for the details.

## Platform commands [#platform-commands]

The same binary carries the platform command groups. Each group has its own page in this section, except `composer`, which is documented on the [Composer CLI reference](https://www.prisma.io/docs/composer/cli-reference):

| Command group                         | Purpose                                                                                    |
| ------------------------------------- | ------------------------------------------------------------------------------------------ |
| [`auth`](https://www.prisma.io/docs/cli/v8/auth)                | Sign in to your Prisma account from the CLI, sign out, and check who you are signed in as. |
| [`init`](https://www.prisma.io/docs/cli/v8/platform-init)       | Write a committed compute config for the app in the current directory.                     |
| [`project`](https://www.prisma.io/docs/cli/v8/project)          | Create, link, and inspect projects, and manage project environment variables.              |
| [`service`](https://www.prisma.io/docs/cli/v8/service)          | Manage Compute services, their deployments, logs, and custom domains.                      |
| [`build`](https://www.prisma.io/docs/cli/v8/build)              | Stream logs for builds created by a git push or the Console.                               |
| [`git`](https://www.prisma.io/docs/cli/v8/git)                  | Connect a GitHub repository for push-to-deploy.                                            |
| [`branch`](https://www.prisma.io/docs/cli/v8/branch)            | List platform branches for a project.                                                      |
| [`postgres`](https://www.prisma.io/docs/cli/v8/postgres)        | Create and manage Prisma Postgres databases.                                               |
| [`bucket`](https://www.prisma.io/docs/cli/v8/bucket)            | Create and manage object-store buckets.                                                    |
| [`composer`](https://www.prisma.io/docs/composer/cli-reference) | Run and deploy applications composed from Prisma modules.                                  |
| [`agent`](https://www.prisma.io/docs/cli/v8/agent)              | Install Prisma skills for AI coding agents.                                                |
| [`telemetry`](https://www.prisma.io/docs/cli/v8/telemetry)      | Show, enable, or disable anonymous CLI telemetry.                                          |
| [`feedback`](https://www.prisma.io/docs/cli/v8/feedback)        | Send feedback to the Prisma CLI team.                                                      |

## Global flags [#global-flags]

All commands accept these flags.

| Flag                                 | What it does                                                                               |
| ------------------------------------ | ------------------------------------------------------------------------------------------ |
| `--json`                             | Print machine-readable output (shorthand for `--format json`). Use this in CI and scripts. |
| `--format <mode>`                    | Output format, `human` or `json`.                                                          |
| `--log-level <level>`                | Commentary verbosity: `error`, `warn`, `info`, or `verbose`.                               |
| `-q`, `--quiet`                      | Suppress nonessential output (shorthand for `--log-level error`).                          |
| `-v`, `--verbose`                    | Print more detail (shorthand for `--log-level verbose`).                                   |
| `--color` / `--no-color`             | Force colored output on or off.                                                            |
| `--interactive` / `--no-interactive` | Force prompts on or off.                                                                   |
| `-y`, `--yes`                        | Accept prompt defaults without asking.                                                     |
| `--confirm <token>`                  | Grant a consent prompt non-interactively by typing its token (repeatable).                 |
| `--config <path>`                    | Read this config file instead of `./prisma.config.ts`.                                     |
| `-h`, `--help`                       | Print help for a command.                                                                  |
| `--version`                          | Print the CLI version and exit.                                                            |

Use `npx prisma@next <command> --help` when you need the exact command help from the installed version.

## Related pages

- [`db`](https://www.prisma.io/docs/cli/db): Manage your database schema and lifecycle during development
- [`debug`](https://www.prisma.io/docs/cli/debug): Display Prisma debug information including schema paths, engine binaries, environment variables, and cache directories for troubleshooting
- [`dev`](https://www.prisma.io/docs/cli/dev): Start a local Prisma Postgres server for development
- [`format`](https://www.prisma.io/docs/cli/format): Format and validate your Prisma schema file with consistent structure
- [`generate`](https://www.prisma.io/docs/cli/generate): Generate artifacts like Prisma Client based on your Prisma schema