Major update to our Free Plan: now with 1 GB of Postgres storage per project, 100 projects included
/APIs & SDKs/Projects and branches/databases

Neon CLI command: databases

List, create, and delete databases in a Neon project

The databases command lists, creates, and deletes databases in a Neon project from the terminal. For information about databases in Neon, see Manage databases. If --project-id is omitted, the CLI resolves it from your context file, auto-selects when your account has only one project, and otherwise asks you to pass --project-id.

Subcommands: create, delete, list

neon databases list

Lists databases. If you don't specify a branch ID or name with --branch, the command targets the project's default branch. This applies to all databases subcommands.

neon databases list [options]
OptionDescriptionTypeDefaultRequired
--branchBranch ID or namestring—No
--project-idProject IDstring—No
neon databases list
Output
Databases on main
Name    Owner Name    Created At
neondb  neondb_owner  2026-06-19T18:27:19Z

The table is titled with the branch the databases belong to. Pass --branch <id-or-name> to list another branch's databases.

neon databases create

Creates a database. If you don't specify --owner-name, the current user becomes the database owner.

neon databases create [options]
OptionDescriptionTypeDefaultRequired
--nameDatabase namestring—Yes
--owner-nameOwner namestring—No
--branchBranch ID or namestring—No
--project-idProject IDstring—No
neon databases create --name mynewdb --owner-name alex
Output
Database created on main
Name        mynewdb
Owner Name  alex
Created At  2026-06-19T23:45:45Z

neon databases delete

Deletes a database. The <database> is the database name.

neon databases delete <database> [options]
OptionDescriptionTypeDefaultRequired
--branchBranch ID or namestring—No
--project-idProject IDstring—No
neon databases delete mydb
Output
Database deleted from main
Name        mydb
Owner Name  neondb_owner
Created At  2026-06-19T23:45:45Z
Was this page helpful?
Edit on GitHub

On this page

Copy neon init command