# studio (Prisma CLI v7) (/docs/cli/v7/studio)

Browse and manage your database data with Prisma Studio web interface

Location: CLI > v7 > studio

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]
```

> \[!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

#### bun

```bash
bunx prisma studio
```

#### pnpm

```bash
pnpm prisma studio
```

#### yarn

```bash
yarn prisma studio
```

#### npm

```bash
npx prisma studio
```

### Start Studio on a custom port

#### bun

```bash
bunx prisma studio --port 7777
```

#### pnpm

```bash
pnpm prisma studio --port 7777
```

#### yarn

```bash
yarn prisma studio --port 7777
```

#### npm

```bash
npx prisma studio --port 7777
```

### Start Studio in a specific browser

#### bun

```bash
bunx prisma studio --browser firefox
```

#### pnpm

```bash
pnpm prisma studio --browser firefox
```

#### yarn

```bash
yarn prisma studio --browser firefox
```

#### npm

```bash
npx prisma studio --browser firefox
```

Or using the `BROWSER` environment variable:

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

### Start Studio without opening a browser

#### bun

```bash
bunx prisma studio --browser none
```

#### pnpm

```bash
pnpm prisma studio --browser none
```

#### yarn

```bash
yarn prisma studio --browser none
```

#### npm

```bash
npx prisma studio --browser none
```

### Start Studio with a custom config file

#### bun

```bash
bunx prisma studio --config=./prisma.config.ts
```

#### pnpm

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

#### yarn

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

#### npm

```bash
npx prisma studio --config=./prisma.config.ts
```

### Start Studio with a direct database connection string

#### bun

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

#### pnpm

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

#### yarn

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

#### npm

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

## Related pages

- [`db`](/guides/db-commands-db): Manage your database schema and lifecycle during development
- [`debug`](/guides/standalone-commands-debug): Display Prisma debug information including schema paths, engine binaries, environment variables, and cache directories for troubleshooting
- [`dev`](/guides/dev-commands-dev): Start a local Prisma Postgres server for development
- [`format`](/guides/standalone-commands-format): Format and validate your Prisma schema file with consistent structure
- [`generate`](/guides/standalone-commands-generate): Generate artifacts like Prisma Client based on your Prisma schema

## 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.
