The dbt Cloud CLI, now called the dbt platform CLI, lets you write code in your own editor and run dbt
commands from your terminal, while the commands execute on dbt’s infrastructure with the connection
and credentials of your development environment. There is no profiles.yml to maintain: the CLI signs
in with a personal access token kept in dbt_cloud.yml.
Copy and paste
1. Install it with Homebrew:
which dbt # should print "dbt not found"; see below if it does not
brew untap dbt-labs/dbt
brew tap dbt-labs/dbt-cli
brew install dbt
dbt --help
The first line of the help should read
The dbt CLI - an ELT tool for running SQL transformations and data models in dbt....
2. Download your credentials. In dbt platform, open Account settings > Your profile > CLI > Configure Cloud authentication and click Download CLI configuration file. Save it as:
~/.dbt/dbt_cloud.yml
3. Link your local project to the dbt platform project, in dbt_project.yml:
dbt-cloud:
project-id: '123456'
4. Check the connection from the project folder:
dbt environment show
dbt compile
Before you start
- The project must have a development environment in dbt platform.
- Your development credentials for the project must be set in Account settings. The CLI uses them for the warehouse connection.
- Clone the project’s repository on your machine. The CLI works inside that folder.
dbt_cloud.yml
The downloaded file holds the account, the project and your personal access token:
version: "1"
context:
active-host: "ab123.us1.dbt.com"
active-project: "123456"
projects:
- project-name: "Shop"
project-id: "123456"
account-name: "Example"
account-id: "98765"
account-host: "ab123.us1.dbt.com"
token-name: "cloud-cli-1234"
token-value: "dbtu_..."
The CLI looks for exactly ~/.dbt/dbt_cloud.yml. A browser that saves it as dbt_cloud(2).yml breaks
the setup until you rename it. The token gives access to your account: do not commit the file.
Next to dbt Core
The CLI installs a command called dbt, like dbt Core and dbt v2, and they conflict when both are on
the PATH.
- dbt Core installed globally: uninstall it with
pip uninstall dbt-core, or use the CLI only. - dbt Core in a virtual environment: deactivate the environment before using the CLI, or give the CLI an alias:
alias dbt-cloud="/opt/homebrew/bin/dbt"
pip install dbtis not the CLI. On PyPI, thedbtpackage now installs dbt v2. The platform CLI comes from Homebrew.
What is different from dbt Core
- Deferral is automatic. Models you do not build are read from production;
--no-deferturns it off. See how to defer to production. - Artifacts are downloaded to your
targetfolder after each command;--download-artifacts=falseskips that. - Sessions.
dbt invocation listshows running commands, anddbt reattachreconnects to one. - Linting.
dbt sqlfluff lint,fixandformatare built in. - Local packages. Relative paths in
packages.ymlare not supported.
Updating
brew update && brew upgrade dbt
Based on the dbt platform documentation (October 2026); not run against a live dbt account.