CLI API

Command Reference

version

Show version information.

stagecoach version

run

Run a pipeline from a configuration file.

stagecoach run pipeline.yaml [OPTIONS]

Options:

  • --verbose, -v: Enable verbose output

  • --dry-run: Show execution plan without running

Examples:

# Run a pipeline
stagecoach run my_pipeline.yaml

# Verbose output
stagecoach run my_pipeline.yaml --verbose

# Dry run to see execution plan
stagecoach run my_pipeline.yaml --dry-run

validate

Validate a pipeline configuration file.

stagecoach validate pipeline.yaml

Examples:

# Validate configuration
stagecoach validate my_pipeline.yaml

list-stages

List all stages in a pipeline configuration.

stagecoach list-stages pipeline.yaml

Examples:

# List stages
stagecoach list-stages my_pipeline.yaml

Configuration File Format

The CLI accepts YAML configuration files with the following structure:

pipeline:
  name: my_pipeline
  description: Description of the pipeline

stages:
  - name: stage1
    type: data_loader
    source_type: csv
    source_path: data.csv
    
  - name: stage2
    type: transform
    input_key: data
    output_key: features
    
  - name: stage3
    type: model
    model_type: train
    model_class: RandomForest

dependencies:
  - [stage1, stage2]
  - [stage2, stage3]

Usage Examples

Running a Simple Pipeline

Create a file iris_pipeline.yaml:

pipeline:
  name: iris_classifier
  description: Classify iris species

stages:
  - name: load_data
    type: data_loader
    source_type: csv
    source_path: iris.csv
    
  - name: train_model
    type: model
    model_type: train
    model_class: RandomForest
    
dependencies:
  - [load_data, train_model]

Run it:

stagecoach run iris_pipeline.yaml

Validation Workflow

# First validate the configuration
stagecoach validate iris_pipeline.yaml

# Check the stages
stagecoach list-stages iris_pipeline.yaml

# Do a dry run
stagecoach run iris_pipeline.yaml --dry-run

# Actually run it
stagecoach run iris_pipeline.yaml