# Prisma Next CLI (/docs/cli/next)

Location: CLI > Prisma Next CLI

The Prisma Next CLI is exposed as `prisma-next`. It reads your `prisma-next.config.ts`, emits contract artifacts, verifies databases, and manages Prisma Next migrations.

> [!NOTE]
> Prisma Next is in Early Access
> 
> Prisma Next is the next major version of Prisma ORM, available now in Early Access. 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](/getting-started).

Install the CLI package in a Prisma Next project:

```bash
npm install -D prisma-next
```

Then run commands with your package manager:

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

For a full app scaffold, use a [Prisma Next quickstart](/next/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 an existing project:

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

Adopt an existing database:

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

Use checked-in migrations:

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

Command groups [#command-groups]

| Command                                                      | Purpose                                                                             |
| ------------------------------------------------------------ | ----------------------------------------------------------------------------------- |
| [`prisma-next init`](/cli/next/init)                         | Add Prisma Next files to a project.                                                 |
| [`prisma-next contract emit`](/cli/next/contract-emit)       | Emit `contract.json` and `contract.d.ts` from your contract source.                 |
| [`prisma-next contract infer`](/cli/next/contract-infer)     | Infer a starter PSL contract from an existing database.                             |
| [`prisma-next db init`](/cli/next/db-init)                   | Create missing database structures from the current contract and sign the database. |
| [`prisma-next db update`](/cli/next/db-update)               | Reconcile an existing database with the current contract.                           |
| [`prisma-next db schema`](/cli/next/db-schema)               | Inspect the live database schema.                                                   |
| [`prisma-next db sign`](/cli/next/db-sign)                   | Record that a database matches the current contract.                                |
| [`prisma-next db verify`](/cli/next/db-verify)               | Check that a database still matches the current contract.                           |
| [`prisma-next migration plan`](/cli/next/migration-plan)     | Create an on-disk migration package from contract changes.                          |
| [`prisma-next migration new`](/cli/next/migration-new)       | Scaffold a migration package for manual authoring.                                  |
| [`prisma-next migration apply`](/cli/next/migration-apply)   | Apply pending on-disk migrations.                                                   |
| [`prisma-next migration status`](/cli/next/migration-status) | Show migration history and applied state.                                           |
| [`prisma-next migration show`](/cli/next/migration-show)     | Inspect a migration package.                                                        |
| [`prisma-next migration ref`](/cli/next/migration-ref)       | Manage named migration refs.                                                        |

Global flags [#global-flags]

Most Prisma Next commands accept these flags.

| Flag               | What it does                                               |
| ------------------ | ---------------------------------------------------------- |
| `--json`           | Print machine-readable output. Use this in CI and scripts. |
| `-q`, `--quiet`    | Suppress nonessential output.                              |
| `-v`, `--verbose`  | Print more detail.                                         |
| `--trace`          | Include stack traces for failures.                         |
| `--color`          | Force colored output.                                      |
| `--no-color`       | Disable colored output.                                    |
| `--interactive`    | Allow prompts.                                             |
| `--no-interactive` | Disable prompts.                                           |
| `-y`, `--yes`      | Accept prompts where the command supports confirmation.    |

Use `prisma-next <command> --help` when you need the exact command help from the installed preview 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