# 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 ORM 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 ORM 7 users > > Prisma ORM 8 is the current release, as a release candidate. Prisma ORM 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). > > For what release candidate means, when the final release is expected, and how to stay on version 7, see [Release status](https://www.prisma.io/docs/orm/release-status). For the Prisma ORM 8 name of every Prisma ORM 7 API, see [Coming from Prisma ORM 7](https://www.prisma.io/docs/orm/coming-from-prisma-orm-7). The Prisma ORM CLI ships in the `prisma` package. Run it without installing: #### bun ```bash bunx prisma --help bunx prisma contract emit ``` #### pnpm ```bash pnpm prisma --help pnpm prisma contract emit ``` #### yarn ```bash yarn prisma --help yarn prisma contract emit ``` #### npm ```bash npx prisma --help npx prisma contract emit ``` With `prisma` installed in your project, these commands become plain `prisma contract emit` and so on. For a full app scaffold, follow [Create a new app with PostgreSQL](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 `deploy`, by a git push once you [set up deploy on push](https://www.prisma.io/docs/compute/deploy-on-push), or from the [Console](https://pris.ly/pdp), and each deploy produces a service **version**. ## Common workflows [#common-workflows] Platform users deploy apps, create databases, and provision buckets with the [platform commands](#platform-commands), while ORM users manage their schema, contracts, and migrations with the ORM and migration commands. ### Deploy an app [#deploy-an-app] Sign in, then build and deploy a [Prisma Composer](https://www.prisma.io/docs/composer) app. `deploy` creates the project on its first run, and a new project needs a region, set in the deploy config or as `PRISMA_REGION`; see [`deploy`](https://www.prisma.io/docs/cli/deploy). #### bun ```bash bunx prisma auth login bun run build bunx prisma deploy module.ts ``` #### pnpm ```bash pnpm prisma auth login pnpm run build pnpm prisma deploy module.ts ``` #### yarn ```bash yarn prisma auth login yarn build yarn prisma deploy module.ts ``` #### npm ```bash npx prisma auth login npm run build npx prisma deploy module.ts ``` To deploy on every push, also connect the repository with [`git connect`](https://www.prisma.io/docs/cli/git) and add the deploy workflow; see [Deploy on push](https://www.prisma.io/docs/compute/deploy-on-push). 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 postgres create mydb bunx prisma postgres connection create mydb ``` #### pnpm ```bash pnpm prisma postgres create mydb pnpm prisma postgres connection create mydb ``` #### yarn ```bash yarn prisma postgres create mydb yarn prisma postgres connection create mydb ``` #### npm ```bash npx prisma postgres create mydb npx prisma 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 bucket create --name my-bucket bunx prisma bucket key create ``` #### pnpm ```bash pnpm prisma bucket create --name my-bucket pnpm prisma bucket key create ``` #### yarn ```bash yarn prisma bucket create --name my-bucket yarn prisma bucket key create ``` #### npm ```bash npx prisma bucket create --name my-bucket npx prisma bucket key create ``` `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 contract emit bunx prisma db init --db "$DATABASE_URL" --advance-ref db ``` #### pnpm ```bash pnpm dlx prisma@latest orm init --target postgres --authoring psl pnpm prisma contract emit pnpm prisma db init --db "$DATABASE_URL" --advance-ref db ``` #### yarn ```bash yarn dlx prisma@latest orm init --target postgres --authoring psl yarn prisma contract emit yarn prisma db init --db "$DATABASE_URL" --advance-ref db ``` #### npm ```bash npx prisma@latest orm init --target postgres --authoring psl npx prisma contract emit npx prisma db init --db "$DATABASE_URL" --advance-ref db ``` `db init` and `db update` advance the [ref](https://www.prisma.io/docs/cli/migration-ref) named `db` on their own when you leave `--db` off and let the connection come from `prisma.config.ts`. Passing `--db` suppresses that, so add `--advance-ref db` to keep the ref current. Without it, `--db` leaves any existing `db` ref where it was, and a later [`migration plan`](https://www.prisma.io/docs/cli/migration-plan) starts from that stale contract; if the ref was never created, `migration plan` refuses with `MIGRATION.PLAN_ORIGIN_UNKNOWN` as soon as migrations exist on disk. ### Adopt an existing database [#adopt-an-existing-database] #### bun ```bash bunx prisma contract infer --db "$DATABASE_URL" --output ./prisma/contract.prisma bunx prisma contract emit bunx prisma db sign --db "$DATABASE_URL" bunx prisma db verify --db "$DATABASE_URL" ``` #### pnpm ```bash pnpm prisma contract infer --db "$DATABASE_URL" --output ./prisma/contract.prisma pnpm prisma contract emit pnpm prisma db sign --db "$DATABASE_URL" pnpm prisma db verify --db "$DATABASE_URL" ``` #### yarn ```bash yarn prisma contract infer --db "$DATABASE_URL" --output ./prisma/contract.prisma yarn prisma contract emit yarn prisma db sign --db "$DATABASE_URL" yarn prisma db verify --db "$DATABASE_URL" ``` #### npm ```bash npx prisma contract infer --db "$DATABASE_URL" --output ./prisma/contract.prisma npx prisma contract emit npx prisma db sign --db "$DATABASE_URL" npx prisma db verify --db "$DATABASE_URL" ``` `db sign` also sets the `db` ref to the signed contract, so the next `migration plan` starts from the database you adopted. Pass `--no-advance-ref` to sign without moving a ref. ### Use checked-in migrations [#use-checked-in-migrations] #### bun ```bash bunx prisma contract emit bunx prisma migration plan --name add_users bunx prisma migration status --db "$DATABASE_URL" bunx prisma db migrate --db "$DATABASE_URL" --advance-ref db bunx prisma db verify --db "$DATABASE_URL" ``` #### pnpm ```bash pnpm prisma contract emit pnpm prisma migration plan --name add_users pnpm prisma migration status --db "$DATABASE_URL" pnpm prisma db migrate --db "$DATABASE_URL" --advance-ref db pnpm prisma db verify --db "$DATABASE_URL" ``` #### yarn ```bash yarn prisma contract emit yarn prisma migration plan --name add_users yarn prisma migration status --db "$DATABASE_URL" yarn prisma db migrate --db "$DATABASE_URL" --advance-ref db yarn prisma db verify --db "$DATABASE_URL" ``` #### npm ```bash npx prisma contract emit npx prisma migration plan --name add_users npx prisma migration status --db "$DATABASE_URL" npx prisma db migrate --db "$DATABASE_URL" --advance-ref db npx prisma db verify --db "$DATABASE_URL" ``` Plain `db migrate` never moves a ref; `--advance-ref db` is what keeps the next `migration plan` incremental. Leave it off in deploy and CI applies, where a repository ref should not move. ## 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. Install after `init`, so the `prisma` dev dependency it adds is in `node_modules`: #### bun ```bash bunx --bun prisma@latest init bun install bunx prisma skills sync ``` #### pnpm ```bash pnpm dlx prisma@latest init pnpm install pnpm prisma skills sync ``` #### yarn ```bash yarn dlx prisma@latest init yarn install yarn prisma skills sync ``` #### npm ```bash npx prisma@latest init npm install npx prisma skills sync ``` ## Other commands [#other-commands] A few commands ship without dedicated pages yet. `contract format` formats your PSL contract source in place, including a Prisma ORM 7 schema read through `prisma7Schema`, and `lsp` starts the Prisma ORM language server (spawned by editors, not run interactively; see [Editor support](https://www.prisma.io/docs/orm/contract-authoring/editor-support)). The `migration` group also has read-only inspection commands: `migration list` (on-disk migrations per [contract space](https://www.prisma.io/docs/orm/migrations/the-migration-graph#terms-used-on-this-page); `--space`, `--ascii`, `--legend`), `migration log` (executed history from the database ledger; `--db`, `--utc`, `--ascii`), `migration graph` (the chain of migrations; `--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 ORM setup path`](https://www.prisma.io/docs/getting-started): Choose the fastest path to try Prisma ORM 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. - [`Introduction to Prisma ORM`](https://www.prisma.io/docs/prisma-orm): Prisma ORM 8 is the current release. - [`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. - [`Overview`](https://www.prisma.io/docs/guides): Practical, step-by-step guides for building with Prisma ORM, each one run end to end before it ships.