Skip to main content

Install dbt locally

Get dbt running on your machine in a few minutes. Choose your path:

Install the Fusion CLI Preview

The Fusion CLI delivers dbt Fusion engine performance benefits (faster parsing, compilation, and execution) but doesn't include LSP features. For the best dbt Fusion engine experience, install the dbt VS Code extension in VS Code or a compatible IDE.

Choose your preferred installation method:

 Pip installation for Windows, macOS, and Linux
python -m pip install --pre dbt

To upgrade to a newer version:

python -m pip install --upgrade --pre dbt
 CDN installation for macOS and Linux
curl -fsSL https://public.cdn.getdbt.com/fs/install/install.sh | sh -s -- --update

To use dbt immediately after installation, close and reopen your terminal or reload your shell so that the new $PATH is recognized:

exec $SHELL

To upgrade to a newer version:

dbt system update
 CDN installation for Windows
irm https://public.cdn.getdbt.com/fs/install/install.ps1 | iex

To use dbt immediately after installation, close and reopen or reload your shell so that the new Path is recognized:

Start-Process powershell

To upgrade to a newer version:

dbt system update
 Homebrew installation for macOS
brew install dbt

To upgrade to a newer version:

brew upgrade dbt
 Winget installation for Windows
winget install --id dbtLabs.dbt --exact

To upgrade to a specific version:

winget install --id dbtLabs.dbt --exact --version <version>

Run the following command to verify your installation:

dbt --version

You can use dbt or its Fusion alias dbtf (handy if you already have the Core or platform 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 dbtf command to work.

Install the extension

Install the dbt VS Code extension from the marketplace for VS Code and Cursor or Windsurf.

  1. In your editor, open the Extensions tab and search for dbt.

  2. Locate the extension from the publisher dbtLabsInc or dbt Labs Inc, then click Install.

    Search for the extensionSearch for the extension
  3. Confirm that the extension is active by checking for the dbt Extension label in the status bar. Hover over the label to view diagnostic information.

    If you see the 'dbt Extension' label, the extension is activatedIf you see the 'dbt Extension' label, the extension is activated
  4. After the extension activates, it automatically downloads the correct dbt Language Server (LSP) for your operating system.

    The dbt Language Server will be installed automaticallyThe dbt Language Server will be installed automatically

Refer to the dbt VS Code extension docs for more information.

Troubleshooting

Common issues and resolutions:

  • dbt command not found: Add the installation location to your $PATH.
  • Version conflicts: Check that no other dbt Core or dbt CLI versions are installed or active on your machine.
  • Installation permissions: Make sure your user account can install software locally.

Frequently asked questions

  • Can I revert to my previous dbt installation?

    Yes. To test Fusion without affecting your existing workflows, use a separate environment or virtual machine.

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:

Pro tip: Using the --help flag

Most command-line tools, including dbt, support a --help flag that shows available commands and arguments. With dbt, you can use --help in two ways:

dbt --help: Shows available dbt commands
dbt run --help: Shows available flags for the run command

Next steps

Was this page helpful?

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

0
Loading