CLI Overview

The Prisma CLI is the command-line interface for Prisma ORM. Use it to initialize projects, generate Prisma Client, manage databases, run migrations, and more

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

Installation

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

npm install prisma --save-dev

Usage

prisma [command]

Commands

CommandDescription
initSet up Prisma for your app
devStart a local Prisma Postgres server for development
generateGenerate artifacts (e.g. Prisma Client)
dbManage your database schema and lifecycle
migrateMigrate your database
studioBrowse your data with Prisma Studio
validateValidate your Prisma schema
formatFormat your Prisma schema
versionDisplay Prisma version info
debugDisplay Prisma debug info
mcpStart an MCP server to use with AI development tools

Global flags

These flags are available for all commands:

FlagDescription
--help, -hShow help information for a command
--preview-featureRun Preview Prisma commands

Using a HTTP proxy

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)

On this page