ModularPipelines is a free, open source build & deployment project written in C# and released under MIT. It has 550 GitHub stars, 23 forks and 33 open issues, and was last pushed 13 hours ago. On this registry it ranks #78 of 81 tracked projects in Build & Deployment, with 5 head-to-head comparisons available.

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](https://www.nug

readme truncated — read the full docs on github

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 550 GitHub stars.