List stages in the project.
usage: dvc stage list [-h] [-q | -v] [-R] [--all] [--fail] [--names-only] [targets ...] positional arguments: targets Show stages from a dvc.yaml file or a directory (with -R). 'dvc.yaml' by default.
It provides a list of stages, with a stage name and the description of the
stage. The description of the stage is read from
desc field in the
or if it does not exist, DVC generates the short description from the other
metadata it has about the stage.
Without any targets, by default, it only lists the stages from the
present in the current working directory.
DVC also uses this command to provide autocompletion in
targets (optional command argument) - stages to list from (
default). Different things can be provided as targets depending on the flags
used (more details in each option). Examples:
dvc stage list linear/dvc.yaml: Specific
dvc.yamlfile to list from
dvc stage list -R pipelines/: Directory path to explore recursively for
dvc stage list train-model: Specific stage name or a foreach group in
dvc stage list modeling/dvc.yaml:prepare: Stage or a foreach group in a specific
--recursive- looks for
dvc.yamlfiles to list from in any directories given as
targets, and in their subdirectories. If there are no directories among the targets, this option has no effect.
--all- lists all of the stages from all
dvc.yamlfiles in the repo, regardless of the targets.
--fail- fails immediately if any
dvc.yamlfiles have syntax errors. By default, those errors are skipped. This option is only in effect if
--names-only- only lists the name of the stages. It can be useful for scripting purposes. DVC uses it for providing autocompletion on
--help- prints the usage/help message, and exit.
--quiet- do not write anything to standard output. Exit with 0 if no problems arise, otherwise 1.
--verbose- displays detailed tracing information.
Listing stages from the default
./dvc.yaml file from the repo.
$ dvc stage list prepare Outputs data/prepared featurize Outputs data/features train Outputs model.pkl evaluate Reports scores.json, prc.json, roc.json