npm.io
8.0.0-rc.22 • Published 2d agoCLI

@prisma/cli

Licence
Apache-2.0
Version
8.0.0-rc.22
Deps
12
Size
562 kB
Vulns
0
Weekly
0
Stars
23

Prisma

Prisma CLI

npm version license Node.js

Quickstart • Commands • Beta notes • Documentation • Support


@prisma/cli is the public beta of the new CLI for the Prisma Developer Platform.

It is one binary for the ORM, Composer, and the Prisma Developer Platform: projects, branches, services, service versions, environment variables, and the Prisma ORM schema and migration workflow.


Quickstart

Install the beta package locally:

npm install --save-dev @prisma/cli@next

Run the binary exposed by this package:

npx prisma-cli --help
npx prisma-cli auth login
npx prisma-cli project create my-app
npx prisma-cli git connect git@github.com:owner/repo.git

Deployments start from pushing the connected repository, the Console, or prisma-cli deploy.

With pnpm:

pnpm add -D @prisma/cli@next
pnpm prisma-cli auth login
pnpm prisma-cli git connect

Useful next commands:

npx prisma-cli service list
npx prisma-cli service logs
npx prisma-cli project env add DATABASE_URL=postgresql://example --role preview
npx prisma-cli project env add --file .env --role preview
npx prisma-cli project env list
npx prisma-cli project env list --role preview

The beta package exposes prisma-cli so it can coexist with the existing prisma executable.


Commands

Group What it does
auth Log in, log out, and inspect the active Prisma account.
project List, create, link, and manage projects and their environment variables.
git Connect or disconnect a project from a GitHub repository; pushes deploy.
branch List Prisma branches for the resolved project.
postgres Create, inspect, back up, restore, and delete Prisma Postgres databases and their connections.
bucket Create, list, and delete object-store buckets and their access keys.
service Inspect services: versions, logs, domains, promote, roll back, delete.
dev, deploy Run a Composer app locally; deploy it to the platform.
contract, db, migration, orm init, lsp The Prisma ORM workflow.

Common examples:

npx prisma-cli --version
npx prisma-cli auth whoami
npx prisma-cli project show
npx prisma-cli branch list
npx prisma-cli service list
npx prisma-cli service version promote VERSION_ID
Built for humans, CI, and agents
  • Human-readable output by default.
  • --json for structured output.
  • --no-interactive and --yes for automation.
  • PRISMA_SERVICE_TOKEN for headless authenticated commands.
  • Stable command groups, flags, and error codes for scripts and agents.
  • Environment variable values are not printed back to the terminal.

Beta notes

  • Requires Node.js 22.18 or newer.
  • This is a release-candidate package and may change quickly.
  • The 8.0.0 release candidates publish as @prisma/cli on the next dist-tag.
  • The package binary is prisma-cli; the sibling prisma package ships the same CLI under the prisma binary.
  • Local project context is cached in .prisma/local.json, which is gitignored and not a declarative repo config file.

Documentation

Support

Send a bug report or feature request directly from your terminal:

npx @prisma/cli@latest feedback "Describe what happened and what you expected"

Feedback is anonymous by default. Add --email you@example.com if you want a reply. Submissions include your message, CLI and runtime versions, OS platform, and architecture. Review your message for secrets before sending.

For a public discussion, use GitHub issues.

Security reports should follow Prisma's security policy and should not be filed as public issues.

License

Apache-2.0

Keywords