Install the dbt VS Code extension Preview
The dbt extension — available for VS Code, Cursor, and Windsurf — uses the dbt Fusion Engine to make dbt development smoother and more efficient.
This is the only official dbt Labs VS Code extension. Other extensions can work alongside the dbt VS Code extension, but they aren’t tested or supported by dbt Labs. Read the Fusion Diaries for the latest updates.
Prerequisites
Before installing, make sure to review the Limitations page as some features don't support Fusion just yet.
To use the extension, you must meet the following prerequisites:
| Prerequisite | Details |
|---|---|
| dbt Fusion Engine | The dbt VS Code extension requires the dbt Fusion Engine binary (a small executable program). The extension will prompt you to install it, or you can install it manually at any time. Register your email within 14 days of installing the dbt extension. Free for up to 15 users. |
| Project files | - You need a profiles.yml configuration file.⁃ Existing dbt platform users need to download a dbt_cloud.yml file as well as a profiles.yml file configured in their dbt project.⁃ Having a dbt platform user account isn't the same as having a dbt platform project — you don't need a dbt platform project to use the extension. |
| Editor | VS Code, Cursor, or Windsurf code editor. |
| Operating systems | macOS, Windows, or Linux-based computer. |
| Configure your local setup (Optional) | Configure the extension to mirror your dbt environment locally and set any environment variables locally to use the VS Code extension features. |
| Run dbt-autofix (Optional) | Run dbt-autofix to fix any errors and deprecations in your dbt project. |
Install the extension
To install the dbt VS Code extension, follow these steps in your editor of choice:
- Navigate to the Extensions tab of your editor and search for
dbt. Locate the extension from the publisherdbtLabsIncordbt Labs Inc. Click Install. - Open a dbt project in your VS Code environment if you haven't already. Make sure it is added to your current workspace. If you see a dbt Extension label in your editor's status bar, then the extension has installed successfully. You can hover over this dbt Extension label to see diagnostic information about the extension.
- Once the dbt extension is activated, it will automatically begin downloading the correct dbt Language Server (LSP) for your operating system.
- If the dbt Fusion engine is not already installed on your machine, the extension will prompt you to download and install it. Follow the steps shown in the notification to complete the installation or install it manually from the command line.
- Run the VS Code extension upgrade tool to ensure your dbt project is Fusion ready and help you fix any errors and deprecations.
- (Optional) If you're new to the extension or VS Code/Cursor, you can set your local environment to mirror your dbt platform environment and set any environment variables locally to use the VS Code extension features.
You're all set up with the dbt extension! The next steps are:
- Follow the getting started section to begin the terminal onboarding workflow and configure your set up. If you encounter any parsing errors, you can also run the
dbt-autofixtool to resolve them. - Install the dbt Fusion engine from the command line, if you haven't already.
- Register the extension with your email address or dbt platform account to continue using it beyond the trial period.
- Review the limitations and unsupported features if you haven't already.
Install Fusion manually
If you already have the dbt Fusion Engine installed, you can skip this step. If you don't have it installed, you can follow these steps to install it:
-
Open a new command-line window and run the following command to install the dbt Fusion Engine:
- macOS & Linux
- Windows (PowerShell)
Run the following command in the terminal:
curl -fsSL https://public.cdn.getdbt.com/fs/install/install.sh | sh -s -- --updateTo use
dbtfimmediately after installation, reload your shell so that the new$PATHis recognized:exec $SHELLOr, close and reopen your Terminal window. This will load the updated environment settings into the new session.
Run the following command in PowerShell:
irm https://public.cdn.getdbt.com/fs/install/install.ps1 | iexTo use
dbtfimmediately after installation, reload your shell so that the newPathis recognized:Start-Process powershellOr, close and reopen PowerShell. This will load the updated environment settings into the new session.
-
Run the following command to verify you've installed Fusion:
dbtf --versionYou can use
dbtor its Fusion aliasdbtf(handy if you already have another dbt CLI installed). Default install path:- macOS/Linux:
$HOME/.local/bin/dbt - Windows:
C:\Users\<username>\.local\bin\dbt.exe
The installer adds this path automatically, but you may need to reload your shell for the
dbtfcommand to work. - macOS/Linux:
- Follow the getting started guide to get started with the extension. You can get started by either:
- Running
dbtf initto use terminal onboarding, - Running Run dbt: Register dbt extension in the command palette,
- Using the Get started button in the extension menu.
- Running
Getting started
Once the dbt Fusion Engine and dbt VS Code extension have been installed in your environment, the dbt logo will appear on the sidebar. From here, you can access workflows to help you get started, offers information about the extension and your dbt project, and provides helpful links to guide you. For more information, see the the dbt extension menu documentation.
You can get started with the extension a couple of ways:
- Running
dbtf initto use the terminal onboarding, - Opening Run dbt: Register dbt extension in the command palette,
- Using the Get started button in the extension menu.
The following steps explain how to get started using the Get started button in the extension menu:
- From the sidebar menu, click the dbt logo to open the menu and expand the Get started section.
- Click the dbt Walkthrough status bar to view the welcome screen.
- Click through the items to get started with the extension:
- Open your dbt project: Launches file explorer so you can select the dbt project you want to open with Fusion.
- Check Fusion compatibility: Runs the Fusion upgrade workflows to bring your project up-to-date. If you encounter any parsing errors, you can also run the
dbt-autofixtool to resolve them. - Explore features: Opens the documentation so you can learn more about all the extension has to offer.
- Register: Launches the registration workflow so you can continue to use the extension beyond the trial period.
Upgrade to Fusion
If you are already running the dbt Fusion Engine, you must be on version 2.0.0-beta.66 or higher to use the upgrade tool.
The dbt extension provides a built-in upgrade tool to walk you through the process of configuring Fusion and updating your dbt project to support all of its features and fix any deprecated code. To start the process:
-
From the VS Code sidebar menu, click the dbt logo.
-
In the resulting pane, open the Get started section and click the Get started button.
You can also manually start this process by opening a CLI window and running:
dbt init --fusion-upgrade
This will start the upgrade tool and guide you through the Fusion upgrade with a series of prompts:
-
Do you have an existing dbt platform account?: If you answer
Y, you will be given instructions for downloading your dbt platform profile to register the extension. AnNanswer will skip to the next step. -
Ready to run a dbtf init? (If there is no
profiles.ymlfile present): You will go through the dbt configuration processes, including connecting to your data warehouse. -
Ready to run a dbtf debug? (If there is an existing
profiles.ymlfile): Validates that your project is configured correctly and can connect to your data warehouse. -
Ready to run a dbtf parse?: Your dbt project will be parsed to check for compatibility with Fusion.
- If any issues are encountered during the parsing, you'll be given the option to run the dbt-autofix tool to resolve the errors. If you opt to not run the tool during the upgrade processes, you can always run it later or manually fix any errors. However, the upgrade tool cannot continue until the errors are resolved.
AI Agents
There are cases where dbt-autofix may not resolve all errors and requires manual intervention. For those cases, the dbt-autofix tool provides an AI Agents.md file to enable AI agents to help with migration work after dbt-autofix has completed its part.
- If any issues are encountered during the parsing, you'll be given the option to run the dbt-autofix tool to resolve the errors. If you opt to not run the tool during the upgrade processes, you can always run it later or manually fix any errors. However, the upgrade tool cannot continue until the errors are resolved.
-
Ready to run a ‘dbtf compile -static-analysis off’? (Only runs once the parse passes): Compiles your project without any static analysis, mimicking dbt Core. This compile only renders Jinja into SQL, so Fusion's advanced SQL comprehension is temporarily disabled.
-
Ready to run a ‘dbtf compile’?: Compiles your project with full Fusion static analysis. It checks that your SQL code is valid in the context of your warehouse's tables and columns.
Once the upgrade is completed, you're ready to dive into all the features that the dbt Fusion Engine has to offer!
Register the extension
Users must complete registration within 14 days of installing the dbt extension. There are two ways to register:
- Don't have a dbt account? — Follow the VS Code “get started” workflow to register and verify your email. For the initial installation, you only need to provide your name and email address to complete the registration. Subsequent installations will require you to complete the entire dbt account registration process to use the extension.
- Returning user or existing dbt platform user? — If you have an existing dbt platform or previously created one in the past (whether expired or active), no need to register! Just log in with the same email to prevent duplicate accounts. If you can't log in or if it's locked, reach out to dbt Support to have it unlocked or reset before logging in.
The VS Code extension is free for organizations for up to 15 users. See the acceptable use policy for more information.
New user registration
If you do not already have a dbt account, you'll need to get registered. This only takes a minute!
- Click the registration prompt in your editor.
- Accept any prompts to open the link in your browser.
- Fill out the registration form, then click Continue.
- You will receive an email with a verification link. Once you click it, your registration is complete!
Accessing your dbt account
Registering to use the dbt extension makes it easy to create a full dbt account. You can follow these steps to finish setting up your account (Note: This is not required to use the dbt extension).
- Navigate to us1.dbt.com and click Forgot password?.
- Enter the email address you used for your dbt extension registration and click Continue.
- Check your email for a verification link and follow the password reset instructions to set a password for your account.
Now that you have activated your dbt developer account, you can access features of the dbt platform. You can also re-download your registration key using the steps outlined in Register with an existing dbt account if you need to set up the dbt extension on a new machine.
Register with an existing dbt account
During the VS Code extension registration workflow it can detect if you already have a dbt platform account or previously created one in the past (no need to create a new one!).
- If you already have a dbt platform account, you will need to use the same account to connect the extension.
- If you've never created a dbt platform account, skip this section and follow the earlier New user registration steps.
- The extension will use the
dbt_cloud.ymlfile from your dbt platform account, which securely stores your dbt platform account credentials for authentication. You can download this file from your dbt platform's Account settings page.
How the registration works
- If a
dbt_cloud.ymlfile already exists in your~/.dbt/(macOS/Linux) orC:\Users\[username]\.dbt(Windows) folder, the extension automatically detects it in the registration flow and uses it. - If you don’t have the file yet, you’ll need to download it from the dbt platform.
Download the dbt_cloud.yml file
Follow these steps to download the dbt_cloud.yml file:
- Log into dbt platform and click your account name at the bottom left.
- If you can't login, follow the accessing your dbt account steps.
- Click Account settings.
- Under Your profile, click VS Code Extension.
- In the Set up your credentials section, click Download credentials to download the
dbt_cloud.ymlfile. - Download the
dbt_cloud.ymlfile to complete registration.
- Move the downloaded
dbt_cloud.ymlfile to your dbt directory:- macOS/Linux:
~/.dbt/ - Windows:
C:\Users\[username]\.dbt\
- macOS/Linux:
For detailed instructions on how to create a .dbt directory and move the file, see this FAQ.
7. Then go back to VS Code and open the command palette (Ctrl + Shift + P (Windows/Linux) or Cmd + Shift + P (macOS)).
8. Run dbt: Register dbt extension to complete registration.
9. If you run into any issues, reach out to support — we're here to help!
Configure environment variables locally
This section is optional. You only need to configure environment variables locally if your dbt project uses environment variables that are already configured in the dbt platform.
If your dbt project uses environment variables, you can configure them to use the extension's features. See the Configure environment variables page for more information.
Troubleshooting
If you run into any issues, check out the troubleshooting section below.
More information about Fusion
Fusion marks a significant update to dbt. While many of the workflows you've grown accustomed to remain unchanged, there are a lot of new ideas, and a lot of old ones going away. The following is a list of the full scope of our current release of the Fusion engine, including implementation, installation, deprecations, and limitations:
- About the dbt Fusion engine
- About the dbt extension
- New concepts in Fusion
- Supported features matrix
- Installing Fusion CLI
- Installing VS Code extension
- Fusion release track
- Quickstart for Fusion
- Upgrade guide
- Fusion licensing
Was this page helpful?
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.









