Mab.PipelineFramework.CLI 1.0.0

dotnet tool install --global Mab.PipelineFramework.CLI --version 1.0.0
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local Mab.PipelineFramework.CLI --version 1.0.0
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Mab.PipelineFramework.CLI&version=1.0.0
                    
nuke :add-package Mab.PipelineFramework.CLI --version 1.0.0
                    

PipelineFramework.CLI

Command-line tool for scaffolding PipelineFramework modules and middleware. Quickly generate boilerplate code with best practices built-in.

Installation

Install as a global .NET tool:

dotnet tool install --global PipelineFramework.CLI

Or as a local tool:

dotnet new tool-manifest
dotnet tool install PipelineFramework.CLI

Quick Start

Generate a Pipeline Events Class

pipeline events OrderPipeline

Generates:

[GeneratePipeline]
public partial class OrderPipelineEvents : PipelineEvents
{
    [PipelineEvent(Order = 1)]
    public PipelineContextAsync<OrderContext>? OnOrderReceived { get; set; }
}

Generate a Module

pipeline module ValidationModule --events OrderPipelineEvents

Generates:

public class ValidationModule : PipelineModule<OrderPipelineEvents>
{
    private readonly ILogger<ValidationModule> _logger;

    public ValidationModule(ILogger<ValidationModule> logger)
    {
        _logger = logger;
    }

    public override void Initialize(OrderPipelineEvents events,
        IReadOnlyDictionary<string, string>? parameters)
    {
        events.OnOrderReceived += async (context) =>
        {
            // Module implementation here
            await Task.CompletedTask;
        };
    }
}

Generate Middleware

pipeline middleware RetryMiddleware

Generates production-ready middleware template with retry logic, exponential backoff, and configuration support.

Commands

events

Generate a pipeline events class:

pipeline events <ClassName> [options]

Options:

  • --output, -o <path> - Output directory (default: current directory)
  • --source-generator - Include [GeneratePipeline] attribute for 27.4x performance
  • --events <names> - Comma-separated event names

Examples:

# Basic events class
pipeline events OrderPipelineEvents

# With custom events
pipeline events OrderPipelineEvents --events ValidateOrder,ProcessPayment,ShipOrder

# With source generator enabled
pipeline events OrderPipelineEvents --source-generator

module

Generate a pipeline module:

pipeline module <ModuleName> [options]

Options:

  • --events, -e <EventsClass> - Pipeline events class name (required)
  • --output, -o <path> - Output directory (default: current directory)
  • --tenant <tier> - Generate multi-tenant module (Free, Premium, Enterprise)
  • --di - Include dependency injection examples

Examples:

# Basic module
pipeline module ValidationModule --events OrderPipelineEvents

# Multi-tenant module for Premium tier
pipeline module PremiumFeaturesModule --events InvoiceEvents --tenant Premium

# Module with DI examples
pipeline module PaymentModule --events OrderPipelineEvents --di

middleware

Generate middleware template:

pipeline middleware <MiddlewareName> [options]

Options:

  • --output, -o <path> - Output directory (default: current directory)
  • --template <type> - Template type: logging, retry, timeout, validation, exception, circuitbreaker
  • --options - Include options class for configuration

Examples:

# Custom middleware
pipeline middleware AuditMiddleware

# Retry middleware with configuration
pipeline middleware RetryMiddleware --template retry --options

# Logging middleware
pipeline middleware LoggingMiddleware --template logging

Templates

The CLI includes templates for common patterns:

Middleware Templates

  • Logging - Request/response logging with correlation IDs
  • Retry - Exponential backoff with jitter
  • Timeout - Cancellation token timeout handling
  • Validation - Context validation with error accumulation
  • Exception - Global exception handling and recovery
  • CircuitBreaker - Fault tolerance with state machine

Module Templates

  • Basic - Simple module with single event handler
  • Multi-Event - Module handling multiple events
  • Multi-Tenant - Tier-specific module (Free/Premium/Enterprise)
  • Dependency Injection - Module with service dependencies

Features

  • ✅ Production-ready code templates
  • 🏗️ Best practices built-in
  • 🎯 Type-safe generated code
  • 📦 Dependency injection support
  • 🔄 Multi-tenant patterns
  • ⚡ Source generator integration
  • 📝 XML documentation included

Requirements

  • .NET 8.0 SDK or higher

Documentation

Updating

Update to the latest version:

dotnet tool update --global PipelineFramework.CLI

Uninstalling

dotnet tool uninstall --global PipelineFramework.CLI

License

MIT License - see LICENSE for details

Support

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
1.0.0 265 11/10/2025

v1.0.0 - Initial stable release
     - Scaffold pipeline events classes
     - Generate pipeline modules with DI support
     - Create middleware templates
     - Multi-tenant module scaffolding
     - Best practices and code templates
     - Interactive CLI with System.CommandLine