Dagster Cloud CLI

1.13.0 · active · verified Fri Apr 10

The `dagster-cloud-cli` provides command-line tools for interacting with Dagster Cloud, enabling operations such as deploying code, managing agents, and configuring workspaces. It is the primary interface for developers to manage their Dagster deployments in a Dagster Cloud environment. The current version is 1.13.0, with releases tightly coupled to the broader Dagster ecosystem's frequent update cadence.

Warnings

Install

Quickstart

This quickstart demonstrates how to verify the installation of `dagster-cloud-cli` by running the `dg --version` command. The `dagster-cloud-cli` is primarily a command-line interface tool, and most interactions happen directly in the terminal via the `dg` command. For programmatic interactions with Dagster Cloud itself, the `dagster-cloud` Python library is generally used.

import subprocess
import os

# The dagster-cloud-cli is primarily used via the 'dg' command in the terminal.
# This quickstart demonstrates checking its version programmatically.

try:
    # This runs a basic 'dg --version' command to verify installation.
    # For actual Dagster Cloud operations (e.g., 'dg deploy'), you would typically
    # execute commands directly in your shell or CI/CD scripts.
    print("Running: dg --version")
    result = subprocess.run(["dg", "--version"], capture_output=True, text=True, check=True)
    print("\nDagster Cloud CLI Version Information:")
    print(result.stdout)
    print("Ensure 'dg' is in your system's PATH after installation.")

except FileNotFoundError:
    print("Error: 'dg' command not found. Ensure dagster-cloud-cli is installed and in your PATH.")
except subprocess.CalledProcessError as e:
    print(f"Error running dg command: {e}")
    print(f"Stdout: {e.stdout}")
    print(f"Stderr: {e.stderr}")

view raw JSON →