Skip to main content

dbt Command reference

dbt is typically run one of two ways:

The following sections outline the commands supported by dbt and their relevant flags. Note that some commands are only supported when using the CLI.

For information about selecting models on the command line, consult the docs on Model selection syntax.

Available commands:

  • build: build and test all selected resources (models, seeds, snapshots, tests)
  • clean (CLI only): deletes artifacts present in the dbt project
  • compile: compiles (but does not run) the models in a project
  • debug (CLI only): debugs dbt connections and projects
  • deps: downloads dependencies for a project
  • docs : generates documentation for a project
  • init (CLI only): initializes a new dbt project
  • list (CLI only): lists resources defined in a dbt project
  • parse (CLI only): parses a project and writes detailed timing info
  • run: runs the models in a project
  • seed: loads CSV files into the database
  • snapshot: executes "snapshot" jobs defined in a project
  • source: provides tools for working with source data (including validating that sources are "fresh")
  • test: executes tests defined in a project
  • rpc (CLI only): runs an RPC server that clients can submit queries to
  • run-operation: runs arbitrary maintenance SQL against the database