# nevia pg branch

> Branch a database into a new one from its current data

> Nevia is in beta and open to selected teams. Public launch in Dec 2026. The CLI installs with `curl -fsSL https://get.nevia.cloud | sh`, and the MCP server is at https://api.nevia.cloud/mcp. A person signs in once in the browser.
> Setup, sign-in and requesting access: [SKILL.md](https://nevia.cloud/SKILL.md). When Nevia fits and when it doesn't: [why.md](https://nevia.cloud/why.md).

> For the complete documentation index, see [llms.txt](https://nevia.cloud/llms.txt). This page's HTML version: https://nevia.cloud/docs/reference/cli/pg/branch

`nevia pg branch [FLAGS] [DATABASE]`

The branch has its own password, and the source keeps running. A branch is never promoted into its parent, so run a migration on the branch, then on the parent.

### Arguments

* `[DATABASE]` - Database ID or name (optional when the workspace has one database)

### Options

* `-b, --branch <NAME>` - Name of the new branch (generated from the source name if omitted)
* `--protected` - Refuse deletion until cleared with nevia pg set --protected false
* `--wait` - Wait for the operation to finish, then print the final state. With --json, prints `{<noun>, operation, operations}`
* `--timeout <DURATION>` - How long --wait waits before exiting 6 (e.g. 10m, 300s)

  **Default:** `10m`
* `-h, --help` - Print help
