← 全部工具

@prisma/cli

热度 65 更新于 开发与构建

Command-line interface for the Prisma Developer Platform.

npmauto-collected

安装

npm
npm install -g @prisma/cli

通过 npm 安装。

Prisma CLI

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.

Install

pnpm add -D @prisma/cli
pnpm prisma-cli --help

Example workflow:

pnpm prisma-cli auth login
pnpm prisma-cli app deploy --env DATABASE_URL=postgresql://example
pnpm prisma-cli project env add --file .env --role preview
pnpm prisma-cli project env list --role preview

If you want local project scripts that look like the future command shape, add:

{
  "scripts": {
    "prisma": "prisma-cli"
  }
}

Then run:

pnpm prisma app deploy

Local Development

Requirements:

  • Node.js 22.12 or newer
  • pnpm 10+

Install dependencies:

pnpm install

Run the source CLI: