Inspect project branches
Review available development, staging, and production branches from a terminal.
Neon · Command
Lists branches in a Neon project. It supports optional project selection and richer JSON output in addition to the default table format.
Run this command to retrieve the branches belonging to a Neon project. Without a project identifier, it uses the project associated with the current Neon context; the default table view shows branch identity, state, expiration, and creation time, while JSON output provides additional details.
neon branches list [options]| Name | Type | Description |
|---|---|---|
--project-id | string | Project ID; optional string identifying the Neon project. |
--output | string | Selects the output format, including JSON output. |
A list of project branches, displayed by default as a table or, with --output json, as JSON containing more information.
neon branches list --project-id solitary-leaf-288182Lists the branches in the specified Neon project using the default table format.
Review available development, staging, and production branches from a terminal.
Feed complete branch metadata into a script or CI job.
Confirm which branch is default, protected, anonymized, or locally pinned.
neon branches list do, and what is its syntax?The command is neon branches list [options]. It lists branches in a Neon project, and --project-id optionally selects the project.
Follow-up: How would you inspect fields omitted from the table? Use --output json, which returns more information than the default table format.
The default output format is a table. A project ID can be supplied with --project-id, and the option is optional.
Follow-up: What should you do if the table lacks a field needed by automation? Request JSON output with --output json.
The table includes branch name, ID, current state, expiration, and creation time. Text labels identify statuses such as default, protected, anonymized, and current.
Follow-up: How is the current label determined? It marks the branch pinned in the local .neon context file.
neon branchesneon branches getneon branches create