dg plus reference
dg plus
Commands for interacting with Dagster Plus.
dg plus [OPTIONS] COMMAND [ARGS]...
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'
- --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
- --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.
- --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.
- --snapshot-base-condition <snapshot_base_condition_str>
Options: on-create | on-update
- --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
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
- --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
- --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.
configure
Scaffold deployment configuration files for Dagster Plus.
dg plus deploy configure [OPTIONS] COMMAND [ARGS]...
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)
-
GitHub Actions workflow with Docker build steps (if –git-provider github is specified)
dg plus deploy configure hybrid [OPTIONS]
Options:
- --git-provider <git_provider>
Git provider for CI/CD scaffolding (only github is supported currently)
Options: github
- --agent-platform <agent_platform>
Agent platform (k8s, ecs, or docker)
Options: k8s | ecs | docker
- --python-version <python_version>
Python version used to deploy the project
Options: 3.9 | 3.10 | 3.11 | 3.12 | 3.13
- --organization <organization>
Dagster Plus organization name
- --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:
-
Dockerfile and build.yaml for containerization
-
GitHub Actions workflow (if –git-provider github is specified)
dg plus deploy configure serverless [OPTIONS]
Options:
- --git-provider <git_provider>
Git provider for CI/CD scaffolding (only github is supported currently)
Options: github
- --python-version <python_version>
Python version used to deploy the project
Options: 3.9 | 3.10 | 3.11 | 3.12 | 3.13
- --organization <organization>
Dagster Plus organization name
- --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.
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.
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.
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
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.
- --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.
- --snapshot-base-condition <snapshot_base_condition_str>
Options: on-create | on-update
- --verbose
Enable verbose output for debugging.
Environment variables:
- DAGSTER_CLOUD_DEPLOYMENT
Provide a default for
--deployment
- DAGSTER_CLOUD_ORGANIZATION
Provide a default for
--organization
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.