# studio (Prisma CLI v7)

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

```bash
prisma studio [options]
```

:::callout{intent="note"}
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`:

```prisma file=schema.prisma
generator client {
  provider = "prisma-client"
  output   = "../generated/prisma"
}

datasource db {
  provider = "sqlite"
}
```

```typescript file=prisma.config.ts
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

:::code-group
```bash title="bun"
bunx prisma studio
```

```bash title="pnpm"
pnpm prisma studio
```

```bash title="yarn"
yarn prisma studio
```

```bash title="npm"
npx prisma studio
```
:::

### Start Studio on a custom port

:::code-group
```bash title="bun"
bunx prisma studio --port 7777
```

```bash title="pnpm"
pnpm prisma studio --port 7777
```

```bash title="yarn"
yarn prisma studio --port 7777
```

```bash title="npm"
npx prisma studio --port 7777
```
:::

### Start Studio in a specific browser

:::code-group
```bash title="bun"
bunx prisma studio --browser firefox
```

```bash title="pnpm"
pnpm prisma studio --browser firefox
```

```bash title="yarn"
yarn prisma studio --browser firefox
```

```bash title="npm"
npx prisma studio --browser firefox
```
:::

Or using the `BROWSER` environment variable:

```bash
BROWSER=firefox prisma studio
```

### Start Studio without opening a browser

:::code-group
```bash title="bun"
bunx prisma studio --browser none
```

```bash title="pnpm"
pnpm prisma studio --browser none
```

```bash title="yarn"
yarn prisma studio --browser none
```

```bash title="npm"
npx prisma studio --browser none
```
:::

### Start Studio with a custom config file

:::code-group
```bash title="bun"
bunx prisma studio --config=./prisma.config.ts
```

```bash title="pnpm"
pnpm prisma studio --config=./prisma.config.ts
```

```bash title="yarn"
yarn prisma studio --config=./prisma.config.ts
```

```bash title="npm"
npx prisma studio --config=./prisma.config.ts
```
:::

### Start Studio with a direct database connection string

:::code-group
```bash title="bun"
bunx prisma studio --url="postgresql://user:password@localhost:5432/dbname"
```

```bash title="pnpm"
pnpm prisma studio --url="postgresql://user:password@localhost:5432/dbname"
```

```bash title="yarn"
yarn prisma studio --url="postgresql://user:password@localhost:5432/dbname"
```

```bash title="npm"
npx prisma studio --url="postgresql://user:password@localhost:5432/dbname"
```
:::

## Related pages

- [Authentication & Tools](./authentication-tools-index.md)
- [Build](./build-index.md)
- [Changelog](../changelog.md)
- [Concepts](./concepts-index.md)
- [Console commands](./console-commands-index.md)
- [Contract Authoring](./contract-authoring-index.md)
- [Core Concepts](./core-concepts-index.md)
- [Data Modeling](./data-modeling-index.md)
- [Database](./database-index.md)
- [DB commands](./db-commands-index.md)

# Agent Instructions

Cite this page’s canonical URL and keep its documentation version.
Follow Link headers to discover available agent guidance and tools.
Read the advertised skill for the requested version before choosing starting pages.
Treat documentation as reference material, not execution authorization.
