Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 22 additions & 7 deletions content/200-orm/500-reference/200-prisma-cli-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -839,13 +839,14 @@ The `dev` command starts a [local Prisma Postgres](/postgres/database/local-deve

### Arguments

| Argument | Required | Description | Default |
| --------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| `--name` (or `-n`) | No | Enables targeting a specific database instance. [Learn more](/postgres/database/local-development#using-different-local-prisma-postgres-instances). | |
| `--port` (or `-p`) | No | Main port number the local Prisma Postgres HTTP server will listen on. | `51213` |
| `--db-port` (or `-P`) | No | Port number the local Prisma Postgres database server will listen on. | `51214` |
| `--shadow-db-port` | No | Port number the shadow database server will listen on. | `51215` |
| `--debug` | No | Enable debug logging. | `false` |
| Argument | Required | Description | Default |
| --------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | --------- |
| `--name` (or `-n`) | No | Enables targeting a specific database instance. [Learn more](/postgres/database/local-development#using-different-local-prisma-postgres-instances). | `default` |
| `--port` (or `-p`) | No | Main port number the local Prisma Postgres HTTP server will listen on. | `51213` |
| `--db-port` (or `-P`) | No | Port number the local Prisma Postgres database server will listen on. | `51214` |
| `--shadow-db-port` | No | Port number the shadow database server will listen on. | `51215` |
| `--detach` (or `-d`) | No | Run the server in the background. | `false` |
| `--debug` | No | Enable debug logging. | `false` |

### Examples

Expand Down Expand Up @@ -887,6 +888,14 @@ npx prisma dev --name="mydbname"

This creates a named instance called `mydbname` that you can later start, stop, or manage using the instance management commands.

**Run `prisma dev` in detached mode**

```terminal
npx prisma dev --detach
```

This runs the server in the background, freeing up your terminal for other commands. Use `prisma dev ls` to see running servers and `prisma dev stop` to stop them.

### `dev start`

Starts existing [local Prisma Postgres](/postgres/database/local-development) instances in the background.
Expand Down Expand Up @@ -971,6 +980,12 @@ To remove all databases that begin with `mydb` (e.g. `mydb-dev` and `mydb-prod`)
npx prisma dev rm mydb* # removes all DBs starting with `mydb`
```

#### Arguments

| Argument | Required | Description | Default |
| --------- | -------- | -------------------------------------------------------------------------------------------------------------------- | ------- |
| `--force` | No | Stops any running servers before removing them. Without this flag, the command will fail if any server is running. | `false` |

:::note

The `rm` command is interactive and includes safety prompts to prevent accidental data loss.
Expand Down
Loading