Skip to content

Middleware for generating Crescendo PowerShell modules from .NET command line tools.

License

Notifications You must be signed in to change notification settings

AlonGvili/CrescendoMiddleware

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Crescendo Middleware

Middleware for generating Crescendo PowerShell modules from .NET command line tools using System.CommandLine

Usage

You will need to map your commands to PowerShell cmdlets and add the Crescendo middleware.

commandLineBuilder.AddCrescendoMiddleware(opts =>
{
    opts.AddCmdletMapping("Get-Message", rootCommand);
});

Once this is done, you can call your executable with --crescendo.

.\ConsoleApp.exe --crescendo

A crescendo JSON file will be generated. Create your module with Crescendo.

Install-Module Microsoft.PowerShell.Crescendo 
Export-CrescendoModule -ConfigurationFile ConsoleApp.crescendo.json -ModuleName ConsoleApp

You can then import that module and call the imported cmdlets.

PS> Import-Module .\ConsoleApp.psd1
PS> Get-Message -message test
 --delay = 0
--message = Test

About

Middleware for generating Crescendo PowerShell modules from .NET command line tools.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%