Starter kit for neatly structured neat .NET Core Console / Command Line Apps
This is a starting point for creating neatly structured .NET Core console apps
in C#, using the Microsoft.Extensions.CommandLineUtils
package to parse the
commands.
I created this working as a student with 4DVision, who create custom software for complex processes of companies and organizations.
GreetCommand
is an example of a command, see Commands/GreetCommand.cs
.
Commands.ListCommand
RootCommand
like this:app.Command("list", c => ListCommand.Configure(c, options));
IsEnthousiastic
is an example of a global option.
CommandLineOptions
app.Option
or app.Argument
in CommandLineOptions.Parse
and store the resultoptions
at the bottom of CommandLineOptions.Parse