dagster CLI
Thedagster command-line interface provides tools for working with Dagster projects, including job execution, asset materialization, schedule management, and development workflows.
Installation
Global Options
Show the installed Dagster version
Show help message and exit
dagster dev
Start a local development deployment of Dagster, including the webserver and daemon.Superseded: This command is being replaced by
dg dev. The dagster dev command will continue to work but consider migrating to the new CLI.Usage
Options
Set the log level for code servers spun up by dagster servicesChoices:
critical, error, warning, info, debugSet the log level for dagster servicesChoices:
critical, error, warning, info, debugFormat of the logs for dagster servicesChoices:
colored, json, richPort to use for the Dagster webserverAliases:
--dagit-port, -pHost to use for the Dagster webserverAliases:
--dagit-host, -hRate at which the dagster UI polls for updated asset data (in milliseconds)
Use the legacy behavior of the daemon and webserver each starting up their own code server
Show verbose stack traces for errors in the code server
Workspace Options
Path to workspace file. Argument can be provided multiple times
Path to a Python file containing Dagster definitions
Python module containing Dagster definitions
Working directory to use when loading the repository or job
Attribute within the module or file that defines the Definitions object
Example
Output
Environment Variables
DAGSTER_HOME: Directory for Dagster instance configuration (dagster.yaml)DAGSTER_IS_DEV_CLI: Automatically set to “1” when using dagster dev
dagster job
Commands for working with Dagster jobs.dagster job list
List all jobs in a repository.Example
Output
dagster job print
Print detailed information about a job.Options
Show detailed op information including inputs and outputs
Name of the job to print
Example
dagster job execute
Execute a job in the same Python environment.Superseded: Use
dg launch --job <job_name> instead for new projects.Options
Name of the job to execute
YAML or JSON file with run configuration. Can be specified multiple times
JSON string of tags to use for this job runExample:
'{"team": "data", "priority": "high"}'Specify op subselection to executeExamples:
some_op- Execute only this op*some_op- Execute this op and all ancestors*some_op+++- Execute this op, ancestors, and descendants within 3 levels*some_op,other_op+- Multiple selections
Example
dagster job launch
Launch a job using the configured run launcher.Options
Name of the job to launch
YAML or JSON file with run configuration
JSON string of run config (cannot be used with -c/—config)
JSON string of tags for the run
Custom ID for the launched run
Op subselection to execute
Example
dagster job scaffold_config
Generate a configuration scaffold for a job.Options
Only include required configuration fields
Example
Output
dagster job backfill
Backfill a partitioned job.Options
Comma-separated list of partition names to backfill
Select all partitions to backfill
Start partition for the backfill range
End partition for the backfill range
JSON string of tags for the backfill runs
Skip confirmation prompt
Example
dagster asset
Commands for working with Dagster assets.dagster asset materialize
Execute a run to materialize a selection of assets.Superseded: Use
dg launch --assets <selection> instead.Options
Comma-separated asset selection to targetExamples:
my_asset- Single assetmy_asset*- Asset and all downstream dependencies*my_asset- Asset and all upstream dependenciestag:team=data- All assets with tag
Asset partition to target
Asset partition range in format
<start>...<end>. Requires all assets to have BackfillPolicy.single_run() policyExample: 2025-01-01...2025-01-05YAML or JSON file with run configuration
JSON string of run config
Example
dagster asset list
List assets in a repository.Options
Asset selection to filter the list
Example
Output
dagster asset wipe
Eliminate asset key indexes from event logs.Warning: This operation cannot be undone. Use with caution.
Options
Eliminate all asset key indexes
Skip confirmation prompt
Example
dagster asset wipe-partitions-status-cache
Clear the asset partitions status cache.Options
Wipe partitions status cache of all asset keys
Skip confirmation prompt
Example
dagster run
Commands for working with Dagster job runs.dagster run list
List runs in the current Dagster instance.Options
Limit the number of runs to display
Example
Output
dagster run delete
Delete a run by ID and its associated event logs.Warning: This operation cannot be undone.
Options
Skip confirmation prompt
Example
dagster run wipe
Eliminate all run history and event logs.Warning: This operation cannot be undone and will delete ALL runs.
Options
Skip confirmation prompt
Example
dagster run migrate-repository
Migrate run history for a job from a historic repository to its current repository.Options
Source repository in format
<repository_name>@<location_name>Name of the job to migrate
Example
dagster schedule
Commands for working with Dagster schedules.dagster schedule list
List all schedules in a repository.Options
Filter for running schedules only
Filter for stopped schedules only
Display only schedule names (no details)
Example
Output
dagster schedule start
Start an existing schedule.Options
Start all schedules in the repository
Example
dagster schedule stop
Stop a running schedule.Example
dagster schedule restart
Restart a running schedule.Options
Restart all currently running schedules
Example
dagster schedule preview
Preview changes that will be performed bydagster schedule up.
dagster schedule logs
Get logs for a schedule.dagster schedule wipe
Delete all schedule history and turn off all schedules.Warning: Cannot be undone.
dagster schedule debug
Show debug information about the scheduler.dagster instance
Commands for working with the current Dagster instance.dagster instance info
Display information about the current instance.Output
dagster instance migrate
Automatically migrate an out-of-date instance.Options
Run an optional bigint migration for ID columns
Example
dagster instance reindex
Rebuild indexes over historical runs for improved performance.dagster instance concurrency
Commands for managing instance-wide op concurrency limits.dagster instance concurrency get
Get op concurrency limits.Get info on all instance op concurrency limits
dagster instance concurrency set
Set op concurrency limits.dagster project
Commands for bootstrapping new Dagster projects and code locations.dagster project scaffold
Create a folder structure with a single Dagster code location.Superseded: Use
create-dagster project instead.Options
Name of the new Dagster project
Exclude file patterns from the project template. Can be specified multiple timesValid patterns:
readme.md, setup, tests (case-insensitive)Skip checking for PyPI package name conflicts
Example
dagster project from-example
Download an official Dagster example to the current directory.Options
Name for the new project directory
Name of the example to download
Version of the example to download (defaults to installed Dagster version)
Example
dagster project list-examples
List available official Dagster examples.Output
Troubleshooting
Command Not Found
If you get a “command not found” error:-
Verify Dagster is installed:
-
Check your PATH includes the Python scripts directory:
-
Try running with the Python module syntax:
Configuration Issues
Check DAGSTER_HOME:Workspace Loading Errors
If you encounter workspace loading errors:- Verify your workspace.yaml is valid
- Check that Python modules are importable:
- Ensure your working directory is correct when using relative paths
Permission Errors
If you get permission errors with the instance:-
Check DAGSTER_HOME permissions:
-
Ensure the dagster.yaml file is readable:
Environment Variables
Directory containing the dagster.yaml instance configuration file
Environment variable prefix for CLI options
Default port for gRPC servers
Default host for gRPC servers
Related
- dagster-daemon CLI - Daemon process management
- Instance Configuration - Configure your Dagster instance
- Workspace Configuration - Set up workspace.yaml
