Neon Client
@theholocron/neon-client is a typed wrapper around the Neon API for managing Postgres branches, databases, and connection URIs.
Installation
Section titled “Installation”pnpm add @theholocron/neon-clientimport { createNeonClient } from "@theholocron/neon-client";
const client = createNeonClient({ token: process.env.NEON_API_KEY });
const branches = await client.branches.list("project-id");const branch = await client.branches.create("project-id", { name: "feature/my-branch",});const uri = await client.connection.uri({ projectId: "project-id", branchId: branch.id,});Namespaces
Section titled “Namespaces”| Namespace | Covers |
|---|---|
branches |
Project branches, including restoring one |
connection |
Connection URIs |
databases |
Databases and running SQL against them |
users |
The authenticated user |
The full API reference is generated from the package’s TSDoc comments.