Watch Neon Developer Days #3 šŸš€
Reference/Neon CLI

Neon CLI commands ā€” projects

Use the Neon CLI to manage Neon directly from the terminal

Before you begin

  • Before running the projects command, ensure that you have installed the Neon CLI.
  • If you have not authenticated with the neonctl auth command, running a Neon CLI command automatically launches the Neon CLI browser authentication process. Alternatively, you can specify a Neon API key using the --api-key option when running a command. See Connect.

For information about projects in Neon, see Projects.

The projects command

The projects command allows you to list, create, update, delete, and retrieve information about Neon projects.

Usage

SubcommandDescription
listList projects
createCreate a project
updateUpdate a project
deleteDelete a project
getGet a project

list

This subcommand allows you to list projects that belong to your Neon account.

Usage

Options

Only global options apply.

Example

create

This subcommand allows you to create a Neon project.

The Neon Free Tier supports creating a single project. The Neon Pro Plan allows creating multiple projects.

Usage

Options

In addition to the Neon CLI global options, the create subcommand supports these options:

OptionDescriptionTypeRequired
--nameThe project name. The project ID is used if a name is not specified.string
--region-idThe region ID. Possible values: aws-us-west-2, aws-ap-southeast-1, aws-eu-central-1, aws-us-east-2, aws-us-east-1. Defaults to aws-us-east-2 if not specified.string number

Examples

  • Create a project with a user-defined name in a specific region:

    tip

    The Neon CLI provides a neonctl connection-string command you can use to extract a connection uri programmatically. See Neon CLI commands ā€” connection-string.

  • Create a project with the --output format of the command set to json. This output format returns all of the project response data, whereas the default table output format (shown in the preceding example) is limited in the information it can display.

update

This subcommand allows you to update a Neon project.

Usage

The id is the project ID, which you can obtain by listing your projects or from the Settings page in the Neon console.

Options

In addition to the Neon CLI global options, the update subcommand supports this option:

OptionDescriptionTypeRequired
--nameThe project name. The value cannot be empty.stringāœ“

Example

delete

This subcommand allows you to delete a Neon project.

The id is the project ID, which you can obtain by listing your projects or from the Settings page in the Neon console.

Options

Only global options apply.

Example

Information about the deleted project is displayed. You can verify that the project was deleted by running neonctl projects list.

get

This subcommand allows you to retrieve details about a Neon project.

Usage

The id is the project ID, which you can obtain by listing your projects or from the Settings page in the Neon console.

Options

Only global options apply.

Example

Need help?

Join the Neon community forum to ask questions or see what others are doing with Neon. Neon Pro Plan users can open a support ticket from the console. For more detail, see Getting Support.

Last updated on

Edit this page
Was this page helpful?