KosmoKrator

data

Neon CLI for AI Agents

Use the Neon CLI from KosmoKrator to call Neon tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

7 functions 6 read 1 write Bearer token auth

Neon CLI Setup

Neon can be configured headlessly with `kosmokrator integrations:configure neon`.

# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash

# Configure and verify this integration.
kosmokrator integrations:configure neon --set access_token="$NEON_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmokrator integrations:doctor neon --json
kosmokrator integrations:status --json

Credentials

Authentication type: Bearer token bearer_token. Configure credentials once, then use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
access_token NEON_ACCESS_TOKEN Secret secret yes API Key
url NEON_URL URL url no API Base URL

Call Neon Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

kosmo integrations:call neon.neon_list_projects '{}' --json

Use the provider shortcut form for shorter human-facing commands.

kosmo integrations:neon neon_list_projects '{}' --json

Agent Discovery Commands

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

kosmo integrations:docs neon --json
kosmo integrations:docs neon.neon_list_projects --json
kosmo integrations:schema neon.neon_list_projects --json
kosmo integrations:search "Neon" --json
kosmo integrations:list --json

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to Neon.

neon.neon_list_projects

Read read

List all Neon projects in the organization. Returns project IDs, names, region, and status.

Parameters
none

Generic CLI call

kosmo integrations:call neon.neon_list_projects '{}' --json

Provider shortcut

kosmo integrations:neon neon_list_projects '{}' --json

neon.neon_get_project

Read read

Get details for a specific Neon project by ID. Returns full project information including connection strings, branches, and settings.

Parameters
project_id

Generic CLI call

kosmo integrations:call neon.neon_get_project '{"project_id":"example_project_id"}' --json

Provider shortcut

kosmo integrations:neon neon_get_project '{"project_id":"example_project_id"}' --json

neon.neon_create_project

Write write

Create a new Neon project. Requires a name. Optionally specify a region and Postgres version.

Parameters
name, region_id, pg_version, branch_name, database_name

Generic CLI call

kosmo integrations:call neon.neon_create_project '{"name":"example_name","region_id":"example_region_id","pg_version":1,"branch_name":"example_branch_name","database_name":"example_database_name"}' --json

Provider shortcut

kosmo integrations:neon neon_create_project '{"name":"example_name","region_id":"example_region_id","pg_version":1,"branch_name":"example_branch_name","database_name":"example_database_name"}' --json

neon.neon_list_branches

Read read

List all branches in a Neon project. Returns branch IDs, names, status, and parent branch info.

Parameters
project_id

Generic CLI call

kosmo integrations:call neon.neon_list_branches '{"project_id":"example_project_id"}' --json

Provider shortcut

kosmo integrations:neon neon_list_branches '{"project_id":"example_project_id"}' --json

neon.neon_get_branch

Read read

Get details for a specific branch in a Neon project. Returns branch configuration, endpoints, and state.

Parameters
project_id, branch_id

Generic CLI call

kosmo integrations:call neon.neon_get_branch '{"project_id":"example_project_id","branch_id":"example_branch_id"}' --json

Provider shortcut

kosmo integrations:neon neon_get_branch '{"project_id":"example_project_id","branch_id":"example_branch_id"}' --json

neon.neon_list_databases

Read read

List all databases in a Neon project branch. Returns database names, owners, and sizes.

Parameters
project_id, branch_id

Generic CLI call

kosmo integrations:call neon.neon_list_databases '{"project_id":"example_project_id","branch_id":"example_branch_id"}' --json

Provider shortcut

kosmo integrations:neon neon_list_databases '{"project_id":"example_project_id","branch_id":"example_branch_id"}' --json

neon.neon_get_current_user

Read read

Get information about the current authenticated Neon user, including email, name, and organization membership.

Parameters
none

Generic CLI call

kosmo integrations:call neon.neon_get_current_user '{}' --json

Provider shortcut

kosmo integrations:neon neon_get_current_user '{}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

neon.neon_list_projects

List all Neon projects in the organization. Returns project IDs, names, region, and status.

Operation
Read read
Schema command
kosmo integrations:schema neon.neon_list_projects --json
ParameterTypeRequiredDescription
No parameters.

neon.neon_get_project

Get details for a specific Neon project by ID. Returns full project information including connection strings, branches, and settings.

Operation
Read read
Schema command
kosmo integrations:schema neon.neon_get_project --json
ParameterTypeRequiredDescription
project_id string yes The project ID.

neon.neon_create_project

Create a new Neon project. Requires a name. Optionally specify a region and Postgres version.

Operation
Write write
Schema command
kosmo integrations:schema neon.neon_create_project --json
ParameterTypeRequiredDescription
name string yes The project name (e.g., "my-app-prod").
region_id string no Region where the project will be created (e.g., "aws-us-east-2", "aws-eu-west-1").
pg_version integer no Postgres version (e.g., 16).
branch_name string no Name for the initial branch (default: "main").
database_name string no Name for the initial database (default: "neondb").

neon.neon_list_branches

List all branches in a Neon project. Returns branch IDs, names, status, and parent branch info.

Operation
Read read
Schema command
kosmo integrations:schema neon.neon_list_branches --json
ParameterTypeRequiredDescription
project_id string yes The project ID.

neon.neon_get_branch

Get details for a specific branch in a Neon project. Returns branch configuration, endpoints, and state.

Operation
Read read
Schema command
kosmo integrations:schema neon.neon_get_branch --json
ParameterTypeRequiredDescription
project_id string yes The project ID.
branch_id string yes The branch ID.

neon.neon_list_databases

List all databases in a Neon project branch. Returns database names, owners, and sizes.

Operation
Read read
Schema command
kosmo integrations:schema neon.neon_list_databases --json
ParameterTypeRequiredDescription
project_id string yes The project ID.
branch_id string yes The branch ID.

neon.neon_get_current_user

Get information about the current authenticated Neon user, including email, name, and organization membership.

Operation
Read read
Schema command
kosmo integrations:schema neon.neon_get_current_user --json
ParameterTypeRequiredDescription
No parameters.

Permissions

Headless calls still follow the integration read/write permission policy. Configure read/write defaults with integrations:configure. Add --force only for trusted automation that should bypass that policy.