PrismaFlow
Open Source · MIT Licensed

Visual Prisma
Migration Safety

See migration state, schema drift, risk, and deployment readiness before you ship - a CLI + web dashboard for every Prisma project.

terminal
npx prisma-flow
prisma-flow
$ npx prisma-flow
Detecting Prisma project...
Prisma project detected
Schema:    prisma/schema.prisma
Migrations: 12 found
Database connected
PrismaFlow dashboard running
→ http://localhost:5555?token=a3f8c2...
Auth token printed above - keep it private.
Press Ctrl+C to stop
14
CLI Commands
19+
API Endpoints
7
Risk Detectors
6
Drift Types
V1 Workflow

What you see in the first minute

PrismaFlow is built for fast operational clarity: detect the project, assess readiness, inspect the evidence, and export the result.

Project detection

Finds schema, migrations, provider, Prisma version, package manager, and DATABASE_URL state.

Live readiness

Combines connection, pending migrations, failed migrations, drift, and critical risks into one score.

Risk evidence

Highlights destructive SQL and explains what needs review before a deploy proceeds.

CI artifacts

Produces deterministic exit codes and JSON or Markdown reports for pull requests.

Dashboard

A real control surface for migration review

The dashboard turns raw Prisma state into scan-friendly project metadata, readiness checks, and deploy actions.

PrismaFlow dashboard showing project status, readiness, and migration risk
Features

Everything V1 needs for Prisma migration confidence

From drift detection to schema exploration, PrismaFlow gives developers clear visibility into database changes before they hit production.

Schema Drift Detection

Compare your Prisma schema to the live database. Detect manual ALTER TABLE changes, orphaned indexes, and constraint mismatches before deploy.

Risk Analysis

Every migration is scanned for destructive operations — DROP TABLE, DROP COLUMN, TRUNCATE, bulk DELETE. Color-coded risk badges protect you from dangerous deploys.

Live Dashboard

A browser-based UI that auto-updates every few seconds. See connection status, pending/applied/failed migrations, and drift alerts at a glance.

Powerful CLI

Dashboard, status, check, report, doctor, inspect, simulate, and history commands give you control from the terminal. JSON output supports scripts and CI.

CI/CD Ready

Run prisma-flow check --ci in GitHub Actions, GitLab CI, or Jenkins. Structured exit codes (0-5) and JSON output integrate with any pipeline.

Secure by Default

Per-session 192-bit auth tokens, localhost-only CORS policy, execFile() child processes, and no cloud calls unless telemetry is explicitly enabled.

Schema Explorer

Browse Prisma models, fields, relations, enums, indexes, and constraints with an ERD-style overview built from your schema.

Migration Timeline

A visual timeline showing applied, pending, and failed migrations with timestamps, duration, and risk context.

Deployment Plan

A health score, go/no-go decision, blockers, and exact next commands summarize what to do before deploy.

How It Works

Four steps to safe migrations

PrismaFlow wraps the Prisma CLI. Dashboard, status, check, and report flows are read-only by default.

01

Detect

PrismaFlow scans your project — finds the schema, discovers migrations, checks DATABASE_URL. Zero configuration needed.

02

Analyse

Runs prisma migrate status and prisma migrate diff under the hood. Parses SQL output to classify every difference and assign risk levels.

03

Visualise

Results are served via a local Hono API server and displayed in a Next.js dashboard with auto-refreshing status cards, timelines, and alerts.

04

Protect

Integrate with CI/CD using the check command. Block deploys when drift, failed migrations, or critical risks are detected.

architecture
Your Project Directory
┌────────────────────────────────────────┐
│ prisma-flow CLI │
│ │
│ 1. Reads prisma/schema.prisma │
│ 2. Runs prisma migrate status │ ◄── Prisma CLI
│ 3. Runs prisma migrate diff │
│ 4. Classifies drift & assigns risk │
│ 5. Starts Hono HTTP server │
│ • Per-session auth token │
│ • Serves static dashboard │
│ • Exposes /api/* REST endpoints │
└──────────────────┬─────────────────────┘
│ http://localhost:5555
┌────────────────────────────────────────┐
│ Web Dashboard (Next.js) │
│ │
│ • Polls /api/status every 5 s │
│ • Polls /api/migrations every 10 s │
│ • Polls /api/drift every 15 s │
│ • Renders live migration state │
│ • Shows drift alerts w/ re-check btn │
└────────────────────────────────────────┘
Get Started

Up and running in 30 seconds

No configuration files. No Prisma dependency changes. Just run the command from your project root.

Recommended

Zero Install

Download and run in one command. Nothing persisted globally.

terminal
npx prisma-flow
Daily Use

Global Install

Install once, use from any Prisma project on your machine.

terminal
npm install -g prisma-flow
prisma-flow
Teams

Dev Dependency

Pin the version for your team. Add scripts to package.json.

terminal
npm install --save-dev prisma-flow

Requirements: Node.js 20+, Prisma 5+, DATABASE_URL set in .env

CLI

Complete local CLI surface

The website now covers the full shipped command set: core dashboard and CI commands, analysis tools, and advanced local utilities.

prisma-flow(default)

Launch the visual dashboard in your browser

-p, --port <port>--no-open
prisma-flow status

Print migration & drift state to the terminal

--json--quiet
prisma-flow check

Validate state for CI/CD with structured exit codes (0-5)

--ci--json--fail-on-risk <level>
prisma-flow plan

Generate a deploy decision with blockers and next commands

--format <format>--json--ci-o, --output <path>
prisma-flow report

Generate a local JSON or Markdown report for reviews and CI artifacts

--format <format>-o, --output <path>
prisma-flow init

Create prismaflow.config.ts with documented defaults

-f, --force
prisma-flow doctor

Run environment checks (Node, Prisma, DB, schema, migrations)

--json
prisma-flow inspect

Inspect one migration with SQL, risk analysis, and simulation summary

--json--sql--rollback
prisma-flow simulate

Preview migration statements and destructive warnings before execution

--json--fail-on-destructive
prisma-flow history

Show a terminal migration timeline with status and risk context

--limit <n>--json--git
prisma-flow diff

Compare the Prisma schema with a database URL

--from <url>--json--breaking-only
prisma-flow compare

Compare configured environments for migration divergence

--envs <names>--json
prisma-flow repair

List drift repair suggestions and optionally apply safe steps

--apply--json
prisma-flow rollback

Generate rollback SQL for a migration

--json--print-sql--include-manual

CI/CD Integration — GitHub Actions

.github/workflows/deploy.yml
1name: Deploy
2on:
3 push:
4 branches: [main]
5
6jobs:
7 migration-check:
8 runs-on: ubuntu-latest
9 steps:
10 - uses: actions/checkout@v4
11 - uses: actions/setup-node@v4
12 with:
13 node-version: '20.x'
14 - run: npm ci
15 - name: Build migration plan
16 run: npx prisma-flow plan --ci --json
17 env:
18 DATABASE_URL: ${{ secrets.DATABASE_URL }}
19 - name: Check migration state
20 run: npx prisma-flow check --ci
21 env:
22 DATABASE_URL: ${{ secrets.DATABASE_URL }}
23 - name: Generate report
24 run: npx prisma-flow report --format markdown --output prismaflow-report.md
REST API

Programmatic access to local migration state

The dashboard is powered by a token-protected local REST API. Use it from scripts, custom dashboards, or local monitors.

Endpoints

GET/api/status
GET/api/plan
GET/api/migrations
GET/api/migrations/:name
GET/api/drift
POST/api/drift/check
GET/api/risks
GET/api/simulate/:name
GET/api/schema
GET /api/status — Response
1{
2 "success": true,
3 "data": {
4 "connected": true,
5 "migrationsApplied": 10,
6 "migrationsPending": 2,
7 "migrationsFailed": 0,
8 "driftDetected": false,
9 "driftCount": 0,
10 "riskLevel": "low",
11 "healthScore": 100,
12 "deploymentReadiness": {
13 "status": "ready",
14 "score": 100
15 },
16 "provider": "postgresql",
17 "lastSync": "2026-02-28T12:00:00Z"
18 }
19}
Open Source

V1 is free, local-first, and unlimited

No account, no cloud dependency, no artificial usage limits. PrismaFlow V1 focuses only on Prisma migration visibility and deployment confidence.

Open Source V1

Everything needed to understand and safely ship Prisma database changes.

$0forever
  • Unlimited local Prisma projects
  • Visual migration timeline
  • Drift detection with explanations
  • Risk analysis and recommendations
  • Migration simulation
  • Schema explorer and ERD-style overview
  • Health score and deployment readiness
  • Deployment plan with next commands
  • Reports and CI integration
Get Started

Ready to ship migrations safely?

Get started in under a minute. No sign-up required.

terminal
npx prisma-flow