Beta of the unified Prisma CLI.
This repository contains the unified Prisma command-line experience. The current implementation focuses on app deployment workflows while preserving the long-term command model for Prisma projects, branches, schemas, databases, and apps.
Official beta releases use the primary @prisma/cli package line. The package
exposes a prisma-cli binary so it can coexist with the existing prisma
executable.
pnpm add -D @prisma/cli
pnpm prisma-cli --helpExample workflow:
pnpm prisma-cli auth login
pnpm prisma-cli app deploy --env DATABASE_URL=postgresql://example
pnpm prisma-cli project env list --role previewIf you want local project scripts that look like the future command shape, add:
{
"scripts": {
"prisma": "prisma-cli"
}
}Then run:
pnpm prisma app deployRequirements:
- Node.js 20+
- pnpm 10+
Install dependencies:
pnpm installRun the source CLI:
pnpm prisma --helpRun tests:
pnpm testBuild the package:
pnpm build:cliStage the npm package locally without publishing:
pnpm build:cli
pnpm prepare:cli-publishThe CLI groups commands by developer workflow:
authprojectgitbranchapp
The canonical command shape is:
prisma <group> <action>
The beta package includes app build, run, deploy, environment-variable, deployment inspection, promotion, rollback, and removal commands. The product model intentionally keeps room for future schema, database, and migration workflows without introducing 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/resource-model.mddocs/product/command-principles.mddocs/product/command-spec.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 and is copied into the
staged publish artifact.
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 CLI GitHub Actions workflow. Do not
publish from a local checkout unless the release owner explicitly asks you to do
so.
The committed packages/cli/package.json version is a development placeholder.
Release versions are injected by CI when the staged npm package is prepared.
Release channels:
@prisma/cli/latest: official beta releases. RunPublish CLImanually; it computes the next3.0.0-beta.N, publishes with thelatestdist-tag, and createscli-v<version>.@prisma/cli@dev: latest successfulmainbuild. Every push tomainpublishes a unique3.0.0-dev.<run_number>.<run_attempt>version with 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 an official beta release:
- Run
Publish CLIwithdry_run: true. - Check the computed version and package checks.
- Run
Publish CLIwithdry_run: false.
If a release workflow fails after the npm publish step, check npm before rerunning. The package version may already be published even if tag creation failed.