ModularPipelines is a free, open source build & deployment project written in C# and released under MIT. It has 559 GitHub stars, 24 forks and 33 open issues, and was last pushed 7 hours ago. On this registry it ranks #80 of 84 tracked projects in Build & Deployment, with 5 head-to-head comparisons available. It gained 7 stars over the last 30 tracked days.

What is ModularPipelines?

ModularPipelines is an MIT-licensed C# framework that lets .NET developers write CI/CD pipelines as ordinary C# code rather than YAML, for teams that want to compile, debug, and run those pipelines on their own machines before pushing.

What it is

ModularPipelines is a pipeline framework written in C# for the .NET and .NET Core ecosystem. It is published as the NuGet package ModularPipelines and lives under the Developer Tools / Build & Deployment category on this registry. A pipeline is expressed as a set of classes deriving from Module, each overriding ExecuteAsync(IModuleContext context, CancellationToken cancellationToken), with dependencies declared through attributes such as [DependsOn]. Tool calls are made through the module context, for example context.Tools.DotNet.PublishAsync(new DotNetPublishOptions { ... }, cancellationToken: cancellationToken). The repository is written in C#, carries the MIT licence, and shows 550 stars, 23 forks and 33 open issues, with the most recent push on 2026-09-17.

The specific thing it replaces is the YAML pipeline. The README frames the problem directly: YAML pipelines cannot be debugged locally, offer no compile-time safety, push teams into copy-paste reuse of logic, and lock pipeline definitions to a single vendor. ModularPipelines moves the definition into compiled code, so a breakpoint can be set, variables inspected and a step run through before anything is pushed. The same modules are intended to survive a move between build systems, because the pipeline logic is C# rather than vendor-specific YAML.

Key capabilities

  • Pipelines defined as C# Module classes, with dependencies expressed through attributes such as [DependsOn].
  • Automatic parallelization: the framework reads declared module dependencies and works out which modules can run in parallel.
  • Local execution with IDE debugging, including breakpoints, variable inspection and stepping through the pipeline.
  • Compile-time safety through the .NET toolchain, so renamed modules are updated across references and bad options surface as errors in the IDE.
  • Full dependency injection in the style of ASP.NET Core, allowing services, configuration and secrets to be injected and dependencies to be mocked for testing.
  • Automatic secret obfuscation in logs, so API keys are not written into build output.
  • Strongly typed data flow between modules: modules return typed results that other modules consume, with no shared mutable state.
  • Build-system portability, described in the README as changing one line to move between GitHub Actions, Azure Pipelines and TeamCity while the modules stay the same.

Who uses it and how

  • .NET teams already using GitHub Actions, Azure Pipelines or TeamCity that want to keep their existing build systems but move pipeline logic out of vendor-specific YAML.
  • Developers who need to reproduce a failing CI step locally: the README positions "set a breakpoint, step through your pipeline, fix it before you push" as the primary workflow.
  • Teams that reuse build logic across many repositories and currently duplicate YAML, replacing that duplication with referenced C# modules.
  • Projects with injected secrets and configuration that follow the ASP.NET Core dependency injection pattern, and that want secrets obfuscated in logs by default.
  • Pipelines whose steps have real ordering constraints, where declared dependencies plus automatic parallelization replace manually arranged parallel jobs.

Getting started

The README names the NuGet package ModularPipelines as the installation route, and the project documentation is hosted at https://thomhurst.github.io/ModularPipelines/. No Docker image, compose file or hosted service is described in the provided material.

How it compares

Against YAML-based CI such as GitHub Actions, Azure Pipelines and TeamCity, ModularPipelines keeps the same build systems but moves the pipeline definition into compiled C#, on an MIT licence with no listed cost model attached to the framework itself. The trade is that pipeline logic is no longer portable to teams without a .NET toolchain, and the vendor YAML it replaces is exactly what those vendors execute natively. Data ownership stays with the user, since the pipeline runs wherever the .NET project runs.

When to use it — and when not to

Use it when the team already works in C# and the pain is the YAML feedback loop: no local debug, no compile-time checks, duplicated logic across pipelines. Do not choose it for polyglot organisations where the CI definition must stay readable and editable by people outside .NET, or where the hosted CI vendor's own YAML execution is the requirement. The honest caveats here are that the supporting material is thin: the README excerpt provided does not list runtime prerequisites, a Docker image or a hosted option, no release is named, and the project carries 33 open issues against 550 stars, so a self-hoster supplies the execution environment and evaluates the documentation depth directly.

project readme (upstream, from github) — read inline

ModularPipelines

Write CI/CD pipelines in C#. Debug them locally. Ship with confidence.

nuget

Nuget GitHub Workflow Status (with event) GitHub last commit (branch) Codacy Badge CodeFactor License Codacy Badge codecov

The Problem with YAML Pipelines

You know the drill. You write some YAML, push it, wait for CI to start, watch it fail on a typo, fix it, push again, wait again. Repeat until you lose the will to live.

YAML pipelines are:

  • Impossible to debug locally - "Works on my machine" but fails mysteriously in CI
  • No compile-time safety - Typos in variable names? Enjoy your 10-minute feedback loop
  • Copy-paste hell - Reusing logic means duplicating YAML and hoping you update all the copies
  • Vendor lock-in - Switching from GitHub Actions to Azure Pipelines? Rewrite everything

The Solution

ModularPipelines lets you write your CI/CD pipelines as regular C# code. That means:

Set a breakpoint. Step through your pipeline. Fix it before you push.

[DependsOn<BuildModule>]
[DependsOn<TestModule>]
public class PublishModule : Module<CommandResult>
{
    protected override async Task<CommandResult> ExecuteAsync(IModuleContext context, CancellationToken cancellationToken)
    {
        // This is real C#. Set a breakpoint. Inspect variables. Debug locally.
        return await context.Tools.DotNet.PublishAsync(new DotNetPublishOptions
        {
            ProjectSolution = "src/MyApp/MyApp.csproj",
            Configuration = "Release",
            Output = "publish/"
        }, cancellationToken: cancellationToken);
    }
}

Why Developers Choose ModularPipelines

Your IDE Actually Helps You

Intellisense, refactoring, compile-time errors. Your pipeline code gets the same treatment as your application code. Rename a module? Your IDE updates all the references. Typo in an option? Red squiggle before you even save.

Run Locally, Push Confidently

Test your entire pipeline on your machine before pushing. No more "let me push and see if it works" commits. Debug failures in your IDE instead of reading logs from a build agent.

Automatic Parallelization

Modules declare their dependencies with attributes. ModularPipelines figures out what can run in parallel and maximizes throughput. No more manually orchestrating parallel jobs.

Switch Build Systems Without Rewriting

Your pipeline logic lives in C#, not in vendor-specific YAML. Moving from GitHub Actions to Azure Pipelines to TeamCity? Change one line - your modules stay the same.

Full Dependency Injection

Inject services, configuration, and secrets the same way you do in ASP.NET Core. Mock dependencies for testing. No more environment variable gymnastics.

Secrets Stay Secret

Secrets are automatically obfuscated in logs. No more accidentally exposing API keys in build output.

Modules Share Data

Modules return strongly-typed results that other modules can consume. No shared mutable state - just clean data flow.

// BuildModule returns version info
public class BuildModule : Module<BuildInfo>
{
    protected override async Task<BuildInfo> ExecuteAsync(IModuleContext context, CancellationToken cancellationToken)
    {
        await context.Tools.DotNet.BuildAsync(
            new DotNetBuildOptions { ProjectSolution = "MyApp.csproj" },
            cancellationToken: cancellationToken);
        return new BuildInfo { Version = "1.0.0", OutputPath = "bin/Release" };
    }
}

// PublishModule retrieves and uses it
[DependsOn<BuildModule>]
public class PublishModule : Module
{
    protected override async Task ExecuteAsync(IModuleContext context, CancellationToken cancellationToken)
    {
        var buildResult = await context.GetModule<BuildModule>();
        var outputPath = buildResult.Value.OutputPath; // Throws with module context if unavailable
        // Publish using the build output...
    }
}

Catch Mistakes at Compile Time

Built-in Roslyn analyzers catch common mistakes before you even run:

  • Missing [DependsOn] when calling GetModule()
  • Circular dependencies between modules
  • Forgetting to await module results
  • Using Console.Write instead of the logging system

Full Documentation

Quick Start

dotnet new install ModularPipelines.Templates
dotnet new modularpipeline -n MyPipeline \
  --solution ../MySolution.slnx \
  --publish-project ../src/MyApp/MyApp.csproj
cd MyPipeline
dotnet run

The generated project contains separate restore, build, test, and publish modules with explicit dependencies and configurable paths. See the template source for a complete copy-ready example.

Adding pipeline modules to an existing project instead? Install the core framework and the .NET CLI integration used by the examples above:

dotnet add package ModularPipelines
dotnet add package ModularPipelines.DotNet

Then configure and execute the pipeline from Program.cs:

using ModularPipelines;
using ModularPipelines.Extensions;

var builder = Pipeline.CreateBuilder(args);
await builder.RunAsync();

Console Progress

See exactly what's happening as your pipeline runs:

image

Results

Get a clear summary when your pipeline completes:

image

Integrations

ModularPipelines has strongly-typed wrappers for the tools you already use:

Package Description Version
ModularPipelines Write your pipelines in C#! nuget
ModularPipelines.AmazonWebServices Helpers for interacting with Amazon Web Services. nuget
ModularPipelines.Ansible Helpers for interacting with Ansible configuration management CLI. nuget
ModularPipelines.ArgoCd Helpers for interacting with ArgoCD GitOps continuous delivery CLI. nuget
ModularPipelines.Azure Helpers for interacting with Azure. nuget
ModularPipelines.Azure.Pipelines Helpers for interacting with Azure Pipeline agents. nuget
ModularPipelines.Chocolatey Helpers for interacting with the Chocolatey CLI. nuget
ModularPipelines.Cmd Helpers for interacting with the Windows cmd process. nuget
ModularPipelines.Cosign Helpers for interacting with Cosign CLI for container signing and verification. nuget
ModularPipelines.Docker Helpers for interacting with the Docker CLI. nuget
ModularPipelines.DotNet Helpers for interacting with dotnet CLI. nuget
ModularPipelines.Eksctl Helpers for interacting with eksctl Amazon EKS cluster management CLI. nuget
ModularPipelines.Email Helpers for sending emails. nuget
ModularPipelines.Ftp Helpers for downloading and uploading via FTP. nuget
ModularPipelines.Yarn Helpers for interacting with Yarn CLI. nuget
ModularPipelines.Node Helpers for interacting with node / npm CLI. nuget
ModularPipelines.OptionsGenerator Generates strongly typed ModularPipelines integrations from CLI metadata. nuget
ModularPipelines.OpenTelemetry OpenTelemetry tracing, metrics, and OTLP export for Modular Pipelines. nuget
ModularPipelines.Git Helpers for interacting with git. nuget
ModularPipelines.GitHub Helpers for interacting with GitHub Actions build agents. nuget
ModularPipelines.Google Helpers for interacting with the Google gcloud CLI. nuget
ModularPipelines.Hadolint Helpers for interacting with Hadolint Dockerfile linter CLI. nuget
ModularPipelines.Helm Helpers for interacting with Helm CLI. nuget
ModularPipelines.Java Helpers for interacting with Java build tools (Maven, Gradle). nuget
ModularPipelines.Jq Helpers for interacting with jq JSON processor CLI. nuget
ModularPipelines.Kubernetes Helpers for interacting with kubectl CLI. nuget
ModularPipelines.Liquibase Helpers for interacting with Liquibase database change management CLI. nuget
ModularPipelines.NerdbankGitVersioning Helpers for interacting with the Nerdbank.GitVersioning nbgv CLI. nuget
ModularPipelines.MicrosoftTeams Helpers for sending Microsoft Teams cards. nuget
ModularPipelines.Shellcheck Helpers for interacting with ShellCheck shell script static analysis CLI. nuget
ModularPipelines.Slack Helpers for sending Slack cards. nuget
ModularPipelines.Snyk Helpers for interacting with Snyk security CLI. nuget
ModularPipelines.SonarScanner Helpers for interacting with SonarScanner CLI for SonarQube and SonarCloud. nuget
ModularPipelines.TeamCity Helpers for interacting with TeamCity build agents. nuget
ModularPipelines.Templates Templates for creating realistic ModularPipelines build, test, and publish pipelines. nuget
ModularPipelines.Testing Supported test harness for isolated ModularPipelines module tests. nuget
ModularPipelines.Terraform Helpers for interacting with Terraform CLI. nuget
ModularPipelines.Trivy Helpers for interacting with Trivy security scanner CLI. nuget
ModularPipelines.WinGet Helpers for interacting with the Windows Package Manager. nuget
ModularPipelines.Distributed.Redis Redis-based distributed coordinator for ModularPipelines. Enables multi-process and multi-machine pipeline execution using Redis for coordination. nuget

How Does This Compare to Cake / Nuke?

ModularPipelines Cake Nuke
Language Real C# C# DSL (scripted) Real C#
Parallelization Automatic based on dependencies Manual Manual
Architecture Separate module classes (SRP) Single build script Single build class
Dependency Injection Full Microsoft.Extensions.DI Limited Built-in but different
Setup dotnet run Requires bootstrapper Requires global tool
Module Communication Strongly-typed return values Shared state Parameters

ModularPipelines takes a different approach: each unit of work is a self-contained module class. This keeps code organized, makes merge conflicts rare, and lets you test modules in isolation.

Features at a Glance

  • Parallel execution - Automatic based on declared dependencies
  • Module data sharing - Strongly-typed results flow between modules
  • Roslyn analyzers - Catch mistakes at compile time, not runtime
  • Conditional dependencies - DependsOnIf() for dynamic dependency graphs
  • Dependency management - Circular dependency detection built-in
  • Strong typing - Pass data between modules with compile-time safety
  • Debug locally - Set breakpoints, inspect variables, fix issues before pushing
  • Build agent agnostic - Same code runs on GitHub, Azure, TeamCity, or your laptop
  • Secret obfuscation - Automatic masking in logs
  • Hooks - Run code before/after any module
  • Skip conditions - Dynamically skip modules based on custom logic
  • Resilience shields - Configurable retries and advanced Kevlar integration
  • Requirements validation - Check prerequisites before running
  • Progress reporting - Real-time console output with parallel execution visualization
  • Source controlled - Your pipeline is code, version it like code

Breaking Changes

While I aim to maintain stability, minor versions may include breaking changes. These will always be documented in release notes.

Frequently asked questions

Is ModularPipelines free to use?

ModularPipelines is open source under the MIT licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does ModularPipelines do?

Write your pipelines in C# !

What is ModularPipelines written in?

ModularPipelines is primarily written in C#. Its source is publicly available at https://github.com/thomhurst/ModularPipelines, and it has 559 GitHub stars.