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:

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