llms.txt
# Neon Postgres
> Neon is a complete set of cloud backend primitives built around Lakebase Postgres, for developers, startups, and agent platforms, from Databricks. Services include Lakebase Postgres, Managed Better Auth, Data API, Functions, Object Storage, and AI Gateway. Lakebase Postgres on Neon includes autoscaling, instant restore, and scale-to-zero, and works with any language, framework, or ORM that supports Postgres.
**Get started.** Sign up for Neon or sign into an existing account. If the user cannot create an account right now, follow [Claimable Neon](https://neon.com/auth.md) to provision a Postgres project without signup. A human claims it later.
If a Neon account is available, set things up locally by installing the Neon CLI and running the project init command to install the agent skills and creating/linking a Neon project:
```bash
npm i -g neon
# oauth signup - use --help for other auth options
neon auth
# in the project folder init Neon
neon init
```
Neon docs are available as markdown. Append `.md` to any doc URL or set `Accept: text/markdown`. This is the primary index. Sections with many pages show key pages and link to full sub-indexes.
## Common tasks
- [Need a Neon account and the user is not around: provision one now; they claim it later](https://neon.com/auth.md)
- [Pricing and plans](https://neon.com/pricing.md)
- [Declare a whole backend in one file](https://neon.com/docs/reference/neon-ts.md)
- [Add users and authentication](https://neon.com/docs/auth/overview.md)
- [Explore the full platform: functions, object storage, AI Gateway, and more](https://neon.com/docs/introduction.md)
- [Choose a connection method (drivers, pooling, serverless)](https://neon.com/docs/connect/choose-connection.md)
- [Troubleshoot connection errors and timeouts](https://neon.com/docs/connect/connection-errors.md)
- [Neon API reference (projects, branches, databases, endpoints)](https://neon.com/docs/reference/api.md)
- [Neon CLI reference (neon commands, options, and usage)](https://neon.com/docs/cli.md)
## Introduction
Architecture, features, autoscaling, branching concepts, billing, and plans.
- [All 34 Introduction pages](https://neon.com/docs/introduction/llms.txt) — key pages below
- [The lakebase architecture](https://neon.com/docs/introduction/architecture-overview.md): Inside Lakebase Postgres: decoupled compute and durable storage
- [Plans and billing](https://neon.com/docs/introduction/about-billing.md): Learn about Neon's pricing plans and how to manage billing
- [Autoscaling](https://neon.com/docs/introduction/autoscaling.md): An introduction to Neon's autoscaling
- [Scale to Zero](https://neon.com/docs/introduction/scale-to-zero.md): Minimize costs by automatically scaling inactive databases to zero
- [Branching](https://neon.com/docs/introduction/branching.md): Branch your data the same way you branch your code
- [Neon Read Replicas](https://neon.com/docs/introduction/read-replicas.md): Scale your app, run ad-hoc queries, and provide read-only access without duplicating data
## Get Started
First-time setup: org/project creation, connection strings, driver installation, optional auth, and initial schema setup.
- [Build a full backend with Next.js and Neon](https://neon.com/docs/get-started/full-backend-quickstart.md): Postgres, Object Storage, and a Neon Function for AI, declared in one neon.ts
- [Built to scale](https://neon.com/docs/get-started/built-to-scale.md): Neon supports you from prototype to scale-up
- [Built to scale](https://neon.com/docs/get-started/production-readiness.md): Neon supports you from prototype to scale-up
- [Connecting Neon to your stack](https://neon.com/docs/get-started/connect-neon.md): Learn how to integrate Neon into your application
- [Database branching workflow primer](https://neon.com/docs/get-started/workflow-primer.md): An introduction to integrating Postgres branching into your development workflow
- [Get started with your AI agent](https://neon.com/docs/get-started/with-an-agent.md): Set up Neon in your project using your AI coding assistant
- [Getting ready for production](https://neon.com/docs/get-started/production-checklist.md): Guidelines to optimize price, performance, and reliability
- [How a Neon backend fits together](https://neon.com/docs/get-started/backend-overview.md): Postgres, Object Storage, Functions, the AI Gateway, Auth, and the Data API, declared in one neon.ts and branched together
- [Neon framework guides](https://neon.com/docs/get-started/frameworks.md): Find detailed instructions for connecting to Neon from various frameworks
- [Neon language guides](https://neon.com/docs/get-started/languages.md): Find detailed instructions for connecting to Neon from various languages
- [Neon ORM guides](https://neon.com/docs/get-started/orms.md): Find detailed instructions for connecting to Neon from various ORMs
- [Our DX Principles](https://neon.com/docs/get-started/dev-experience.md): Neon adapts to your workflow, not the other way around.
- [Query with Neon's SQL Editor](https://neon.com/docs/get-started/query-with-neon-sql-editor.md): Query your database from the Neon Console using the Neon SQL Editor
- [Tour the Neon Console](https://neon.com/docs/get-started/signing-up.md): Explore Neon's core Postgres database features: the SQL Editor, branching, the Tables view, and Managed Better Auth
- [Why Neon?](https://neon.com/docs/get-started/why-neon.md): The backend for apps and agents, by Databricks
## Connect
Drivers, connection strings, pooling, local dev tooling, and troubleshooting.
- [Choosing your connection method](https://neon.com/docs/connect/choose-connection.md): Find the right driver and connection type for your deployment platform
- [Connect a GUI application](https://neon.com/docs/connect/connect-postgres-gui.md): Learn how to connect a GUI application to Neon
- [Connect from any application](https://neon.com/docs/connect/connect-from-any-app.md): Learn how to connect to Neon from any application
- [Connect Looker Studio to Neon](https://neon.com/docs/connect/connect-looker-studio.md): Learn how to connect your database to Looker Studio
- [Connect to Neon](https://neon.com/docs/connect/connect-intro.md): Everything you need to know about connecting to Neon
- [Connect to Neon securely](https://neon.com/docs/connect/connect-securely.md): Learn how to connect to Neon securely when using a connection string
- [Connect with pgcli](https://neon.com/docs/connect/connect-pgcli.md): Learn how to connect to Neon using the interactive pgcli client
- [Connect with psql](https://neon.com/docs/connect/query-with-psql-editor.md): Learn how to connect to Neon using psql
- [Connect your app](https://neon.com/docs/connect/connect-hub.md): Connect your app to Lakebase Postgres and other backend services
- [Connection errors](https://neon.com/docs/connect/connection-errors.md): Learn how to resolve connection errors
- [Connection latency and timeouts](https://neon.com/docs/connect/connection-latency.md): Learn about strategies to manage connection latencies and timeouts
- [Connection pooling](https://neon.com/docs/connect/connection-pooling.md): Learn how connection pooling works in Neon
- [Neon Local](https://neon.com/docs/local/neon-local.md): Use Docker environments to connect to Neon and manage branches automatically
- [Neon serverless driver](https://neon.com/docs/serverless/serverless-driver.md): Connect to Neon from serverless environments over HTTP or WebSockets
- [Neon VS Code Extension](https://neon.com/docs/local/vscode-extension.md): Connect to Neon and manage your database directly in VS Code, Cursor, and other editors
- [neon.ts](https://neon.com/docs/reference/neon-ts.md): Configuration as code for your Neon project.
- [Passwordless auth](https://neon.com/docs/connect/passwordless-connect.md): Learn how to connect to Neon without a password
## Neon CLI
Install: `npm i -g neon`. Use this for terminal-first workflows, scripts, and CI/CD automation with `neon`.
- [Neon CLI](https://neon.com/docs/cli.md): The Neon command-line interface: every command, with options and examples
- [Neon CLI command: api](https://neon.com/docs/cli/api.md): Call any Neon API route directly as an authenticated passthrough
- [Neon CLI command: api-keys](https://neon.com/docs/cli/api-keys.md): Create, list, and revoke Neon API keys
- [Neon CLI command: ask](https://neon.com/docs/cli/ask.md): Ask the Neon assistant a question from the terminal
- [Neon CLI command: bootstrap](https://neon.com/docs/cli/bootstrap.md): Scaffold a new project from a Neon starter template
- [Neon CLI command: branches](https://neon.com/docs/cli/branches.md): List, create, rename, and delete branches; set default; run schema diff
- [Neon CLI command: buckets](https://neon.com/docs/cli/buckets.md): Manage branch object-storage buckets and their objects
- [Neon CLI command: checkout](https://neon.com/docs/cli/checkout.md): Pin a branch in your local .neon context file
- [Neon CLI command: claim](https://neon.com/docs/cli/claim.md): Create and claim a temporary Neon project without an account
- [Neon CLI command: completion](https://neon.com/docs/cli/completion.md): Generate shell completion scripts for neon commands and options
- [Neon CLI command: config](https://neon.com/docs/cli/config.md): Manage a branch with a neon.ts policy: init, add, status, plan, and apply
- [Neon CLI command: connection-string](https://neon.com/docs/cli/connection-string.md): Get Postgres connection strings for branches and databases
- [Neon CLI command: credentials](https://neon.com/docs/cli/credentials.md): Issue, list, reveal, rotate, and revoke scoped credentials on a branch
- [Neon CLI command: data-api](https://neon.com/docs/cli/data-api.md): Provision and manage the Neon Data API from the CLI
- [Neon CLI command: databases](https://neon.com/docs/cli/databases.md): List, create, and delete databases in a Neon project
- [Neon CLI command: deploy](https://neon.com/docs/cli/deploy.md): Apply a neon.ts policy to a branch
- [Neon CLI command: dev](https://neon.com/docs/cli/dev.md): Run Neon Functions locally with a dev server
- [Neon CLI command: diff](https://neon.com/docs/cli/diff.md): Show a git-style schema diff between two branches
- [Neon CLI command: env](https://neon.com/docs/cli/env.md): Manage a branch's Neon environment variables locally
- [Neon CLI command: feedback](https://neon.com/docs/cli/feedback.md): Send feedback about the Neon CLI and docs to the Neon team
- [Neon CLI command: functions](https://neon.com/docs/cli/functions.md): Deploy, list, inspect, and delete Neon Functions, and manage their custom domains
- [Neon CLI command: git](https://neon.com/docs/cli/git.md): Keep your Neon branch in sync with the git branch you have checked out
- [Neon CLI command: init](https://neon.com/docs/cli/init.md): Set up the current directory for Neon with agent tooling, a linked project, and an optional neon.ts config
- [Neon CLI command: inspect](https://neon.com/docs/cli/inspect.md): Run diagnostic queries against a branch's Postgres to check its health and configuration
- [Neon CLI command: ip-allow](https://neon.com/docs/cli/ip-allow.md): Manage the IP allowlist: list, add, remove, and reset allowed IPs
- [Neon CLI command: link](https://neon.com/docs/cli/link.md): Link a directory to a Neon project and write a `.neon` context file
- [Neon CLI command: login](https://neon.com/docs/cli/login.md): Authenticate to Neon via browser or API key and manage credentials
- [Neon CLI command: logs](https://neon.com/docs/cli/logs.md): Query the logs a branch's services emit
- [Neon CLI command: mcp](https://neon.com/docs/cli/mcp.md): Install the Neon MCP Server into your coding agents
- [Neon CLI command: me](https://neon.com/docs/cli/me.md): View the authenticated user and login details
- [Neon CLI command: neon-auth](https://neon.com/docs/cli/neon-auth.md): Manage Managed Better Auth from the CLI
- [Neon CLI command: open](https://neon.com/docs/cli/open.md): Open the linked project in the Neon Console in your browser
- [Neon CLI command: operations](https://neon.com/docs/cli/operations.md): List and manage long-running operations for a Neon project
- [Neon CLI command: orgs](https://neon.com/docs/cli/orgs.md): List the Neon organizations you belong to
- [Neon CLI command: plugins](https://neon.com/docs/cli/plugins.md): Install the Neon plugin into coding agents that support plugin marketplaces
- [Neon CLI command: profile](https://neon.com/docs/cli/profile.md): Manage named sets of Neon credentials
- [Neon CLI command: projects](https://neon.com/docs/cli/projects.md): List, create, update, delete, recover, and get Neon projects
- [Neon CLI command: psql](https://neon.com/docs/cli/psql.md): Connect to a Neon database via psql
- [Neon CLI command: realtime](https://neon.com/docs/cli/realtime.md): Enable and disable Neon Realtime on a branch from the CLI
- [Neon CLI command: roles](https://neon.com/docs/cli/roles.md): List, create, and delete database roles in a Neon project
- [Neon CLI command: set-context](https://neon.com/docs/cli/set-context.md): Set default project context for CLI sessions to avoid repeating project ID
- [Neon CLI command: skills](https://neon.com/docs/cli/skills.md): Install and update Neon agent skills in your coding agents
- [Neon CLI command: snapshots](https://neon.com/docs/cli/snapshots.md): Create, list, restore, and schedule branch snapshots from the terminal
- [Neon CLI command: status](https://neon.com/docs/cli/status.md): Show the branch's live Neon state
- [Neon CLI command: subscribe](https://neon.com/docs/cli/subscribe.md): Stream a live SQL query's results from the terminal with Neon Realtime
- [Neon CLI command: triggers](https://neon.com/docs/cli/triggers.md): Create and manage function triggers that invoke a Neon Function on a cron schedule or when an object is created
- [Neon CLI command: vpc](https://neon.com/docs/cli/vpc.md): Manage Private Networking VPC endpoints and project-level restrictions
- [Neon CLI quickstart](https://neon.com/docs/cli/quickstart.md): Get set up with the Neon CLI in just a few steps
- [Neon CLI: Install and connect](https://neon.com/docs/cli/install.md): Install the Neon CLI and connect with web auth or API key
## AI & Agents
Agent Skills, MCP integrations, vector search, and tools for building AI-powered applications with Neon.
- [Agent Skills](https://neon.com/docs/ai/agent-skills.md): Teach your AI coding assistant how to work with Neon
- [AI Concepts](https://neon.com/docs/ai/ai-concepts.md): Learn how embeddings are used to build AI applications
- [AI Starter Kit](https://neon.com/docs/ai/ai-intro.md): Resources for building AI applications with Lakebase Postgres on Neon
- [AI tools for Agents](https://neon.com/docs/ai/ai-agents-tools.md): AI-powered tools for development and database management
- [Azure Data Studio Notebooks](https://neon.com/docs/ai/ai-azure-notebooks.md): Use Azure Data Studio Notebooks with Neon for vector similarity search
- [Claude Code plugin for Neon](https://neon.com/docs/ai/ai-claude-code-plugin.md)
- [Codex plugin for Neon](https://neon.com/docs/ai/ai-codex-plugin.md)
- [Connect MCP clients to Neon](https://neon.com/docs/ai/connect-mcp-clients-to-neon.md): Connect MCP clients like Cursor, Claude Code, VS Code, and ChatGPT to your Lakebase Postgres database on Neon.
- [Cursor plugin for Neon](https://neon.com/docs/ai/ai-cursor-plugin.md)
- [Database versioning with snapshots](https://neon.com/docs/ai/ai-database-versioning.md): How AI agents and codegen platforms implement database version control using snapshots and preview branches
- [Get started with Lakebase Search](https://neon.com/docs/ai/lakebase-search-get-started.md): Set up vector and full-text search on Neon in minutes
- [Google Colab](https://neon.com/docs/ai/ai-google-colab.md): Use Google Colab with Neon for vector similarity search
- [Grok Bot plugin for Neon](https://neon.com/docs/ai/ai-grok-bot-plugin.md)
- [Inngest](https://neon.com/docs/ai/inngest.md): Quickly build AI RAG and Agentic workflows that scale with Inngest and Neon
- [Lakebase Search](https://neon.com/docs/ai/lakebase-search.md): Scalable vector and full-text search for Postgres
- [LangChain](https://neon.com/docs/ai/langchain.md): Build AI applications faster with LangChain and Postgres
- [LlamaIndex](https://neon.com/docs/ai/llamaindex.md): Build AI applications faster with LlamaIndex and Postgres
- [Neon agents for GitHub Copilot](https://neon.com/docs/ai/ai-github-copilot-agents.md): Custom agents for safe database migrations and query optimization in VS Code
- [Neon MCP Server overview](https://neon.com/docs/ai/neon-mcp-server.md): Connect your AI assistant to Neon to manage projects, run queries, and make schema changes
- [Optimize pgvector search](https://neon.com/docs/ai/ai-vector-search-optimization.md): Fine-tune parameters for efficient and accurate similarity searches in Postgres
- [Scale your AI application with Neon](https://neon.com/docs/ai/ai-scale-with-neon.md): Scale your AI application with Neon's Autoscaling and Read Replica features
- [Semantic Kernel](https://neon.com/docs/ai/semantic-kernel.md): Quickly build AI RAG and Agentic workflows with Semantic Kernel and Neon
## Auth
Managed authentication built on Better Auth that branches with your database.
- [About Managed Better Auth](https://neon.com/docs/auth/about.md): How Neon's managed Better Auth works, when to use it, and what it costs
- [Auth production checklist](https://neon.com/docs/auth/production-checklist.md): Required configuration before launching with Managed Better Auth
- [Auth troubleshooting](https://neon.com/docs/auth/troubleshooting.md): Common issues when implementing Managed Better Auth and how to fix them
- [Authentication flow](https://neon.com/docs/auth/authentication-flow.md): Understanding the complete sign-in and sign-up process
- [Branching authentication](https://neon.com/docs/auth/branching-authentication.md): How authentication works with Neon database branches
- [Managed Better Auth](https://neon.com/docs/auth/overview.md): Managed authentication that branches with your database
- [Managed Better Auth roadmap](https://neon.com/docs/auth/roadmap.md): What's supported today and what's coming next
### Quick Start
- [Use Managed Better Auth with Next.js (API methods)](https://neon.com/docs/auth/quick-start/nextjs-api-only.md): Build your own auth UI using SDK methods
- [Use Managed Better Auth with React (API methods)](https://neon.com/docs/auth/quick-start/react.md): Build your own auth UI
- [Use Managed Better Auth with TanStack Router](https://neon.com/docs/auth/quick-start/tanstack-router.md): Set up authentication using pre-built UI components
### Reference
- [Next.js Server SDK Reference](https://neon.com/docs/auth/reference/nextjs-server.md): Server-side authentication API for Next.js with Managed Better Auth
- [UI Components Reference](https://neon.com/docs/auth/reference/ui-components.md): Quick reference for Managed Better Auth UI components
### Guides
- [Admin](https://neon.com/docs/auth/guides/plugins/admin.md): Manage users, roles, bans, sessions, and impersonation
- [Configure trusted domains](https://neon.com/docs/auth/guides/configure-domains.md): Add your application domains to enable secure authentication redirects
- [Customize emails](https://neon.com/docs/auth/guides/customize-emails.md): Custom branding, content, and delivery for Managed Better Auth emails
- [Email OTP](https://neon.com/docs/auth/guides/plugins/email-otp.md): Sign in and verify email addresses with one-time passwords
- [Email verification](https://neon.com/docs/auth/guides/email-verification.md): Verify user email addresses during sign-up or account creation
- [JWT](https://neon.com/docs/auth/guides/plugins/jwt.md): Authenticate using JSON Web Tokens (JWT) for external services
- [Magic Link](https://neon.com/docs/auth/guides/plugins/magic-link.md): Passwordless sig