Prisma ORM CLI for schema setup, client generation, database introspection, migrations, and local database workflows.
$npm install prisma --save-dev
Agent Compatibility
JSON Output
Agent Skill
MCP Support
AI Analysis
Prisma CLI is the command surface around Prisma ORM for setting up schemas, generating client code, introspecting existing databases, and running migration workflows in application projects. It also includes local Prisma Postgres development helpers and Prisma Studio launch commands.
What It Enables
- Initialize a Prisma project, start local Prisma Postgres for development, and generate or regenerate Prisma Client artifacts from schema changes.
- Introspect an existing database into
schema.prisma, validate or format schema files, and compare schema states before applying changes. - Create, apply, deploy, resolve, reset, and inspect migrations, or execute SQL and seed flows against the configured datasource.
Agent Fit
- Best when an agent is already inside a Prisma codebase and needs to inspect schema files, generate client output, or run migration and introspection steps against a known database.
- Machine-readable output exists but is narrow:
prisma version --jsonandprisma platform status --jsonare structured, while most high-value ORM commands emit human-oriented text and warnings. - Non-interactive commands like
db pull,generate,validate,migrate status, andmigrate diffcompose well in scripts;migrate dev,db push,studio, and destructive reset flows are less suitable for unattended use, thoughprisma mcpis available when teams want that integration model.
Caveats
- Most commands depend on a valid
prisma.config.tsand reachable database URL; the README notes Prisma does not auto-load.envfiles for that config. - Several workflows are explicitly development-only or open a browser UI, and commands like
migrate resetordb push --force-resetcan drop data.