
Developers love using Neon branches for a local development, due to the agility they provide (e.g. fast resets, isolated environments, and the ability to test without polluting production data). But using Neon branches still requires you to manage separate connection strings for different branches and ensure your application and its environment is properly set up to connect.
Today, that gets a lot easier, especially if you’re a VS Code user! We’re launching Neon Local Connect, a new VS Code extension that connects your Neon database to your local dev environment using a static localhost
connection string.
You can browse your tables, create or reset branches, launch ephemeral test environments, and run queries all from inside your IDE.Behind the scenes, the extension builds on Neon Local, our open-source Docker proxy for connecting to Neon over localhost
. But now, it’s fully integrated into VS Code, no CLI setup required.
Branching That Feels Local
Running Postgres locally works – until you need it to stay in sync with the rest of your team.
You’re responsible for installing the right version, managing credentials, seeding realistic data, resetting state between test runs, and isolating changes from other projects on your machine. If you’re working in a team, there’s no guarantee your local database matches production or even your teammate’s dev environment. Schema drift is common. Rollbacks are manual. Spinning up a clean environment means rebuilding everything from scratch.
That’s why Neon branches help so much with this workflow. In case you’re not familiar with them, a branch in Neon is a full, isolated copy of your database created instantly from any parent. It has great potential for improving local workflows:
- It gives you a clean slate for every feature, test, or teammate
- With zero risk of corrupting production or shared dev data (branches are isolated and have their own compute endpoint)
- You can reset instantly to a known schema and data snapshot, avoiding drift
- They let you test migrations in isolation, then throw them away (they’re great as ephemeral environments)
This is all great, but if you want to start using Neon branches as your “local” Postgres, connecting your app to those branches required a bit of work (wiring up credentials, managing TLS, switching tools). We first built Neon Local to help, but it still required Docker setup and scripting.With Neon Local Connect, you can connect to any branch directly from your editor, using a static localhost connection string. It behaves exactly like a local Postgres instance, but backed by Neon’s serverless cloud and branching engine.
How Neon Local Connect Works
Behind the scenes, this extension is using a Docker-based local proxy (via Neon Local) to route traffic from localhost to your Neon database branch. The extension handles authentication, networking, and branch selection for you. All you have to do is select which branch you want to connect to and run your application.
Here’s what the workflow looks like:First, you install the extension from the VS Code Marketplace. Once you’ve done that, you sign in with your Neon account. You can use OAuth for a fast, one-click login using your browser, or provide an API key if you want finer-grained access or plan to use ephemeral branches (which require long-lived credentials for cleanup). Once authenticated, the extension fetches your Neon projects and branches so you can quickly connect to an existing environment or create a new one on the fly.
Once you’re in, you can pick a branch from your Neon project or create a new one directly from the extension by choosing a parent branch and giving it a name:
Then, click Connect:
The extension launches a local Docker container that exposes a static Postgres connection at localhost:5432
. Your app connects using a fixed connection string:
From your app’s point of view, it’s talking to a local Postgres database – but in reality, all traffic is routed to the Neon branch you selected hosted in the cloud.
You can commit the static localhost
connection string to your project’s repo or CI config, and easily swap between branches in your IDE as needed.
What You Can Do With It
This extension turns your editor into a control panel for your Neon database.
Create new branches on the fly
Need a fresh environment for a new feature, teammate, or experiment? You can create a new branch directly in the extension UI. Just give it a name and choose a parent branch (e.g. main). Your new branch will be provisioned instantly, with the same schema and data as the parent. This is a frictionless way to isolate work without stepping on shared environments.
Query your database
If you need to inspect or debug data, you can launch a psql shell right in your terminal or open the Neon SQL Editor in your browser. You’ll always be querying the currently connected branch, so it’s easy to stay in context.
Launch ephemeral test databases
One of the coolest things about this extension is that it supports ephemeral branches – disposable, short-lived environments created for test runs, previews, or one-off scripts. When you disconnect, the branch is automatically deleted.
important
Branch, reset, and iterate
The extension also lets you quickly reset your database branch to its parent state. This is perfect for rerunning tests, reverting schema changes, or wiping stale data. Just click Reset, and your branch rolls back to a clean snapshot.
Try it Out
You can install Neon for VS Code today. All you need is:
- A Neon account (sign up here)
- Docker running locally
- VS Code
- And installing the extension from the marketplace
We’d love to hear what you build with it. Drop feedback in our Discord!