Skip to main content

dg

warning

This feature is considered in a preview stage and is under active development. It can change significantly, or be removed completely. It is not considered ready for production use.

The dg command line tool lives in the published Python package dagster-dg. dg is designed to be globally installed and has no dependency on dagster itself. dg allows you to quickly scaffold Dagster projects, and, if you wish, populate them with components.

Installation

Install uv

We will use the Python package manager uv to install a globally available dg:

brew install uv

Install dg

Once you have installed uv, use it to install dg.

uv tool install dagster-dg
tip

uv tool install installs python packages from PyPI into isolated environments and exposes their executables on your shell path. This means the dg command should now be available. It will always execute in an isolated environment separate from any project environment.

note

If you have a local clone of the dagster repo, you can install a local version of dg with uv tool install -e $DAGSTER_GIT_REPO_DIR/python_modules/libraries/dagster-dg. This will create an isolated environment for dg just like the standard uv tool install, but the environment will contain an editable installation of dagster-dg.