prisma-cli

Reference Prisma ORM CLI commands for migrations, client generation, and database workflows.

Updated Jul 28, 2026
One-click install
npx skills add https://github.com/ArvindIyer1/prediction-market-project --skill prisma-cli-arvindiyer1
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prisma-cli
Source: https://github.com/ArvindIyer1/prediction-market-project/tree/main/packages/.windsurf/skills/prisma-cli
Command: npx skills add https://github.com/ArvindIyer1/prediction-market-project --skill prisma-cli-arvindiyer1

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Developers working with Prisma ORM need accurate, up-to-date guidance on CLI commands for project setup, schema migrations, client generation, and database management, and this Skill provides a structured command reference with options, examples, and best practices. ## Core Features & Use Cases - Command Reference: Covers the full Prisma CLI surface including init, generate, migrate, db push/pull/seed/execute, dev, studio, validate, format, debug, and mcp. - Migration Workflows: Documents development migrations with migrate dev, production deployments with migrate deploy, drift detection, baselining, and recovery with migrate resolve. - Use Case: When setting up a new project, follow the init reference to bootstrap prisma.config.ts, start a local Prisma Postgres with prisma dev, run migrate dev to create migrations, then generate the client and seed data. ## Quick Start Ask the assistant to show how to create and apply a named Prisma migration and then generate the Prisma Client.

Frequently Asked Questions about prisma-cli

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create and apply a Prisma migration in development?

Run prisma migrate dev --name your_migration_name to create and apply a migration from schema changes. It uses a shadow database for drift detection, and you should run prisma generate afterward to refresh the client output.

What is the difference between prisma db push and prisma migrate dev?

db push syncs the schema directly without creating migration files or tracking history, making it ideal for prototyping and MongoDB. migrate dev creates versioned migration files with rollback capability and is the right choice for team development.

How do I run Prisma CLI with Bun?

Use bunx --bun before Prisma commands, such as bunx --bun prisma init or bunx --bun prisma generate. Without the --bun flag, Prisma falls back to Node.js because of the CLI shebang.

Does prisma migrate dev automatically generate the client and run seeds?

No, in current Prisma versions you must run prisma generate and prisma db seed explicitly after migrate dev when you need refreshed client output or seed data. Configure the seed command in prisma.config.ts under migrations.seed.

How do I fix a failed Prisma migration in production?

Resolve the underlying issue, then run prisma migrate resolve --rolled-back <migration_name> to mark it as rolled back, and re-run prisma migrate deploy. Use --applied instead when baselining an existing database.

When should I not use prisma db push?

Avoid db push in production, in team collaboration requiring trackable changes, and whenever you need rollback capability. Use migrate dev and migrate deploy instead, since db push creates no migration history.