Skip to main content

dg plus reference

dg plus

Commands for interacting with Dagster Plus.

dg plus [OPTIONS] COMMAND [ARGS]...

config

Commands for viewing and managing Dagster Plus configuration.

dg plus config [OPTIONS] COMMAND [ARGS]...

set

Set Dagster Plus CLI configuration values.

dg plus config set [OPTIONS]

Options:

--api-token <api_token>

API token for authentication (or set DAGSTER_CLOUD_API_TOKEN).

-o, --organization <organization>

Organization name (or set DAGSTER_CLOUD_ORGANIZATION).

-d, --deployment <deployment>

Default deployment (or set DAGSTER_CLOUD_DEPLOYMENT).

--url <url>

Direct URL override for the Dagster Plus instance.

--region <region>

Dagster Cloud region. ‘eu’ sets URL to https://eu.dagster.cloud.

Options: us | eu

Environment variables:

DAGSTER_CLOUD_API_TOKEN

Provide a default for --api-token

DAGSTER_CLOUD_ORGANIZATION

Provide a default for --organization

DAGSTER_CLOUD_DEPLOYMENT

Provide a default for --deployment

view

View the current Dagster Plus CLI configuration.

dg plus config view [OPTIONS]

Options:

-s, --show-token

Show the full user token instead of a censored version.

create

Commands for creating configuration in Dagster Plus.

dg plus create [OPTIONS] COMMAND [ARGS]...

ci-api-token

Create a Dagster Plus API token for CI.

dg plus create ci-api-token [OPTIONS]

Options:

--description <description>

Description for the token

--verbose

Enable verbose output for debugging.

env

Create or update an environment variable in Dagster Plus.

dg plus create env [OPTIONS] ENV_NAME [ENV_VALUE]

Options:

--from-local-env

Pull the environment variable value from your shell environment or project .env file.

--scope <scope>

The deployment scope to set the environment variable in. Defaults to all scopes.

Options: full | branch | local

--global

Whether to set the environment variable at the deployment level, for all locations.

-y, --yes

Do not confirm the creation of the environment variable, if it already exists.

--target-path <target_path>

Specify a directory to use to load the context for this command. This will typically be a folder with a dg.toml or pyproject.toml file in it.

--verbose

Enable verbose output for debugging.

Arguments:

ENV_NAME

Required argument

ENV_VALUE

Optional argument

deploy

Deploy a project or workspace to Dagster Plus. Handles all state management for the deploy session, building and pushing a new code artifact for each project.

To run a full end-to-end deploy, run dg plus deploy. This will start a new session, build and push the image for the project or workspace, and inform Dagster+ to deploy the newly built code.

Each of the individual stages of the deploy is also available as its own subcommand for additional customization.

dg plus deploy [OPTIONS] COMMAND [ARGS]...

Options:

--deployment <deployment>

Name of the Dagster+ deployment to which to deploy (or use as the base deployment if deploying to a branch deployment). If not set, defaults to the value set by dg plus login.

Default: 'deployment'

--organization <organization>

Dagster+ organization to which to deploy. If not set, defaults to the value set by dg plus login.

Default: 'organization'

--build-strategy <build_strategy>

Build strategy used to build code locations. ‘docker’ builds a Docker image (required for Hybrid agents). ‘python-executable’ builds PEX files (Serverless agents only).

Options: docker | python-executable

--pex-build-method <pex_build_method>

Build method for PEX dependencies. ‘docker-fallback’ tries local first then Docker (default), ‘local’ uses only the current environment, ‘docker’ uses only a Docker builder. Only applies when –build-strategy=python-executable.

Options: local | docker | docker-fallback

--python-version <python_version>

Python version used to deploy the project. If not set, defaults to the calling process’s Python minor version.

Options: 3.9 | 3.10 | 3.11 | 3.12 | 3.13 | 3.14

--deployment-type <deployment_type_str>

Whether to deploy to a full deployment or a branch deployment. If unset, will attempt to infer from the current git branch.

Options: full | branch

--agent-type <agent_type_str>

Whether this a Hybrid or serverless code location.

Options: serverless | hybrid

-y, --yes

Skip confirmation prompts.

--git-url <git_url>
--commit-hash <commit_hash>
--location-name <location_names>

Name of the code location to set the build output for. Defaults to the current project’s code location, or every project’s code location when run in a workspace.

--status-url <status_url>
--snapshot-base-condition <snapshot_base_condition_str>

Options: on-create | on-update

--skip-validation

Skip configuration validation checks (not recommended).

--use-editable-dagster

Install all Dagster package dependencies from a local Dagster clone. The location of the local Dagster clone will be read from the DAGSTER_GIT_REPO_DIR environment variable.

--target-path <target_path>

Specify a directory to use to load the context for this command. This will typically be a folder with a dg.toml or pyproject.toml file in it.

--verbose

Enable verbose output for debugging.

Environment variables:

DAGSTER_CLOUD_DEPLOYMENT

Provide a default for --deployment

DAGSTER_CLOUD_ORGANIZATION

Provide a default for --organization

DAGSTER_BUILD_STRATEGY

Provide a default for --build-strategy

DAGSTER_PEX_BUILD_METHOD

Provide a default for --pex-build-method

build-and-push

Builds a Docker image to be deployed, and pushes it to the registry that was configured when the deploy session was started.

dg plus deploy build-and-push [OPTIONS]

Options:

--agent-type <agent_type_str>

Whether this a Hybrid or serverless code location.

Options: serverless | hybrid

--build-strategy <build_strategy>

Build strategy used to build code locations. ‘docker’ builds a Docker image (required for Hybrid agents). ‘python-executable’ builds PEX files (Serverless agents only).

Options: docker | python-executable

--pex-build-method <pex_build_method>

Build method for PEX dependencies. ‘docker-fallback’ tries local first then Docker (default), ‘local’ uses only the current environment, ‘docker’ uses only a Docker builder. Only applies when –build-strategy=python-executable.

Options: local | docker | docker-fallback

--python-version <python_version>

Python version used to deploy the project. If not set, defaults to the calling process’s Python minor version.

Options: 3.9 | 3.10 | 3.11 | 3.12 | 3.13 | 3.14

--location-name <location_names>

Name of the code location to set the build output for. Defaults to the current project’s code location, or every project’s code location when run in a workspace.

--use-editable-dagster

Install all Dagster package dependencies from a local Dagster clone. The location of the local Dagster clone will be read from the DAGSTER_GIT_REPO_DIR environment variable.

--target-path <target_path>

Specify a directory to use to load the context for this command. This will typically be a folder with a dg.toml or pyproject.toml file in it.

--verbose

Enable verbose output for debugging.

Environment variables:

DAGSTER_BUILD_STRATEGY

Provide a default for --build-strategy

DAGSTER_PEX_BUILD_METHOD

Provide a default for --pex-build-method

configure

Scaffold deployment configuration files for Dagster Plus.

If no subcommand is specified, will attempt to auto-detect the agent type from your Dagster Plus deployment. If detection fails, you will be prompted to choose between serverless or hybrid.

If run in a workspace, will scaffold configuration files for the workspace and all projects contained in it.

dg plus deploy configure [OPTIONS] COMMAND [ARGS]...

Options:

--git-provider <git_provider>

Git provider for CI/CD scaffolding

Options: github | gitlab

--verbose

Enable verbose output for debugging.

hybrid

Scaffold deployment configuration for Dagster Plus Hybrid.

This creates:

  • Dockerfile and build.yaml for containerization

  • container_context.yaml with platform-specific config (k8s/ecs/docker)

  • Required files for CI/CD based on your Git provider (GitHub Actions or GitLab CI)

    dg plus deploy configure hybrid [OPTIONS]

Options:

--git-provider <git_provider>

Git provider for CI/CD scaffolding

Options: github | gitlab

--agent-platform <agent_platform>

Agent platform (k8s, ecs, or docker)

Options: k8s | ecs | docker

--registry-url <registry_url>

Container registry URL for Docker images (e.g., 123456789012.dkr.ecr.us-east-1.amazonaws.com/my-repo)

--python-version <python_version>

Python version used to deploy the project

Options: 3.9 | 3.10 | 3.11 | 3.12 | 3.13 | 3.14

--organization <organization>

Dagster Plus organization name

--url <url>

Dagster Cloud URL (defaults to https://dagster.cloud)

--deployment <deployment>

Deployment name

--git-root <git_root>

Path to the git repository root

-y, --yes

Skip confirmation prompts

--use-editable-dagster

Install all Dagster package dependencies from a local Dagster clone. The location of the local Dagster clone will be read from the DAGSTER_GIT_REPO_DIR environment variable.

--verbose

Enable verbose output for debugging.

serverless

Scaffold deployment configuration for Dagster Plus Serverless.

This creates:

  • Required files for CI/CD based on your Git provider (GitHub Actions or GitLab CI)

  • Dockerfile and build.yaml for containerization (if –no-pex-deploy is used)

    dg plus deploy configure serverless [OPTIONS]

Options:

--git-provider <git_provider>

Git provider for CI/CD scaffolding

Options: github | gitlab

--python-version <python_version>

Python version used to deploy the project

Options: 3.9 | 3.10 | 3.11 | 3.12 | 3.13 | 3.14

--organization <organization>

Dagster Plus organization name

--url <url>

Dagster Plus URL for the organization

--deployment <deployment>

Deployment name

--git-root <git_root>

Path to the git repository root

--pex-deploy, --no-pex-deploy

Enable PEX-based fast deploys (default: True). If disabled, Docker builds will be used.

-y, --yes

Skip confirmation prompts

--use-editable-dagster

Install all Dagster package dependencies from a local Dagster clone. The location of the local Dagster clone will be read from the DAGSTER_GIT_REPO_DIR environment variable.

--verbose

Enable verbose output for debugging.

deselect

Mark specified locations as excluded from the current build session.

dg plus deploy deselect [OPTIONS] LOCATION_NAMES...

Options:

--verbose

Enable verbose output for debugging.

Arguments:

LOCATION_NAMES

Required argument(s)

finish

Once all needed images have been built and pushed, completes the deploy session, signaling to the Dagster+ API that the deployment can be updated to the newly built and pushed code.

dg plus deploy finish [OPTIONS]

Options:

--location-name <location_names>

Name of the code location to set the build output for. Defaults to the current project’s code location, or every project’s code location when run in a workspace.

--verbose

Enable verbose output for debugging.

--target-path <target_path>

Specify a directory to use to load the context for this command. This will typically be a folder with a dg.toml or pyproject.toml file in it.

inspect

Print JSON info about the current CI/CD environment.

dg plus deploy inspect [OPTIONS]

Options:

--project-dir <project_dir>

Project directory for CI context detection.

--verbose

Enable verbose output for debugging.

list-locations

List all locations in the current deploy session with their selection status.

dg plus deploy list-locations [OPTIONS]

Options:

--verbose

Enable verbose output for debugging.

notify

Update a GitHub PR comment with deploy status.

dg plus deploy notify [OPTIONS]

Options:

--project-dir <project_dir>

Project directory for CI context detection.

--verbose

Enable verbose output for debugging.

refresh-defs-state

[Experimental] If using StateBackedComponents, this command will execute the refresh_state on each of them, and set the defs_state_info for each location.

Environment variables from Dagster Plus are automatically fetched and injected into the subprocess environment during state refresh. Uses fullDeploymentScope for production deploys and allBranchDeploymentsScope for branch deploys.

dg plus deploy refresh-defs-state [OPTIONS]

Options:

--use-editable-dagster

Install all Dagster package dependencies from a local Dagster clone. The location of the local Dagster clone will be read from the DAGSTER_GIT_REPO_DIR environment variable.

--target-path <target_path>

Specify a directory to use to load the context for this command. This will typically be a folder with a dg.toml or pyproject.toml file in it.

--verbose

Enable verbose output for debugging.

--management-type <management_type>

Only refresh components with the specified management type. Can be specified multiple times to include multiple types. By default, refreshes VERSIONED_STATE_STORAGE and LOCAL_FILESYSTEM components.

Options: LOCAL_FILESYSTEM | VERSIONED_STATE_STORAGE

select

Mark specified locations as included in the current build session.

dg plus deploy select [OPTIONS] LOCATION_NAMES...

Options:

--verbose

Enable verbose output for debugging.

Arguments:

LOCATION_NAMES

Required argument(s)

set-build-output

If building a Docker image was built outside of the dg CLI, configures the deploy session to indicate the correct tag to use when the session is finished.

dg plus deploy set-build-output [OPTIONS]

Options:

--image-tag <image_tag>

Required Tag for the built docker image.

--location-name <location_names>

Name of the code location to set the build output for. Defaults to the current project’s code location, or every project’s code location when run in a workspace.

--verbose

Enable verbose output for debugging.

--target-path <target_path>

Specify a directory to use to load the context for this command. This will typically be a folder with a dg.toml or pyproject.toml file in it.

start

Start a new deploy session. Determines which code locations will be deployed and what deployment is being targeted (creating a new branch deployment if needed), and initializes a folder on the filesystem where state about the deploy session will be stored.

dg plus deploy start [OPTIONS]

Options:

--deployment <deployment>

Name of the Dagster+ deployment to which to deploy (or use as the base deployment if deploying to a branch deployment). If not set, defaults to the value set by dg plus login.

Default: 'deployment'

--organization <organization>

Dagster+ organization to which to deploy. If not set, defaults to the value set by dg plus login.

Default: 'organization'

--deployment-type <deployment_type_str>

Whether to deploy to a full deployment or a branch deployment. If unset, will attempt to infer from the current git branch.

Options: full | branch

-y, --yes

Skip confirmation prompts.

--git-url <git_url>
--commit-hash <commit_hash>
--location-name <location_names>

Name of the code location to set the build output for. Defaults to the current project’s code location, or every project’s code location when run in a workspace.

--target-path <target_path>

Specify a directory to use to load the context for this command. This will typically be a folder with a dg.toml or pyproject.toml file in it.

--status-url <status_url>
--snapshot-base-condition <snapshot_base_condition_str>

Options: on-create | on-update

--skip-validation

Skip configuration validation checks (not recommended).

--verbose

Enable verbose output for debugging.

Environment variables:

DAGSTER_CLOUD_DEPLOYMENT

Provide a default for --deployment

DAGSTER_CLOUD_ORGANIZATION

Provide a default for --organization

status

Show status of the current deploy session.

dg plus deploy status [OPTIONS]

Options:

--output-format <output_format>

Output format for the deploy status.

Options: json | markdown

--verbose

Enable verbose output for debugging.

integrations

Commands for managing integrations with Dagster Plus.

dg plus integrations [OPTIONS] COMMAND [ARGS]...

dbt

Commands for managing dbt integrations with Dagster Plus.

dg plus integrations dbt [OPTIONS] COMMAND [ARGS]...
manage-manifest

Auto-manage dbt manifest upload/download based on deployment context.

In branch deployments, downloads the prod manifest. In the source deployment (default: “prod”), uploads the manifest. Replaces dagster-cloud ci project manage-state.

dg plus integrations dbt manage-manifest [OPTIONS]

Options:

--components <components_path>

Path to a dg project directory containing DbtProjectComponents.

--file <file_path>

Path to a Python file with DbtProject definitions.

--source-deployment <source_deployment>

Which deployment should upload its manifest.json.

--key-prefix <key_prefix>

A key prefix for the key the manifest.json is saved with.

-o, --organization <organization>

Organization to target.

--api-token <api_token>

Dagster Cloud API token.

--view-graphql

Print GraphQL queries and responses to stderr for debugging.

Environment variables:

DAGSTER_CLOUD_ORGANIZATION

Provide a default for --organization

DAGSTER_CLOUD_API_TOKEN

Provide a default for --api-token

login

Login to Dagster Plus.

dg plus login [OPTIONS]

Options:

--region <region>

Dagster Cloud region to login to. Use ‘eu’ for European region.

Options: us | eu

pull

Commands for pulling configuration from Dagster Plus.

dg plus pull [OPTIONS] COMMAND [ARGS]...

env

Pull environment variables from Dagster Plus and save to a .env file for local use.

dg plus pull env [OPTIONS]

Options:

--verbose

Enable verbose output for debugging.

--target-path <target_path>

Specify a directory to use to load the context for this command. This will typically be a folder with a dg.toml or pyproject.toml file in it.