# Neon on boxd

> Postgres, on a serverless platform designed to help you build reliable and scalable applications faster.

- Page: https://boxd.sh/integrations/neon/
- CLI: `run neon` (110 commands, 3 marked common)
- SDK: `import { neon } from "@boxd/run"`; every parameter and response type is at `@boxd/run/neon`
- Triggers: none
- Connect: `run auth neon` (API key), or https://app.boxd.sh/integrations/detail/neon
- All integrations: https://boxd.sh/integrations/ (Markdown: https://boxd.sh/integrations/index.md)

## From the shell

```sh
run auth neon      # once: prints a link to connect your account
run neon           # list its commands
run neon get-project --help
```

Parameters are flags (`--flag value`); object and array parameters take a JSON string. Output is YAML, or JSON with `--json`. Calls use your own connection; `--scope <name>` uses a connection shared with your team.

## From a script

```ts
import { every, neon } from "@boxd/run";

every("1 hour", async () => {
  const result = await neon.getProject({ project_id: "…" });
  console.log(result);
});
```

Run it with `run neon.run.ts`. Neon has no triggers; `every()` polls on a schedule, keeps the script running as a job, and wakes the machine when it is due.

## Commands

Required flags are listed; `run neon <command> --help` lists the optional ones. "common" marks what `run neon` shows without `--all`.

| Command | SDK method | Required flags | Optional | Description |
|---|---|---|---|---|
| `accept-projects-transfer-requests` | `neon.acceptProjectsTransferRequests()` | `--project-id` `--request-id` | 1 | Accepts a pending transfer request and irreversibly moves the Neon project to the authenticated account or specified organization |
| `count-project-branches` | `neon.countProjectBranches()` | `--project-id` | 1 | Get the total number of branches in a Neon project |
| `create-api-key` | `neon.createApiKey()` | `--key-name` | 0 | Creates a new personal API key for the authenticated Neon user account |
| `create-api-key-for-organization` | `neon.createApiKeyForOrganization()` | `--key-name` `--org-id` | 0 | Creates a new API key for the specified organization in Neon |
| `create-auth-keys` | `neon.createAuthKeys()` | `--auth-provider` `--project-id` | 0 | Generate SDK or API keys for authentication providers |
| `create-auth-user` | `neon.createAuthUser()` | `--branch-id` `--email` `--name` `--project-id` | 0 | Creates a Neon Auth user with an email and name for a specified project branch |
| `create-branch-database` | `neon.createBranchDatabase()` | `--branch-id` `--database-name` `--owner-name` `--project-id` | 0 | Creates a new database within a specified project and branch in the Neon platform |
| `create-branches-auth` | `neon.createBranchesAuth()` | `--auth-provider` `--branch-id` `--project-id` | 1 | Enable Neon Auth integration for a branch |
| `create-branches-data-api` | `neon.createBranchesDataApi()` | `--branch-id` `--database-name` `--project-id` | 7 | Creates a Neon Data API REST endpoint for an existing branch database |
| `create-branches-snapshot` | `neon.createBranchesSnapshot()` | `--branch-id` `--project-id` | 4 | Creates a snapshot from the specified branch at a specific point in time |
| `create-compute-endpoint` | `neon.createComputeEndpoint()` | `--branch-id` `--endpoint-type` `--project-id` | 11 | Creates a compute endpoint for a Neon branch |
| `create-project-branch` | `neon.createProjectBranch()` | `--project-id` | 3 | Creates a new branch in a Neon project |
| `create-project-branch-anonymized` | `neon.createProjectBranchAnonymized()` | `--project-id` | 4 | Creates a Beta anonymized branch using PostgreSQL Anonymizer |
| `create-project-branch-role` | `neon.createProjectBranchRole()` | `--branch-id` `--project-id` `--role-name` | 1 | Creates a PostgreSQL role in a Neon branch |
| `create-project-jwks` | `neon.createProjectJwks()` | `--jwks-url` `--project-id` `--provider-name` | 3 | Adds a new JSON Web Key Set (JWKS) URL to a Neon project for JWT-based authentication |
| `create-project-permission` | `neon.createProjectPermission()` | `--email` `--project-id` | 0 | Grants the specified email address access to a Neon project |
| `create-project-with-quota-and-settings` | `neon.createProjectWithQuotaAndSettings()` | — | 30 | Creates a Neon project and can also enable logical replication in its project settings |
| `create-projects-transfer-requests` | `neon.createProjectsTransferRequests()` | `--project-id` | 1 | Creates a transfer request for a Neon project |
| `create-vpc-endpoint-label` | `neon.createVpcEndpointLabel()` | `--label` `--project-id` `--vpc-endpoint-id` | 0 | Sets or updates a VPC endpoint restriction for a Neon project |
| `create-vpc-endpoint-with-label` ·common | `neon.createVpcEndpointWithLabel()` | `--label` `--org-id` `--region-id` `--vpc-endpoint-id` | 0 | Assigns an existing AWS VPC endpoint to a Neon organization, or updates the label of that assignment |
| `delete-api-key-by-id` | `neon.deleteApiKeyById()` | `--key-id` | 0 | Deletes a specific API key from the Neon platform |
| `delete-auth-domain-from-project` | `neon.deleteAuthDomainFromProject()` | `--auth-provider` `--domains` `--project-id` | 0 | Removes trusted redirect domains for an authentication provider from a Neon project's redirect URI allowlist |
| `delete-auth-oauth-provider` | `neon.deleteAuthOauthProvider()` | `--branch-id` `--oauth-provider-id` `--project-id` | 0 | Deletes an OAuth provider configuration from a specific branch in a Neon project |
| `delete-auth-user` | `neon.deleteAuthUser()` | `--auth-user-id` `--branch-id` `--project-id` | 0 | Deletes an authentication user from a specified branch within a Neon project |
| `delete-branch-auth-domains` | `neon.deleteBranchAuthDomains()` | `--auth-provider` `--branch-id` `--domains` `--project-id` | 0 | Deletes domains from the redirect_uri whitelist for a specific branch's authentication configuration |
| `delete-branch-data-api` | `neon.deleteBranchDataApi()` | `--branch-id` `--database-name` `--project-id` | 0 | Deletes the Neon Data API for a specified branch and database |
| `delete-database-from-branch` | `neon.deleteDatabaseFromBranch()` | `--branch-id` `--database-name` `--project-id` | 0 | Permanently deletes a database and all of its data from the specified project branch |
| `delete-organization-api-key` | `neon.deleteOrganizationApiKey()` | `--key-id` `--org-id` | 0 | Deletes a specific API key associated with an organization in the Neon platform |
| `delete-organization-member` | `neon.deleteOrganizationMember()` | `--member-id` `--org-id` | 0 | Removes a specific member from a Neon organization |
| `delete-project-branch-by-id` | `neon.deleteProjectBranchById()` | `--branch-id` `--project-id` | 1 | Deletes a branch and idles its compute endpoints, breaking existing client connections |
| `delete-project-branch-role` | `neon.deleteProjectBranchRole()` | `--branch-id` `--project-id` `--role-name` | 0 | Deletes a PostgreSQL role from a specific branch within a Neon project |
| `delete-project-by-id` | `neon.deleteProjectById()` | `--project-id` | 0 | Deletes a Neon PostgreSQL project and all its associated resources |
| `delete-project-endpoint` | `neon.deleteProjectEndpoint()` | `--endpoint-id` `--project-id` | 0 | Deletes a specific endpoint within a Neon project |
| `delete-project-jwks-by-id` | `neon.deleteProjectJwksById()` | `--jwks-id` `--project-id` | 0 | Permanently deletes a JWKS configuration from a Neon project |
| `delete-project-permission` | `neon.deleteProjectPermission()` | `--permission-id` `--project-id` | 0 | Revokes project access for the user associated with a permission ID |
| `delete-project-snapshot` | `neon.deleteProjectSnapshot()` | `--project-id` `--snapshot-id` | 0 | Deletes a specific snapshot for a project in Neon |
| `delete-vpc-endpoint-by-ids` | `neon.deleteVpcEndpointByIds()` | `--org-id` `--region-id` `--vpc-endpoint-id` | 0 | Permanently deletes a VPC endpoint from a Neon organization in a specified AWS region |
| `delete-vpc-endpoint-by-project-id` | `neon.deleteVpcEndpointByProjectId()` | `--project-id` `--vpc-endpoint-id` | 0 | Removes a VPC endpoint restriction from a Neon project |
| `disable-branches-auth` | `neon.disableBranchesAuth()` | `--branch-id` `--project-id` | 1 | Disables Neon Auth for a specified project branch, removing its connection to the authentication provider |
| `finalize-branch-restore` | `neon.finalizeBranchRestore()` | `--branch-id` `--project-id` | 1 | Finalizes the restore operation for a branch created from a snapshot |
| `get-account-consumption-history` | `neon.getAccountConsumptionHistory()` | `--from` `--granularity` `--metrics` `--org-id` `--to` | 3 | Retrieves selected consumption metrics for projects in a Neon organization, grouped by project, billing period, and the requested granularity |
| `get-auth` | `neon.getAuth()` | — | 0 | Retrieves authentication information about the current API request credentials |
| `get-auth-allow-localhost` | `neon.getAuthAllowLocalhost()` | `--branch-id` `--project-id` | 0 | Retrieves the allow localhost configuration for a specific branch in a Neon project |
| `get-auth-email-provider` | `neon.getAuthEmailProvider()` | `--branch-id` `--project-id` | 0 | Retrieves the email provider configuration for Neon Auth on a specific branch |
| `get-branch-database` | `neon.getBranchDatabase()` | `--branch-id` `--database-name` `--project-id` | 0 | Returns metadata and configuration for one database in a project branch without modifying the database |
| `get-branches-anonymized-status` | `neon.getBranchesAnonymizedStatus()` | `--branch-id` `--project-id` | 0 | Retrieves the current status of an anonymized branch, including its state and progress information |
| `get-branches-backup-schedule` | `neon.getBranchesBackupSchedule()` | `--branch-id` `--project-id` | 0 | Retrieves the backup schedule configuration for a specified branch within a Neon project |
| `get-branches-data-api` | `neon.getBranchesDataApi()` | `--branch-id` `--database-name` `--project-id` | 0 | Retrieves the Neon Data API information for a specific branch and database |
| `get-branches-masking-rules` | `neon.getBranchesMaskingRules()` | `--branch-id` `--project-id` | 0 | Retrieves the masking rules for the specified anonymized branch |
| `get-current-user-information` | `neon.getCurrentUserInformation()` | — | 0 | Gets account identifiers, plan details, and linked auth accounts for the currently authenticated Neon user |
| `get-organization` | `neon.getOrganization()` | `--org-id` | 0 | Retrieves one Neon organization's identity and account settings, including its name, handle, billing plan, management source, timestamps, and available organization-level flags |
| `get-organization-member` | `neon.getOrganizationMember()` | `--member-id` `--org-id` | 0 | Returns one organization's member record, including the associated user ID, organization role, and join timestamp |
| `get-project` ·common | `neon.getProject()` | `--project-id` | 0 | Retrieves detailed information about a specific Neon serverless Postgres project |
| `get-project-branch` | `neon.getProjectBranch()` | `--branch-id` `--project-id` | 0 | Retrieves detailed information about a specific branch within a Neon project |
| `get-project-branch-role` | `neon.getProjectBranchRole()` | `--branch-id` `--project-id` `--role-name` | 0 | Returns a specific PostgreSQL role's branch ID, name, protected status, authentication method, creation and update timestamps, and any related Neon operations |
| `get-project-branch-schema-comparison` | `neon.getProjectBranchSchemaComparison()` | `--branch-id` `--db-name` `--project-id` | 5 | Compares the database schema of a branch with another branch's schema in a Neon project |
| `get-project-connection-uri` | `neon.getProjectConnectionUri()` | `--database-name` `--project-id` `--role-name` | 3 | Returns a PostgreSQL connection URI for a database and role in a Neon project |
| `get-project-endpoint` | `neon.getProjectEndpoint()` | `--endpoint-id` `--project-id` | 0 | Retrieves detailed information about a specific compute endpoint within a Neon serverless PostgreSQL project |
| `get-project-operation-by-id` | `neon.getProjectOperationById()` | `--operation-id` `--project-id` | 0 | Retrieves detailed information about a specific operation within a Neon serverless PostgreSQL project |
| `get-schema-for-project-branch` | `neon.getSchemaForProjectBranch()` | `--branch-id` `--db-name` `--project-id` | 2 | Retrieves the PostgreSQL database schema (DDL) for a specific database on a branch within a Neon project |
| `get-vpc-endpoint-details` | `neon.getVpcEndpointDetails()` | `--org-id` `--region-id` `--vpc-endpoint-id` | 0 | Retrieves the current state and configuration details of a specific VPC endpoint assigned to a Neon organization |
| `list-api-keys` | `neon.listApiKeys()` | — | 0 | Lists API keys for the authenticated user's Neon account, including key IDs, names, creators, creation times, and last-use metadata |
| `list-auth-domains` | `neon.listAuthDomains()` | `--branch-id` `--project-id` | 0 | Lists trusted redirect domains for the specified project and branch |
| `list-auth-oauth-providers` ·deprecated | `neon.listAuthOauthProviders()` | `--project-id` | 0 | project-level endpoint for listing OAuth providers |
| `list-available-preload-libraries` ·common | `neon.listAvailablePreloadLibraries()` | `--project-id` | 0 | Retrieves the list of available shared preload libraries for a Neon project |
| `list-branch-auth-oauth-providers` | `neon.listBranchAuthOauthProviders()` | `--branch-id` `--project-id` | 0 | Lists OAuth providers configured for a specific branch's Neon Auth integration |
| `list-branch-databases` | `neon.listBranchDatabases()` | `--branch-id` `--project-id` | 0 | Retrieves a list of databases associated with a specific project and branch in the Neon platform |
| `list-branch-endpoints` | `neon.listBranchEndpoints()` | `--branch-id` `--project-id` | 0 | Retrieves all compute endpoints associated with a specific branch in a Neon project |
| `list-organization-api-keys` | `neon.listOrganizationApiKeys()` | `--org-id` | 0 | Lists API keys for a Neon organization, including key IDs, names, creators, creation times, and last-use metadata |
| `list-organization-invitations` | `neon.listOrganizationInvitations()` | `--org-id` | 0 | Lists pending invitations for a Neon organization |
| `list-organization-members` | `neon.listOrganizationMembers()` | `--org-id` | 4 | Retrieves one paginated page of organization members |
| `list-project-branch-roles` | `neon.listProjectBranchRoles()` | `--branch-id` `--project-id` | 0 | Lists Postgres roles on a specific Neon project branch |
| `list-project-branches` | `neon.listProjectBranches()` | `--project-id` | 1 | Lists branches in a Neon project, optionally filtering by a partial branch name or ID |
| `list-project-consumption-history` | `neon.listProjectConsumptionHistory()` | `--from` `--granularity` `--to` | 5 | Lists paginated legacy project consumption history for an organization or the authenticated user's projects on eligible Scale, Business, and Enterprise plans, without waking sleeping computes |
| `list-project-endpoints` | `neon.listProjectEndpoints()` | `--project-id` | 0 | Lists compute endpoints for a Neon project, including each endpoint's ID, branch, hostname, state, region, autoscaling limits, and pooling settings |
| `list-project-jwks` | `neon.listProjectJwks()` | `--project-id` | 0 | Lists the JWKS URL configurations Neon uses to verify JWTs for a project |
| `list-project-operations` | `neon.listProjectOperations()` | `--project-id` | 2 | Lists one cursor-paginated page of asynchronous operations for a Neon project, including each operation's action, current status, timestamps, failure count, and associated branch or endpoint when… |
| `list-project-permissions` | `neon.listProjectPermissions()` | `--project-id` | 0 | Lists email-based grants that give users access to a Neon project |
| `list-project-vpc-endpoints` | `neon.listProjectVpcEndpoints()` | `--project-id` | 0 | Lists the VPC endpoints associated with a Neon project |
| `list-projects` | `neon.listProjects()` | — | 5 | Lists one cursor-paginated page of projects for the specified organization, with summary project fields and installed application/integration maps |
| `list-projects-snapshots` | `neon.listProjectsSnapshots()` | `--project-id` | 0 | Lists snapshots for a Neon project, including their source branch, creation and expiration times, LSN, and whether they were created manually |
| `list-regions` | `neon.listRegions()` | — | 0 | Lists active geographic regions available for Neon projects, including region identifiers, names, default status, and geographic coordinates |
| `list-shared-projects` | `neon.listSharedProjects()` | — | 3 | Lists Neon Postgres projects shared with the authenticated account |
| `list-user-organizations` | `neon.listUserOrganizations()` | — | 0 | Lists organizations the currently authenticated user belongs to |
| `list-vpc-endpoints` | `neon.listVpcEndpoints()` | `--org-id` | 0 | Lists VPC endpoints for a Neon organization across all regions, including each endpoint's ID, label, and region |
| `list-vpc-region-endpoints` | `neon.listVpcRegionEndpoints()` | `--org-id` `--region-id` | 0 | Lists VPC endpoints for a Neon organization in one region, including each endpoint's ID and label |
| `reset-role-password-for-branch` | `neon.resetRolePasswordForBranch()` | `--branch-id` `--project-id` `--role-name` | 0 | Resets the password for a PostgreSQL role on a specific Neon branch and generates a new password |
| `restart-project-endpoint` | `neon.restartProjectEndpoint()` | `--endpoint-id` `--project-id` | 0 | Restarts a Neon compute endpoint (Postgres instance) within a project |
| `restore-project-branch` | `neon.restoreProjectBranch()` | `--branch-id` `--project-id` `--source-branch-id` | 3 | Restores a branch from another point in its own or another branch's history, replacing the target branch's current data and creating a branch for the restored state |
| `restore-snapshot` | `neon.restoreSnapshot()` | `--project-id` `--snapshot-id` | 3 | Restores a snapshot by creating a new preview branch |
| `reveal-role-password-in-branch` | `neon.revealRolePasswordInBranch()` | `--branch-id` `--project-id` `--role-name` | 0 | Reveals the password for a specific role within a branch of a Neon project |
| `send-auth-test-email` | `neon.sendAuthTestEmail()` | `--branch-id` `--host` `--password` `--port` `--project-id` `--recipient-email` `--sender-email` `--sender-name` `--username` | 0 | Sends one test email to the specified recipient using the supplied SMTP configuration |
| `send-organization-invitations` | `neon.sendOrganizationInvitations()` | `--invitations` `--org-id` | 0 | Invites one or more people to a Neon organization with assigned roles |
| `set-branch-as-default` | `neon.setBranchAsDefault()` | `--branch-id` `--project-id` | 0 | Sets a specified branch as the default branch for a given project in Neon |
| `start-branch-anonymization` | `neon.startBranchAnonymization()` | `--branch-id` `--project-id` | 0 | Starts the Beta anonymization process on an anonymized branch in the `initialized`, `error`, or `anonymized` state |
| `start-endpoint-for-project` | `neon.startEndpointForProject()` | `--endpoint-id` `--project-id` | 0 | Starts a suspended or idle compute endpoint for a Neon PostgreSQL project |
| `suspend-project-endpoint-by-id` | `neon.suspendProjectEndpointById()` | `--endpoint-id` `--project-id` | 0 | Suspends a specified Neon project's compute endpoint, helping manage compute resource usage and costs |
| `transfer-projects-between-organizations` | `neon.transferProjectsBetweenOrganizations()` | `--destination-org-id` `--project-ids` `--source-org-id` | 0 | Transfers selected projects from one organization to another organization |
| `transfer-user-projects-to-organization` ·deprecated | `neon.transferUserProjectsToOrganization()` | `--destination-org-id` `--project-ids` | 0 | by Neon: personal accounts have been migrated to organizations, and Neon scheduled this endpoint for removal on July 1, 2026 |
| `update-auth-allow-localhost` | `neon.updateAuthAllowLocalhost()` | `--allow-localhost` `--branch-id` `--project-id` | 0 | Updates the localhost allow setting for Neon Auth on a specific branch, enabling or disabling localhost origins for authentication flows |
| `update-auth-email-provider` | `neon.updateAuthEmailProvider()` | `--branch-id` `--project-id` `--sender-email` `--sender-name` | 4 | Updates the email provider settings for a Neon Auth branch, including the sender address and name used for authentication emails |
| `update-auth-oauth-providers` | `neon.updateAuthOauthProviders()` | `--oauth-provider-id` `--project-id` | 3 | Updates OAuth provider credentials for a Neon project's authentication configuration |
| `update-branch-database` | `neon.updateBranchDatabase()` | `--branch-id` `--database-name` `--project-id` | 2 | Updates the properties of a specific database within a project branch in the Neon platform |
| `update-branches-data-api` | `neon.updateBranchesDataApi()` | `--branch-id` `--database-name` `--project-id` | 10 | Updates the Neon Data API configuration for the specified branch |
| `update-branches-masking-rules` | `neon.updateBranchesMaskingRules()` | `--branch-id` `--masking-rules` `--project-id` | 0 | Updates the masking rules for the specified anonymized branch |
| `update-organization-member-role` | `neon.updateOrganizationMemberRole()` | `--member-id` `--org-id` `--role` | 0 | Changes an organization member's role between `admin` and `member`, updating their ability to manage organization resources and members |
| `update-project-branch` | `neon.updateProjectBranch()` | `--branch-id` `--project-id` | 2 | Updates the details of a specific branch within a project in the Neon platform |
| `update-project-compute-endpoint-settings` | `neon.updateProjectComputeEndpointSettings()` | `--endpoint-id` `--project-id` | 11 | Updates the configuration of a specific compute endpoint within a Neon project |
| `update-project-settings-by-id` | `neon.updateProjectSettingsById()` | `--project-id` | 20 | Updates selected project settings, including quotas, network access, maintenance, history retention, and default compute settings |
| `update-projects-snapshots` | `neon.updateProjectsSnapshots()` | `--name` `--project-id` `--snapshot-id` | 0 | Update the name of a specific snapshot in a Neon project |

## Docs

- [run CLI](https://docs.boxd.sh/cli/run): Call connected integrations from the shell, connect new ones, and run automations.
- [Quickstart](https://docs.boxd.sh/guides/integrations/quickstart): Connect an integration, call it from the shell, and turn a script into an automation.
- [Connections](https://docs.boxd.sh/guides/integrations/connections): Connect an account once, for yourself or for your whole organization.
- [Scripts](https://docs.boxd.sh/guides/automations/scripts): Typed integrations, triggers, schedules and state in a .run.ts file.
- [Jobs](https://docs.boxd.sh/guides/automations/jobs): How a script becomes a background job: states, retries, sleep and wake.
- [Beyond the catalog](https://docs.boxd.sh/guides/automations/beyond-the-catalog): Reach your own APIs, databases and cloud accounts from a script.
