studio
Browse and manage your database data with Prisma Studio web interface
The prisma studio command starts a local web server with a web app to interactively browse and manage your data.
Usage
prisma studio [options]Supported databases
Prisma Studio currently supports PostgreSQL, MySQL, and SQLite. Support for CockroachDB and MongoDB is not available yet but may be added in future releases.
Prerequisites
Configure your database connection in prisma.config.ts:
generator client {
provider = "prisma-client"
output = "../generated/prisma"
}
datasource db {
provider = "sqlite"
}import { defineConfig, env } from "prisma/config";
export default defineConfig({
schema: "prisma/schema.prisma",
migrations: {
path: "prisma/migrations",
},
datasource: {
url: env("DATABASE_URL"),
},
});Options
| Option | Description | Default |
|---|---|---|
-h, --help | Display help message | |
-p, --port | Port number to start Studio on | 5555 |
-b, --browser | Browser to auto-open Studio in | System default |
--config | Custom path to your Prisma config file | |
--url | Database connection string (overrides Prisma config) |
Examples
Start Studio on the default port
npx prisma studioStart Studio on a custom port
npx prisma studio --port 7777Start Studio in a specific browser
npx prisma studio --browser firefoxOr using the BROWSER environment variable:
BROWSER=firefox prisma studioStart Studio without opening a browser
npx prisma studio --browser noneStart Studio with a custom config file
npx prisma studio --config=./prisma.config.tsStart Studio with a direct database connection string
npx prisma studio --url="postgresql://user:password@localhost:5432/dbname"