The `dagster-dg-cli` package provides the command-line interface (CLI) for interacting with Dagster, a Python-native data orchestrator. It allows users to create projects, launch the Dagit UI, deploy to Dagster Cloud, and manage assets, jobs, and runs. The library frequently updates, often on a weekly cadence, in sync with the broader Dagster ecosystem. The current version is 1.13.0.
pip install dagster-dg-cliVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to create a new Dagster project using `dg new`. It then provides instructions to launch the local development UI (Dagit) with `dg dev` in a separate terminal to interact with the newly created project. The Python script executes the setup command but provides clear instructions for the long-running `dg dev` command.
Focus on using `dg` commands in your shell. If you need programmatic access to Dagster objects, import directly from the `dagster` package (e.g., `from dagster import asset`).
Consult the official Dagster documentation for your installed `dagster-dg-cli` version to ensure compatibility when scripting with `dg api` commands. Pin your `dagster-dg-cli` version in `requirements.txt`.
Ensure `pip install dagster-cloud` and configure your `pyproject.toml` under `[tool.dg.project]` as per Dagster Cloud documentation before attempting `dg plus deploy`.
Install the package using `pip install dagster-dg-cli` (or `uv pip install dagster-dg-cli`) and ensure your virtual environment is activated or the Python scripts directory is in your PATH.
Install the necessary Dagster packages, commonly `pip install dagster dagster-webserver dagster-dg-cli`, within your active virtual environment.
Verify that the module or file path provided to the `dg` command is correct, accessible, and that all necessary `__init__.py` files exist to make your directories valid Python packages.
Update all Dagster-related packages to their latest compatible versions using `pip install --upgrade dagster dagster-webserver dagster-dg-cli dagster-components` (or specific related packages).