Skip to content

Neon Client

@theholocron/neon-client is a typed wrapper around the Neon API for managing Postgres branches, databases, and connection URIs.

Terminal window
pnpm add @theholocron/neon-client
import { 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,
});
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.