---
title: "Introducing neon.ts: infrastructure as code for your Neon projects"
description: "neon.ts is a TypeScript infrastructure-as-code file for Neon projects that declares services (Postgres, Neon Auth, Data API, with functions, buckets and an AI gateway coming under a preview block) and provisions them with `neon config plan` and `neon config apply`."
url: "https://swe.quest/articles/introducing-neon-ts-infrastructure-as-code-for-your-neon-projects-a40f6e284c0cef8b"
canonical: "https://neon.com/blog/introducing-neon-ts"
source: "Neon"
published: "2026-06-15"
difficulty: "medium"
kind: "Announcement"
reading_minutes: 8
tags: ["infrastructure-as-code","typescript","postgres","serverless","developer-tools"]
---

# Introducing neon.ts: infrastructure as code for your Neon projects

A post on [Neon](https://swe.quest/sources/neon.md), published 2026-06-15, 8 min read, Announcement. Original: [https://neon.com/blog/introducing-neon-ts](https://neon.com/blog/introducing-neon-ts)

## Summary

neon.ts is a TypeScript infrastructure-as-code file for Neon projects that declares services (Postgres, Neon Auth, Data API, with functions, buckets and an AI gateway coming under a preview block) and provisions them with \`neon config plan\` and \`neon config apply\`. A companion \`@neondatabase/env\` package provides \`parseEnv\`, which validates \`process.env\` against the declared services and returns a typed env object, with optional per-app subsets. A programmable \`branch\` function sets TTL, autoscaling limits and scale-to-zero for new branches created via \`neon checkout\`. Type-level encoding of service dependencies turns cryptic \`never\` errors into messages that explain the fix, such as requiring Neon Auth for the Data API.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Infrastructure as code](https://swe.quest/tags/infrastructure-as-code.md) (Infrastructure)
- [TypeScript](https://swe.quest/tags/typescript.md) (Languages)
- [PostgreSQL](https://swe.quest/tags/postgres.md) (Data & databases)
- [Serverless](https://swe.quest/tags/serverless.md) (Backend & APIs)
- [Developer tools](https://swe.quest/tags/developer-tools.md) (Engineering practices)

## Prerequisites

- TypeScript basics ([easy posts on TypeScript](https://swe.quest/tags/typescript.md?difficulty=easy))
- environment variables
- infrastructure as code concepts ([easy posts on Infrastructure as code](https://swe.quest/tags/infrastructure-as-code.md?difficulty=easy))

## Keywords

Neon, neon.ts, @neondatabase/config, @neondatabase/env, Neon CLI, Neon Data API, Neon Auth

## Related posts

- [Introducing @neon/sdk, our new TypeScript client for the Neon API](https://swe.quest/articles/introducing-neon-sdk-our-new-typescript-client-for-the-neon-api-29d9cb594b8c1451.md): Neon · 2026-07-13 · Medium · 6 min read · TypeScript, API design, PostgreSQL, Developer tools
  @neon/sdk is a fetch-based, zero-dependency, ESM-only TypeScript client for the Neon API, replacing the axios-based @neondatabase/api-client.
- [Neon for Agent Platforms: A Companion Skill for the AI Agent Program](https://swe.quest/articles/neon-for-agent-platforms-a-companion-skill-for-the-ai-agent-program-6b42423040c5c41e.md): Neon · 2026-05-22 · Medium · 3 min read · PostgreSQL, Multi-tenancy, AI agents, Cloud platforms
  neon-for-agent-platforms is an open-source companion Agent Skill and set of TypeScript scripts for running fleets of Neon Postgres databases on agent platforms.
- [Build Internal Tools Using Neon, StackAuth, and Vercel](https://swe.quest/articles/build-internal-tools-using-neon-stackauth-and-vercel-451a972f29aed443.md): Neon · 2025-07-08 · Medium · 3 min read · Identity & auth, PostgreSQL, Serverless, Product engineering
  An open-source Next.js template for internal tools combines Neon serverless Postgres, Stack Auth and Vercel free tiers to provide a database, API routes, authentication, role-based access control and an admin panel.
- [Build a serverless API using Cloudflare Workers, Drizzle ORM, and Neon](https://swe.quest/articles/build-a-serverless-api-using-cloudflare-workers-drizzle-orm-and-neon-f83c472c9d399a17.md): Neon · 2023-05-30 · Medium · 9 min read · Serverless, PostgreSQL, TypeScript, Schema migrations
  A step-by-step setup for a serverless TypeScript API on Cloudflare Workers that uses Hono for routing, Drizzle ORM for schema definition and migrations, and Neon serverless Postgres for storage.
- [Just landed in the Neon CLI](https://swe.quest/articles/just-landed-in-the-neon-cli-10a12bf3c6b45d1f.md): Neon · 2026-08-25 · Medium · 6 min read · Developer tools, PostgreSQL, AI agents, Schema migrations
  The Neon CLI is renamed from neonctl to neon (old name kept as an alias) and gains a branch-first workflow built on \`neon link\`, \`neon checkout\` and \`neon env pull\`, which store project/branch context in a local .neon file and rewrite only Neon-managed env vars.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
