dg
dg and Dagster Components are under active development. You may encounter feature gaps, and the APIs may change. To report issues or give feedback, please join the #dg-components channel in the Dagster Community Slack.
dg is a new command line interface that provides a streamlined Dagster development experience. It is a drop-in replacement for the Dagster CLI that can be used in existing projects or used to scaffold new Dagster projects. Once a project is set up to use dg, you can list, check, and scaffold Dagster definitions and components with ease.
dg is designed to be usable from an isolated environment and has no dependency on dagster itself.
Installation
You can install dg with uv or pip.
- uv
- pip
First, install the Python package manager uv if you don't have it:
- Mac
- Windows
- Linux
brew install uv
powershell -ExecutionPolicy ByPass -c 'irm https://astral.sh/uv/install.ps1 | iex'
curl -LsSf https://astral.sh/uv/install.sh | sh
For more detailed uv installation instructions, see the uv
docs.
Next, use uv to install dg as a globally available tool:
uv tool install dagster-dg
This installs dg into a hidden, isolated Python environment. The dg executable is always available in your $PATH, regardless of any virtual environment activation in the shell.
While it is possible to create a virtual environment and install dagster-dg into it with uv, we recommend a global installation for most users, since it only needs to be done once, and better supports multiple Python projects.
If you are starting a project from scratch, run the following:
mkdir my_project && cd my_project
python -m venv .venv && source .venv/bin/activate
If you are not starting a new project, first activate your desired virtual
environment, then install dagster-dg:
pip install dagster-dg
dg CLI reference
Once you've installed dg, you can run dg --help on the command line to see all the commands, or check out the dg CLI documentation.