A lightweight workflow engine for CI/CD pipelines, data processing, and DevOps automation — define tasks in YAML, run anywhere
Project description
YAML Workflow
A lightweight workflow engine for CI/CD pipelines, data processing, and DevOps automation. Define reproducible, version-controlled workflows in YAML — run them locally, in CI, or on any machine with Python installed.
Why yaml-workflow?
Most workflow tools require servers, databases, and complex infrastructure. yaml-workflow takes a GitOps approach — workflows are plain YAML files, version-controlled alongside your code:
| yaml-workflow | Airflow / Prefect / Dagster | |
|---|---|---|
| Setup | pip install yaml-workflow |
Server, database, scheduler, workers |
| Configuration | Plain YAML files | Python DAGs + infrastructure config |
| Dependencies | 2 (PyYAML, Jinja2) | 50+ packages, Docker, PostgreSQL |
| Use case | Local automation, scripts, CI/CD, data pipelines | Enterprise orchestration at scale |
| Learning curve | Minutes | Hours to days |
| State | File-based, resumable | Database-backed |
Choose yaml-workflow when you need:
- Simple task automation without infrastructure overhead
- Reproducible pipelines defined in version-controlled YAML
- Batch processing with parallel execution
- State persistence and workflow resume after failures
- A lightweight alternative to shell scripts with better error handling
- GitOps-friendly pipelines that live in your repo alongside the code
- A single tool that runs the same pipeline locally and in CI
Features
- YAML-driven workflow definition with Jinja2 templating
- Multiple task types: shell, Python, file, template, HTTP, batch
- Workflow composition via
imports— reuse steps across workflows - Plugin system via entry points —
pip install yaml-workflow-myplugin - Watch mode —
--watchto re-run on file changes - Dry-run mode to preview without executing
- Workflow visualization (ASCII branching DAG and Mermaid)
- Parallel execution with configurable worker pools
- State persistence and resume capability
- Retry mechanisms with configurable strategies
- Namespaced variables (
args,env,steps,batch) - Flow control with custom step sequences and conditions
- Extensible task system via
@register_taskdecorator - Parallel step execution via
depends_on— run independent steps concurrently - Secrets validation — fail fast if required environment variables are missing
- Structured output (
--format json) for CI integration and scripting - MCP server — expose workflows as AI agent tools (
pip install yaml-workflow[mcp]) - Web dashboard — monitor runs and trigger workflows (
pip install yaml-workflow[serve]) - GitHub Action — run workflows in CI with
uses: orieg/yaml-workflow-action
Use Cases
- CI/CD pipelines — multi-step build, test, deploy workflows in YAML
- Data processing — batch ETL pipelines with retry and resume on failure
- DevOps automation — infrastructure tasks with secrets management and notifications
- AI/LLM pipelines — orchestrate API calls with auth, retry, and batch processing
- Local automation — replace shell scripts with reproducible, parameterized workflows
Quick Start
# Install (isolated CLI — recommended)
pipx install yaml-workflow
# Or install with pip
pip install yaml-workflow
# Initialize example workflows
yaml-workflow init
# Run a workflow with parameters
yaml-workflow run workflows/hello_world.yaml name=Alice
Example workflow (hello_world.yaml):
name: Hello World
description: A simple greeting workflow
params:
name:
type: string
default: World
steps:
- name: create_greeting
task: template
inputs:
template: "Hello, {{ args.name }}!"
output_file: greeting.txt
- name: show_greeting
task: shell
inputs:
command: cat greeting.txt
Visualize workflows
yaml-workflow visualize workflows/data_pipeline.yaml
Workflow: Data Pipeline
┌─────────────────┐
│ detect_format │
│ python_code │
└─────────────────┘
│
▼
┌────────────────┐ ┌────────────────┐ ┌────────────────┐ ┌────────────────┐
│ process_json │ │ process_csv │ │ process_xml │ │ handle_unknown │
│ shell │ │ shell │ │ shell │ │ shell │
└────────────────┘ └────────────────┘ └────────────────┘ └────────────────┘
│
▼
┌─────────────────┐
│ generate_report │
│ python_code │
└─────────────────┘
Adjacent conditional steps are automatically grouped as branches. Use --format mermaid to export for docs or GitHub rendering.
Dry-run mode
Preview what a workflow would do without executing anything:
yaml-workflow run workflows/hello_world.yaml name=Alice --dry-run
[DRY-RUN] Workflow: Hello World
[DRY-RUN] Steps: 2 to execute
[DRY-RUN] Step 'create_greeting' — task: template — WOULD EXECUTE
template: Hello, Alice!
output_file: greeting.txt
[DRY-RUN] Step 'show_greeting' — task: shell — WOULD EXECUTE
command: cat greeting.txt
[DRY-RUN] Complete. 2 step(s) would execute, 0 would be skipped.
[DRY-RUN] No files were written. No tasks were executed.
Workflow composition
Reuse steps across workflows with imports:
# main.yaml
imports:
- ./shared/logging_steps.yaml
- ./shared/common_params.yaml
steps:
- name: my_step
task: shell
inputs:
command: echo "runs after imported steps"
Imported steps are prepended. Imported params provide defaults that the main workflow can override. Supports transitive imports with circular detection.
Parallel Steps
Run independent steps concurrently with depends_on:
steps:
- name: fetch_api
task: http.request
inputs: {url: "https://api.example.com/data"}
- name: fetch_db
task: python_code
inputs:
code: "result = query_database()"
- name: merge
task: python_code
depends_on: [fetch_api, fetch_db]
inputs:
code: |
api_data = steps["fetch_api"]["result"]
db_data = steps["fetch_db"]["result"]
result = {"merged": True}
Watch mode
Automatically re-run on file changes during development:
yaml-workflow run workflows/hello_world.yaml name=Alice --watch
Monitors the workflow file and all imported files. Press Ctrl+C to stop.
GitHub Actions
Run workflows in CI with the yaml-workflow action:
- name: Run pipeline
uses: orieg/yaml-workflow@v0.8.3
id: pipeline
with:
workflow: workflows/deploy.yaml
params: |
env=production
version=1.2.0
format: json
- name: Use results
run: echo '${{ steps.pipeline.outputs.result }}'
More commands
# List available workflows
yaml-workflow list
# Validate a workflow (with JSON output for CI)
yaml-workflow validate workflows/hello_world.yaml --format json
# Resume a failed workflow
yaml-workflow run workflows/hello_world.yaml --resume
# Structured output for scripting
yaml-workflow run workflows/pipeline.yaml --format json --output results.json
Documentation
Full documentation is available at orieg.github.io/yaml-workflow.
- Getting Started - Installation and first workflow
- Task Types - Shell, Python, file, template, and batch tasks
- Workflow Structure - YAML configuration reference
- Templating - Jinja2 variable substitution
- State Management - Persistence and resume
- Task Development - Creating custom tasks
- API Reference - Full API documentation
Contributing
Contributions are welcome! See the Contributing Guide for development setup and guidelines.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file yaml_workflow-0.8.3.tar.gz.
File metadata
- Download URL: yaml_workflow-0.8.3.tar.gz
- Upload date:
- Size: 97.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dbf9f472c8f668b0913fc514de4184e16f7b52a18ad11ffc2d7617f544d39a7b
|
|
| MD5 |
d8b9f95519bc7adc67bf61c5204c2f42
|
|
| BLAKE2b-256 |
543f2862a6a6b05a6bea8d39ce45aeb1d5ae96dce30f1c71c3aa13e6de5375df
|
Provenance
The following attestation bundles were made for yaml_workflow-0.8.3.tar.gz:
Publisher:
publish.yml on orieg/yaml-workflow
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yaml_workflow-0.8.3.tar.gz -
Subject digest:
dbf9f472c8f668b0913fc514de4184e16f7b52a18ad11ffc2d7617f544d39a7b - Sigstore transparency entry: 1198137173
- Sigstore integration time:
-
Permalink:
orieg/yaml-workflow@1451b5def4357b4e2fa5c3ade0d96e40db106c26 -
Branch / Tag:
refs/tags/v0.8.3 - Owner: https://github.com/orieg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1451b5def4357b4e2fa5c3ade0d96e40db106c26 -
Trigger Event:
push
-
Statement type:
File details
Details for the file yaml_workflow-0.8.3-py3-none-any.whl.
File metadata
- Download URL: yaml_workflow-0.8.3-py3-none-any.whl
- Upload date:
- Size: 115.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
10abab38e2392aaacd44c87851d09ef16c1bed8e5eb2d68fb5a95f3ff9daf632
|
|
| MD5 |
f291358ae4f3758779efb4037b6f3c8b
|
|
| BLAKE2b-256 |
8f5f3542772959fa3494bc2f1b79f31f87bd1d0adaeaae46597b3b049a785404
|
Provenance
The following attestation bundles were made for yaml_workflow-0.8.3-py3-none-any.whl:
Publisher:
publish.yml on orieg/yaml-workflow
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yaml_workflow-0.8.3-py3-none-any.whl -
Subject digest:
10abab38e2392aaacd44c87851d09ef16c1bed8e5eb2d68fb5a95f3ff9daf632 - Sigstore transparency entry: 1198137667
- Sigstore integration time:
-
Permalink:
orieg/yaml-workflow@1451b5def4357b4e2fa5c3ade0d96e40db106c26 -
Branch / Tag:
refs/tags/v0.8.3 - Owner: https://github.com/orieg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1451b5def4357b4e2fa5c3ade0d96e40db106c26 -
Trigger Event:
push
-
Statement type: