prisma-cli

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

Updated Aug 20, 2026
One-click install
npx skills add https://github.com/rhorba/RestoLedger --skill prisma-cli-rhorba
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prisma-cli
Source: https://github.com/rhorba/RestoLedger/tree/main/api/.windsurf/skills/prisma-cli
Command: npx skills add https://github.com/rhorba/RestoLedger --skill prisma-cli-rhorba

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, db push, and studio, including correct flags, configuration via prisma.config.ts, and safety rules for 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: Enforces explicit user consent 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, follow the guidance to run prisma init, configure prisma.config.ts, start a local database with prisma dev, create migrations with prisma migrate dev, and generate the client with prisma generate. ## Quick Start Ask the assistant to show how to create and apply a named Prisma migration and then regenerate 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?

Run prisma migrate dev --name your_migration_name to create and apply a migration during development. For production, commit the migration files and apply them with prisma migrate deploy, which never generates new migrations.

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

Does Prisma CLI work with Bun?

Yes, but you must run it with bunx --bun so Prisma uses the Bun runtime. Without the --bun flag, the CLI falls back to Node.js because of its shebang.

Why is prisma migrate reset blocked when an AI agent runs it?

Prisma detects AI agent environments and blocks destructive commands like migrate reset and db push --force-reset until the user gives explicit consent. The agent must explain the data-loss impact and obtain consent immediately before running the command.

How do I seed the database after running migrations?

Configure a seed command in prisma.config.ts under migrations.seed, such as tsx prisma/seed.ts, then run prisma db seed explicitly. Current Prisma versions do not run seeds automatically after migrate dev or migrate reset.

When should I not use prisma db push?

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