Skip to content
masterclassBuddyTech Buzz5 fresh blogs · 5:00 AM IST

Neon · Command

neonctl databases

Lists the databases belonging to a specified Neon branch. The operation is read-only and returns the branch's database collection.

How it works

The command retrieves the databases belonging to a Neon branch. Provide the branch identifier as an argument; the command is read-only and does not modify database state.

Syntax

neonctl databases list <branch_id>

Parameters

NameTypeDescription
branch_idstringIdentifier of the Neon branch whose databases should be listed.

Returns

A list of databases for the specified branch.

Key points

  • A single Neon branch may contain more than one database, so listing is branch-scoped.
  • The list operation returns the databases associated with the selected branch.
  • The underlying API route is a GET request for databases under a project branch.

Example: List branch databases

neon databases list <branch_id>

Lists the databases on the specified branch.

When to use it

Discover branch databases

Inspect a branch before connecting or running administrative work.

Check provisioning results

Verify which databases exist after provisioning or migration automation.

Automate branch-aware tooling

Feed database metadata into scripts that select a target database.

Interview questions

QWhat does neonctl databases list do?

It lists the databases associated with a specified Neon branch. The branch ID is required because databases belong to branches.

Follow-up: How would you identify the branch to query? Use the Neon CLI's branch-listing command or obtain the branch ID from the project configuration.

QDoes listing databases change project state?

The command is read-only: it retrieves database metadata and does not create, alter, or delete a database.

Follow-up: Which operation would remove a database? Use the database-delete command with the appropriate branch context and database target.

QWhy is a branch ID needed?

The command requires a branch identifier, represented as <branch_id> in the CLI syntax. A branch can contain multiple databases, so the result describes that branch's database collection.

Follow-up: What API operation corresponds to this behavior? The branch-database list operation, using the project ID and branch ID as path parameters.

  • neon databases create
  • neon databases delete
  • neon branches list
  • List databases

Source: List databases - Neon Docs. Checked 2026-10-16.