2025-07-21 17:29:00
neon.com

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.
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.
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.
This extension turns your editor into a control panel for your Neon database.
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.
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.
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.
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.
You can install Neon for VS Code today. All you need is:
We’d love to hear what you build with it. Drop feedback in our Discord!
Keep your files stored safely and securely with the SanDisk 2TB Extreme Portable SSD. With over 69,505 ratings and an impressive 4.6 out of 5 stars, this product has been purchased over 8K+ times in the past month. At only $129.99, this Amazon’s Choice product is a must-have for secure file storage.
Help keep private content private with the included password protection featuring 256-bit AES hardware encryption. Order now for just $129.99 on Amazon!
Help Power Techcratic’s Future – Scan To Support
If Techcratic’s content and insights have helped you, consider giving back by supporting the platform with crypto. Every contribution makes a difference, whether it’s for high-quality content, server maintenance, or future updates. Techcratic is constantly evolving, and your support helps drive that progress.
As a solo operator who wears all the hats, creating content, managing the tech, and running the site, your support allows me to stay focused on delivering valuable resources. Your support keeps everything running smoothly and enables me to continue creating the content you love. I’m deeply grateful for your support, it truly means the world to me! Thank you!
BITCOIN bc1qlszw7elx2qahjwvaryh0tkgg8y68enw30gpvge Scan the QR code with your crypto wallet app |
DOGECOIN D64GwvvYQxFXYyan3oQCrmWfidf6T3JpBA Scan the QR code with your crypto wallet app |
ETHEREUM 0xe9BC980DF3d985730dA827996B43E4A62CCBAA7a Scan the QR code with your crypto wallet app |
Please read the Privacy and Security Disclaimer on how Techcratic handles your support.
Disclaimer: As an Amazon Associate, Techcratic may earn from qualifying purchases.