# Overview (/docs/cli)

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

Prisma CLI reference

Location: Overview

Prisma 8 ships with a unified Prisma CLI. One binary contains the ORM commands and the platform commands for [Prisma Composer](https://www.prisma.io/docs/composer), [Prisma Compute](https://www.prisma.io/docs/compute), Prisma Postgres, and object-store buckets.

> [!NOTE]
> Prisma 7 users
> 
> Prisma 8 is the current release of Prisma ORM. Prisma 7 remains fully supported; its docs live at [/orm/v7](https://www.prisma.io/docs/orm/v7) and its setup paths at [/v7/getting-started](https://www.prisma.io/docs/v7/getting-started).

The Prisma 8 CLI ships in the `prisma` package. Run it without installing:

  

#### bun

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

#### pnpm

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

#### yarn

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

#### npm

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

With `prisma` installed in your project, 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/prisma-orm/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.

## Platform commands [#platform-commands]

The platform commands manage the services, databases, and buckets your app runs on. With [`deploy`](https://www.prisma.io/docs/cli/deploy) and [`dev`](https://www.prisma.io/docs/cli/dev) you deploy a [Prisma Composer](https://www.prisma.io/docs/composer) app to [Prisma Compute](https://www.prisma.io/docs/compute) and run it locally; with [`service`](https://www.prisma.io/docs/cli/service) and [`git`](https://www.prisma.io/docs/cli/git) you manage services, their versions, logs, and domains, and the repository connection. With [`postgres`](https://www.prisma.io/docs/cli/postgres) you spin up and manage [Prisma Postgres](https://www.prisma.io/docs/postgres) databases. With [`bucket`](https://www.prisma.io/docs/cli/bucket) you create blob-storage buckets and their access keys. [`auth`](https://www.prisma.io/docs/cli/auth), [`project`](https://www.prisma.io/docs/cli/project), and [`branch`](https://www.prisma.io/docs/cli/branch) handle the account, project, and branch plumbing around them. Each command group has its own page in this section. Deployments are created by a git push to the connected repository, the [Console](https://pris.ly/pdp), or `deploy`, and each deploy produces a service **version**.

## Common workflows [#common-workflows]

There are two main entry points. Platform users deploy apps, create databases, and provision buckets with the [platform commands](#platform-commands). ORM users manage their schema, contracts, and migrations with the ORM and migration commands.

### Deploy an app [#deploy-an-app]

Sign in, create or link a project, and connect the repository; every push then deploys. A [Prisma Composer](https://www.prisma.io/docs/composer) app deploys directly with `deploy`:

  

#### bun

```bash
bunx prisma@latest auth login
bunx prisma@latest project create my-app
bunx prisma@latest git connect
bunx prisma@latest deploy module.ts
```

#### pnpm

```bash
pnpm dlx prisma@latest auth login
pnpm dlx prisma@latest project create my-app
pnpm dlx prisma@latest git connect
pnpm dlx prisma@latest deploy module.ts
```

#### yarn

```bash
yarn dlx prisma@latest auth login
yarn dlx prisma@latest project create my-app
yarn dlx prisma@latest git connect
yarn dlx prisma@latest deploy module.ts
```

#### npm

```bash
npx prisma@latest auth login
npx prisma@latest project create my-app
npx prisma@latest git connect
npx prisma@latest deploy module.ts
```

Follow a deploy with [`service logs`](https://www.prisma.io/docs/cli/service) and manage the result with the [`service` commands](https://www.prisma.io/docs/cli/service).

### Create a database [#create-a-database]

  

#### bun

```bash
bunx prisma@latest postgres create mydb
bunx prisma@latest postgres connection create mydb
```

#### pnpm

```bash
pnpm dlx prisma@latest postgres create mydb
pnpm dlx prisma@latest postgres connection create mydb
```

#### yarn

```bash
yarn dlx prisma@latest postgres create mydb
yarn dlx prisma@latest postgres connection create mydb
```

#### npm

```bash
npx prisma@latest postgres create mydb
npx prisma@latest postgres connection create mydb
```

`postgres create` prints a one-time connection URL; `postgres connection create` mints another when you need one. See [`postgres`](https://www.prisma.io/docs/cli/postgres).

### Create a bucket [#create-a-bucket]

  

#### bun

```bash
bunx prisma@latest bucket create --name my-bucket
bunx prisma@latest bucket key create <bucket-id>
```

#### pnpm

```bash
pnpm dlx prisma@latest bucket create --name my-bucket
pnpm dlx prisma@latest bucket key create <bucket-id>
```

#### yarn

```bash
yarn dlx prisma@latest bucket create --name my-bucket
yarn dlx prisma@latest bucket key create <bucket-id>
```

#### npm

```bash
npx prisma@latest bucket create --name my-bucket
npx prisma@latest bucket key create <bucket-id>
```

`bucket key create` prints the key's one-time credentials. See [`bucket`](https://www.prisma.io/docs/cli/bucket).

### Start in an existing project [#start-in-an-existing-project]

  

#### bun

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

#### pnpm

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

#### yarn

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

#### npm

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

### Adopt an existing database [#adopt-an-existing-database]

  

#### bun

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

#### pnpm

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

#### yarn

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

#### npm

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

### Use checked-in migrations [#use-checked-in-migrations]

  

#### bun

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

#### pnpm

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

#### yarn

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

#### npm

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

## Agent skills [#agent-skills]

Prisma packages ship [agent skills](https://www.prisma.io/docs/ai/tools/skills): instructions that teach AI coding agents the installed version's commands and APIs. [`init`](https://www.prisma.io/docs/cli/init) prepares a repository once, and [`skills sync`](https://www.prisma.io/docs/cli/skills) keeps the installed copies matching your package versions.

  

#### bun

```bash
bunx --bun prisma@latest init
bunx prisma@latest skills sync
```

#### pnpm

```bash
pnpm dlx prisma@latest init
pnpm dlx prisma@latest skills sync
```

#### yarn

```bash
yarn dlx prisma@latest init
yarn dlx prisma@latest skills sync
```

#### npm

```bash
npx prisma@latest init
npx prisma@latest skills sync
```

## Other commands [#other-commands]

A few commands ship without dedicated pages yet. `contract format` formats your PSL contract source in place, and `lsp` starts the Prisma 8 language server (spawned by editors, not run interactively). The `migration` group also has read-only inspection commands: `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.

## Global flags [#global-flags]

Every command accepts the same set of output, prompt, and config flags. They are documented on [Global flags](https://www.prisma.io/docs/cli/global-flags).

## Related pages

- [`Choose a Prisma 8 setup path`](https://www.prisma.io/docs/getting-started): Choose the fastest path to try Prisma 8 in a new or existing project.
- [`Console`](https://www.prisma.io/docs/console): Learn how to use the Console to manage and integrate Prisma products into your application.
- [`Deploy the full Prisma stack`](https://www.prisma.io/docs/full-stack-tutorial): A single tutorial from empty directory to live URL, with Prisma Composer, Prisma 8, and Prisma Postgres.
- [`Introduction to Prisma 8`](https://www.prisma.io/docs/prisma-orm): Prisma 8 is the current release of Prisma ORM.
- [`Local development`](https://www.prisma.io/docs/local-development): Run the whole Prisma stack on your machine, with your app on Bun, a local Prisma Postgres database, and local object storage.