stage list
List stages in the project.
Synopsis
usage: dvc stage list [-h] [-q | -v]
[-R] [--all] [--fail] [--name-only]
[targets ...]
positional arguments:
targets Limit command scope to these dvc.yaml files,
directories (with -R), or stage names.
'./dvc.yaml' by default.
See
targets
for more details.
Description
Prints a list of stages including their names and a one-line description (which
can be omitted using --name-only
). This command is useful for discovering or
reviewing what stages are present in the project without having to examine
dvc.yaml
files manually.
Without any targets
, dvc stage list
lists the stages from ./dvc.yaml
(in
the current working directory) by default.
The stage description is read from the desc
field in dvc.yaml
(truncated to
80 characters) if it exists. Otherwise, DVC generates one with the stage's most
important characteristics (dependencies, outputs, or metrics).
Options
-
targets
(optional command argument) - location of the stages to list (./dvc.yaml
by default). Examples:dvc stage list linear/dvc.yaml
: Advc.yaml
filedvc stage list -R pipelines/
: Directory to explore recursively for stagesdvc stage list train-model
: Specific stage(s) from./dvc.yaml
dvc stage list modeling/dvc.yaml:prepare
: Stage(s) from a specificdvc.yaml
filedvc stage list train-model@1
: Foreach stage(s) from./dvc.yaml
-
--name-only
- only lists stage names. Useful for scripting purposes (DVC uses it for shell tab completion). -
-R
,--recursive
- determines the files to list by searching each target directory and its subdirectories fordvc.yaml
files to inspect. If there are no directories among thetargets
, this option has no effect. -
--all
- lists all stages from alldvc.yaml
files in the repo (regardless of any giventargets
). -
--fail
- fails immediately if any targetdvc.yaml
file is invalid. By default, those errors are skipped. Only has an effect with-R
or--all
. -
-h
,--help
- prints the usage/help message, and exit. -
-q
,--quiet
- do not write anything to standard output. Exit with 0 if no problems arise, otherwise 1. -
-v
,--verbose
- displays detailed tracing information.
Examples:
The default behavior is to list stages from ./dvc.yaml
:
$ dvc stage list
prepare Outputs data/prepared
featurize Outputs data/features
train Outputs model.pkl
evaluate Reports scores.json, prc.json, roc.json
In this case, all of the descriptions were generated by DVC.