prisma-cli

Reference Prisma ORM CLI commands for project setup, client generation, migrations, and database operations.

Updated Aug 30, 2026
One-click install
npx skills add https://github.com/Rashidrxq/SalesOrder-ERP-REMEX --skill prisma-cli-rashidrxq
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: prisma-cli
Source: https://github.com/Rashidrxq/SalesOrder-ERP-REMEX/tree/main/sales_order/.windsurf/skills/prisma-cli
Command: npx skills add https://github.com/Rashidrxq/SalesOrder-ERP-REMEX --skill prisma-cli-rashidrxq

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Developers working with Prisma ORM need accurate, current guidance on CLI commands like init, generate, migrate, and db push, including correct flags, configuration via prisma.config.ts, and safe handling of destructive operations. ## Core Features & Use Cases - Command Reference: Covers the full Prisma ORM CLI surface including init, generate, migrate dev/deploy/reset/status/diff/resolve, db pull/push/seed/execute, dev, studio, validate, format, debug, complete, and mcp. - AI Safety Checkpoint: Documents the consent workflow required before destructive commands like migrate reset or db push --force-reset when an AI agent is detected. - Use Case: When setting up a new project, ask for the correct prisma init and migrate dev workflow, and receive the exact commands plus prisma.config.ts configuration for your database provider. ## Quick Start Ask the assistant to show the correct Prisma CLI commands for creating and applying a migration in a PostgreSQL project.

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. Afterwards, run prisma generate and prisma db seed explicitly if you need refreshed client output or seed data.

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 faster for prototyping and required for MongoDB. migrate dev creates versioned migration files with rollback capability and drift detection, suited for team development.

How do I apply Prisma migrations in production?▼

Use prisma migrate deploy, which applies pending migrations without prompts, shadow databases, or drift detection, making it safe for CI/CD pipelines. Run prisma migrate status first to verify pending migrations before deploying.

Why is prisma migrate reset blocked when run by an AI agent?▼

Prisma detects AI agent environments and blocks destructive commands like migrate reset and db push --force-reset until explicit user consent is given. The agent must explain the data-loss impact, obtain consent, and pass the exact consent text via PRISMA_USER_CONSENT_FOR_DANGEROUS_AI_ACTION.

Does Prisma CLI work with Bun?▼

Yes, but you must run it with bunx --bun so Prisma uses the Bun runtime instead of falling back to Node.js due to the CLI shebang. This applies to commands like bunx --bun prisma init and bunx --bun prisma generate.

How do I introspect an existing database into a Prisma schema?▼

Run prisma db pull after configuring the datasource URL in prisma.config.ts. It reads tables, columns, and relations into schema.prisma. Use --print to preview first, since pulling overwrites the existing schema file.