Beta of the unified Prisma CLI.
This repository contains the unified Prisma command-line experience: one binary for the ORM, Composer, and the Prisma Developer Platform — projects, branches, services, deployments, environment variables, and the Prisma ORM schema and migration workflow.
The 8.0.0 release candidates publish as prisma (binary prisma) and
@prisma/cli (binary prisma-cli) on the next dist-tag.
pnpm add -D @prisma/cli@next
pnpm prisma-cli --helpExample workflow:
pnpm prisma-cli auth login
pnpm prisma-cli project create my-app
pnpm prisma-cli git connect git@github.com:owner/repo.git
pnpm prisma-cli project env add --file .env --role preview
pnpm prisma-cli project env list --role previewDeployments start from pushing the connected repository, the Console, or
prisma-cli composer deploy — there is no standalone deploy command.
Requirements:
- Node.js 24 or newer
- pnpm 10+
Install dependencies:
pnpm installRun the source CLI:
pnpm prisma --helpRun tests:
pnpm testBuild the package:
pnpm build:cliInspect the npm package locally without publishing:
pnpm --filter @prisma/cli pack --dry-runThe CLI groups commands by developer workflow:
authprojectgitbranchdatabasebucketapp
The canonical command shape is:
prisma <group> <action>
The package includes project, environment-variable, service and deployment
inspection, promotion, rollback, and removal commands, plus the Prisma ORM
(contract, db, migrate, migration, orm init) and Composer
workflows, and the postgres and bucket resource groups. The product
model intentionally avoids product-specific namespaces.
The public docs start at docs/README.md.
Product behavior is defined in docs/product.
Start here when changing command behavior:
docs/product/command-principles.mddocs/product/cli-style-guide.mddocs/product/output-conventions.mddocs/product/error-conventions.md
See CONTRIBUTING.md for local development and contribution guidance.
See ARCHITECTURE.md for the short architecture entrypoint.
The npm package README lives at packages/cli/README.md.
Issues and feedback are welcome while the CLI is in public beta. Pull requests should be tied to an existing issue or maintainer agreement so product behavior, docs, and tests stay aligned.
Please follow CODE_OF_CONDUCT.md in project spaces. Security reports should
use SECURITY.md, not public issues.
Manual smoke apps live in:
examples/hello-worldexamples/next-smoke
They are intentionally not part of the root pnpm workspace. Install dependencies inside an example only when you want to run manual end-to-end checks.
Publishing happens through the Publish to npm GitHub Actions workflow. Do not
publish from a local checkout unless the release owner explicitly asks you to do
so. The full policy and procedure live in docs/oss/versioning.md.
The committed root package.json version (mirrored across the workspace in
lockstep) is the release source of truth. The workflow publishes
@prisma/cli-engine and then @prisma/cli.
Release channels:
latest: releases on the Prisma 8 RC line (8.0.0-rc.N). A mergedchore(release)PR that bumps the root version (viapnpm bump-version) publishes automatically;workflow_dispatchis the manual escape hatch and the dry-run path.dev: latest successfulmainbuild. Every push tomainthat does not change the root version publishes<base>-dev.Nunder thedevdist-tag. Commit traceability comes from npm provenance and the GitHub Actions run.- PR preview packages: trusted same-repo pull requests get an installable
pkg.pr.new comment for the exact commit. Fork PRs do not publish preview
packages automatically. Preview publishing is best-effort and requires the
pkg.pr.new GitHub App to be installed for this repository. Once that app is
installed, set the repository variable
CLI_PR_PREVIEW_REQUIRED=trueto make preview publishing failures block CI.
For a release: run pnpm bump-version on a branch, commit, open the release
PR, and merge it — the merge is the publish trigger (docs/oss/versioning.md
has the full procedure).
If a release workflow fails after the npm publish step, check npm before rerunning. The package version may already be published even if the GitHub Release creation failed.