Modulight.Modules.CommandLine 0.0.7

.NET 5.0
dotnet add package Modulight.Modules.CommandLine --version 0.0.7
NuGet\Install-Package Modulight.Modules.CommandLine -Version 0.0.7
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Modulight.Modules.CommandLine" Version="0.0.7" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Modulight.Modules.CommandLine --version 0.0.7
#r "nuget: Modulight.Modules.CommandLine, 0.0.7"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Modulight.Modules.CommandLine as a Cake Addin
#addin nuget:?package=Modulight.Modules.CommandLine&version=0.0.7

// Install Modulight.Modules.CommandLine as a Cake Tool
#tool nuget:?package=Modulight.Modules.CommandLine&version=0.0.7


class Program
    public static async Task Main(string[] args) => await CreateHostBuilder(args).RunConsoleAsyncWithModules();

    public static IHostBuilder CreateHostBuilder(string[] args) =>
            .ConfigureServices((hostContext, services) =>
                services.AddModules(builder =>

public class LogCommand : ModuleCommand<AModule>
    public LogCommand(AModule module) : base(module)

    // Order: 0
    [CommandParameter(0, Description = "Value whose logarithm is to be found.")]
    public double Value { get; init; }

    // Name: --base
    // Short name: -b
    [CommandOption("base", 'b', Description = "Logarithm base.")]
    public double Base { get; init; } = 10;

    protected override ValueTask ExecuteAsync(IConsole console, CancellationToken cancellationToken = default)
        var result = Math.Log(Value, Base);
        console.Output.WriteLine($"From Module {Module.Manifest.DisplayName}.");

        return default;

public class AModule : CommandLineModule
    public AModule(IModuleHost host) : base(host)

A Sample startup.

Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.0.7 314 5/31/2021
0.0.7-preview.8 232 5/30/2021
0.0.1 344 5/30/2021