Skip to main content

Configuring Dagster+ with the dg CLI

The dg CLI includes built-in commands for authenticating with Dagster+ and managing your configuration. This guide covers how to log in, set configuration, and view your current settings.

Prerequisites
  • Python 3.10+
  • The dg CLI installed. See the dg CLI reference for installation instructions.

Logging in

The simplest way to configure the dg CLI for Dagster+ is to log in interactively:

dg plus login

This opens your browser to authenticate, then prompts you to select a default deployment. Your credentials are saved to ~/.dagster_cloud_cli/config.

For EU-hosted Dagster+ organizations, use the --region flag:

dg plus login --region eu

Setting config non-interactively

For CI/CD pipelines and automation, you can set configuration without interactive prompts:

dg plus config set --api-token <TOKEN> --organization <ORG> --deployment prod

Available options:

OptionDescription
--api-tokenDagster+ API token
--organizationDagster+ organization name
--deploymentDefault deployment name
--urlDagster+ URL
--regionRegion (us or eu)

You can also use environment variables instead of the configuration file:

Environment variableDescription
DAGSTER_CLOUD_API_TOKENAPI token
DAGSTER_CLOUD_ORGANIZATIONOrganization name
DAGSTER_CLOUD_DEPLOYMENTDefault deployment

Viewing config

To view your current configuration:

dg plus config view

This displays your organization, deployment, and a censored API token. To show the full token:

dg plus config view --show-token

Switching deployments

To switch your default deployment:

dg plus config set --deployment <deployment_name>

Configuration file location

The dg CLI stores Dagster+ configuration at ~/.dagster_cloud_cli/config. This file is shared with the dagster-cloud CLI, so logging in with either tool configures both.

Migrating from the dagster-cloud CLI

If you're currently using the dagster-cloud CLI, here's how the commands map:

dagster-cloud CLIdg CLI
dagster-cloud config setupdg plus login or dg plus config set
dagster-cloud config viewdg plus config view
dagster-cloud config set-deploymentdg plus config set --deployment