YAML Workflow

io.github.orieg由 GitHub 帳號 orieg 發布v0.9.6更新於 Oct 24, 2026

Expose declarative YAML-defined workflows as MCP tools over stdio

已驗證STDIO僅桌面效率與工作流開發者工具

概覽

AI 產生的概覽

一個本機 MCP 伺服器,把以宣告式 YAML 定義的工作流程當成工具提供給助理執行,支援 shell、Python、檔案、範本、HTTP 與批次步驟。

可以做什麼
執行 YAML 定義的工作流程及其步驟,包括 shell 指令、Python 程式碼、檔案、範本、HTTP 與批次任務,支援 Jinja2 範本與參數。以試運行預覽、從持久化狀態接續失敗的工作流程,並使用重試與平行步驟。驗證與列出工作流程,並以 ASCII DAG 或 Mermaid 視覺化。透過 imports 組合工作流程,並監看檔案變更自動重跑。
適用情境
適合把自動化、CI/CD、資料處理或 DevOps 流程存成受版本控制的 YAML 檔案,並希望助理在本機觸發、預覽、驗證或檢視這些工作流程,而不需要排程器或資料庫的情境。
執行需求
以本機程序在使用者機器上透過 stdio 執行;清單列出 PyPI 套件 yaml-workflow,以 uvx 啟動,README 說明 MCP 伺服器需安裝 mcp 附加元件。需要 Python。未宣告驗證、環境變數或標頭。
安裝前請注意
工作流程會執行真實的 shell 指令、Python 程式碼與 HTTP 請求,並可寫入檔案,因此執行會改動本機,也可能存取第三方服務。試運行僅為預覽。密鑰驗證會在缺少所需環境變數時立即失敗,工作流程可能依賴環境中的憑證。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 YAML Workflow,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

YAML Workflow

[PyPI version] [Python versions] [CI] [codecov] [License: MIT]

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-workflowAirflow / Prefect / Dagster
Setuppip install yaml-workflowServer, database, scheduler, workers
ConfigurationPlain YAML filesPython DAGs + infrastructure config
Dependencies2 (PyYAML, Jinja2)50+ packages, Docker, PostgreSQL
Use caseLocal automation, scripts, CI/CD, data pipelinesEnterprise orchestration at scale
Learning curveMinutesHours to days
StateFile-based, resumableDatabase-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 — --watch to 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_task decorator
  • 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/[email protected]

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

bash
# Install (isolated CLI — recommended)pipx install yaml-workflow            # Core CLIpipx install 'yaml-workflow[all]'     # + web dashboard + MCP server
# Or with pippip install yaml-workflow
# Initialize example workflowsyaml-workflow init
# Run a workflow with parametersyaml-workflow run workflows/hello_world.yaml name=Alice

Example workflow (hello_world.yaml):

yaml
name: Hello Worlddescription: 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

bash
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:

bash
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:

yaml
# main.yamlimports:  - ./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:

yaml
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:

bash
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:

yaml
- name: Run pipeline  uses: orieg/[email protected]  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 }}'

Docker & Kubernetes

Run anywhere without installing Python:

bash
# Run a workflow in Dockerdocker run --rm -v $(pwd)/workflows:/app/workflows \  ghcr.io/orieg/yaml-workflow run /app/workflows/pipeline.yaml
# Start the web dashboarddocker run -p 8080:8080 -v $(pwd)/workflows:/app/workflows \  ghcr.io/orieg/yaml-workflow

Deploy on Kubernetes with the Helm chart:

bash
helm install my-workflows ./helm/yaml-workflow \  --set-file workflows.files.pipeline\\.yaml=workflows/pipeline.yaml

Compatible with ArgoCD (GitOps) and Argo Workflows. See the Kubernetes guide.

More commands

bash
# List available workflowsyaml-workflow list
# Validate a workflow (with JSON output for CI)yaml-workflow validate workflows/hello_world.yaml --format json
# Resume a failed workflowyaml-workflow run workflows/hello_world.yaml --resume
# Structured output for scriptingyaml-workflow run workflows/pipeline.yaml --format json --output results.json

Documentation

Full documentation is available at orieg.github.io/yaml-workflow.

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.

來源:README.md,提交 b87ac21

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.9.6最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分