Edit on GitHub

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:

  • --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 for dvc.yaml files to inspect. If there are no directories among the targets, this option has no effect.

  • --all - lists all stages from all dvc.yaml files in the repo (regardless of any given targets).

  • --fail - fails immediately if any target dvc.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.

Content

๐Ÿ› Found an issue? Let us know! Or fix it:

Edit on GitHub

โ“ Have a question? Join our chat, we will help you:

Discord Chat