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.
projects
command
The The projects
command allows you to list, create, update, delete, and retrieve information about Neon projects.
Usage
Subcommand | Description |
---|---|
list | List projects |
create | Create a project |
update | Update a project |
delete | Delete a project |
get | Get 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:
Option | Description | Type | Required |
---|---|---|---|
--name | The project name. The project ID is used if a name is not specified. | string | |
--region-id | The 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 tojson
. This output format returns all of the project response data, whereas the defaulttable
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:
Option | Description | Type | Required |
---|---|---|---|
--name | The 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