Neon CLI commands — ip-allow
Use the Neon CLI to manage Neon directly from the terminal
Before you begin
- Before running the
ip-allow
command, ensure that you have installed the Neon CLI. - If you have not authenticated with the neon 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 Neon's IP Allow feature, see Configure IP Allow.
ip-allow
command
The The ip-allow
command allows you to perform list
, add
, remove
, and reset
actions on the IP allowlist for your Neon project. You can define an allowlist with individual IP addresses, IP ranges, or CIDR notation.
Usage
neon ip-allow <subcommand> [options]
Subcommand | Description |
---|---|
list | List the IP allowlist |
add | Add IP addresses to the IP allowlist |
remove | Remove IP addresses from the IP allowlist |
reset | Reset the IP allowlist |
list
This subcommand allows you to list addresses in the IP allowlist.
Usage
neon ip-allow list [options]
Options
In addition to the Neon CLI global options, the list
subcommand supports these options:
Option | Description | Type | Required |
---|---|---|---|
--context-file | Context file path and file name | string | |
--project-id | Project ID | string | Only if your Neon account has more than one project |
Examples
neon ip-allow list --project-id cold-grass-40154007
List the IP allowlist with the --output
format set to json
:
neon ip-allow list --project-id cold-grass-40154007 --output json
add
This subcommand allows you to add IP addresses to the IP allowlist for your Neon project.
Usage
neon ip-allow add [ips ...] [options]
Options
In addition to the Neon CLI global options, the add
subcommand supports these options:
Option | Description | Type | Required |
---|---|---|---|
--context-file | Context file path and file name | string | |
--project-id | Project ID | string | Only if your Neon account has more than one project |
--protected-only | If true, the list will be applied only to the default branch. Use --protected-only false to remove this setting. | string |
Example
neon ip-allow add 192.0.2.3 --project-id cold-grass-40154007
remove
This subcommand allows you to remove IP addresses from the IP allowlist for your project.
Usage
neon ip-allow remove [ips ...] [options]
Options
In addition to the Neon CLI global options, the remove
subcommand supports these options:
Option | Description | Type | Required |
---|---|---|---|
--context-file | Context file path and file name | string | |
--project-id | Project ID | string | Only if your Neon account has more than one project |
Example
neon ip-allow remove 192.0.2.3 --project-id cold-grass-40154007
reset
This subcommand allows you to reset the list of IP addresses. You can reset to different IP addresses. If you specify no addresses, currently defined IP addresses are removed.
Usage
neon ip-allow reset [ips ...] [options]
Options
In addition to the Neon CLI global options, the reset
subcommand supports these options:
Option | Description | Type | Required |
---|---|---|---|
--context-file | Context file path and file name | string | |
--project-id | Project ID | string | Only if your Neon account has more than one project |
Example
neon ip-allow reset 192.0.2.1 --project-id cold-grass-40154007
Need help?
Join our Discord Server to ask questions or see what others are doing with Neon. Users on paid plans can open a support ticket from the console. For more details, see Getting Support.