Prisma CLI Overview
Prisma CLI is a modern database toolkit for querying, migrating, and modeling your database.Installation
Usage
Available Commands
| 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 |
platform | Prisma Data Platform commands |
mcp | Start an MCP server to use with AI development tools |
Global Options
Show help information for any command.Alias:
-hDisplay Prisma version information.Alias:
-vCustom path to your Prisma config file.
Run Preview Prisma commands.
Common Examples
Initialize a new project
Start local development server
Generate Prisma Client
Open Prisma Studio
Run migrations in development
Pull schema from database
Push schema to database
Validate schema
Format schema
Getting Help
For detailed help on any command, use the--help flag:
Exit Codes
0- Success1- General error130- User cancelled operation (SIGINT)
Configuration
The Prisma CLI reads configuration fromprisma.config.ts (or prisma.config.js) by default. You can specify a custom config path with the --config option.
For legacy projects, the CLI also supports schema.prisma files with the --schema option.