Skip to main content
Prisma Documentation Docs

Search documentation

Type to search this documentation.

On this pageOverview

Overview

The Prisma CLI provides commands for:

  • Project setup: Initialize new Prisma projects
  • Code generation: Generate Prisma Client and other artifacts
  • Database management: Pull schemas, push changes, seed data
  • Migrations: Create, apply, and manage database migrations
  • Development tools: Local database servers, schema validation, formatting

The Prisma CLI is available as an npm package. Install it as a development dependency:

bun add prisma@prev --dev
Bash
pnpm add prisma@prev --save-dev
Bash
yarn add prisma@prev --dev
Bash
npm install prisma@prev --save-dev

[!NOTE] This page documents the Prisma 7 CLI that ships in the prisma package. Prisma 8 introduces a new, unified Prisma CLI that also includes commands for Prisma Composer and Prisma Compute. Prisma 8 publishes it as prisma@latest. See the Prisma 8 CLI reference, the deploy and dev commands, and the platform commands.

prisma [command]
Command Description
init Set up Prisma for your app
dev Start a local Prisma Postgres server for development
generate Generate artifacts (e.g. Prisma Client)
db Manage your database schema and lifecycle
migrate Migrate your database
studio Browse your data with Prisma Studio
validate Validate your Prisma schema
format Format your Prisma schema
version Display Prisma version info
debug Display Prisma debug info

These flags are available for all commands:

Flag Description
--help, -h Show help information for a command
--preview-feature Run Preview Prisma commands

Prisma CLI supports custom HTTP proxies. This is useful when behind a corporate firewall.

Set one of these environment variables:

  • HTTP_PROXY or http_proxy: Proxy URL for HTTP traffic (e.g., http://localhost:8080)
  • HTTPS_PROXY or https_proxy: Proxy URL for HTTPS traffic (e.g., https://localhost:8080)
Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu