Skip to content

Neon Ships neon.ts, a TypeScript Infrastructure-as-Code Layer for Serverless Postgres

Neon launched neon.ts, letting developers declare serverless Postgres services, branch policies, and type-safe environment variables in TypeScript via a single config file.

neon.ts autocomplete showing typed environment variable suggestions in a code editor
Neon neon.ts parseEnv autocomplete · Credit: Neon

Neon shipped neon.ts, an infrastructure-as-code configuration layer for its serverless Postgres platform, letting developers declare database services, branch policies, and environment variables in TypeScript instead of managing them through individual CLI commands.

Neon announced the release. The neon.ts file uses a defineConfig() export to declare which Neon services a project's branches should include: serverless Postgres, Neon Auth, and the Neon Data API at launch, with Functions, Object Storage, and an AI gateway flagged as coming soon under a preview block. Running neonctl config apply provisions those services and pulls the corresponding environment variables into a local .env.local file automatically. A companion @neondatabase/env package provides type-safe access to those variables, using TypeScript's type system to enforce service dependencies at compile time: enabling the Data API without also enabling Neon Auth produces a descriptive type error rather than a generic type 'true' is not assignable to type 'never' message. Branch policies are also programmable through a branch() function in neon.ts that can set TTL, autoscaling limits, and scale-to-zero timeouts based on branch name patterns, applied automatically when developers run neonctl checkout.

The announcement is notable because neon.ts extends the IaC model down to the database layer, not just compute or networking. Tools like Terraform and Pulumi manage infrastructure at the cloud-resource level; neon.ts manages Neon-specific primitives through the same TypeScript the application already uses. For teams building on Neon's branching model, the practical benefit is that checking out a feature branch and having the correct database configuration, environment variables, and compute settings apply in one step removes a class of environment-drift bugs that commonly appear between local, staging, and production branches.

Neon is a Databricks company following its 2025 acquisition, and neon.ts positions the platform against other serverless database providers competing for developer-first workflows. The tooling is available via npm i @neondatabase/config and the updated Neon CLI.

Share this story

Henrik Larsen

Henrik Larsen writes for the techshooked news desk, following cross-cutting technology stories that span more than one beat. He reports the news first and the analysis second, naming attribution clearly and flagging what is still unconfirmed.