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

Neon · Command

neonctl roles

Neon CLI’s roles command group manages Postgres roles. It provides subcommands to create, delete, and list roles, and neonctl is an alias for neon.

How it works

The roles command group manages Postgres roles through the Neon CLI. It supports listing existing roles, creating a role, and deleting a selected role; neonctl is accepted as an alias for the documented neon executable.

Syntax

neonctl roles <create|delete <role>|list>

Parameters

NameTypeDescription
rolestringRole to remove; required by the documented delete syntax.

Returns

The page documents role-management subcommands but does not specify a single return value or output schema.

Key points

  • The create subcommand provisions a new role.
  • The delete subcommand requires the role identifier or name in the command position.
  • The list subcommand retrieves the available roles.
  • The command group can also be addressed with the singular alias role.

Common mistakes

  • The documentation names neon as the executable, but neonctl is an equivalent alias.

Example: Manage branch roles

neonctl roles list
neonctl roles create
neonctl roles delete <role>

Use the alias in place of the documented neon executable to list, create, or delete roles.

When to use it

List roles

Inspect the roles available to a project or branch from a terminal session.

Create a role

Provision a Postgres role as part of a development or deployment workflow.

Delete a role

Remove an unwanted Postgres role by name.

Interview questions

QWhat operations does the Neon CLI expose under roles?

roles is the command group for managing Postgres roles. Its documented subcommands are create, delete <role>, and list.

Follow-up: How can the command be invoked when a script uses the older executable name? Use neonctl; the documentation states it is an alias for neon.

QWhat are the basic syntaxes for the roles subcommands?

Use neonctl roles list to list roles, neonctl roles create to create one, and neonctl roles delete <role> to delete a named role.

Follow-up: Which operation needs a role argument? Deletion does, because its syntax includes <role>; listing and creation do not show one in the command reference.

QDoes the roles command group have an alias?

The command reference also gives role as an alias for roles. Therefore, the command group can be addressed with either plural or singular naming.

Follow-up: What should be checked before relying on a shorthand in automation? Confirm the installed CLI version supports the documented alias and subcommand syntax.

  • role
  • neon
  • neon roles create
  • neon roles delete
  • neon roles list

Source: cli.md. Checked 2026-10-16.