Skip to content

Parser to create CLI applications using Attributes on Methods to declare commands

License

Notifications You must be signed in to change notification settings

PatrickRitchie/CommandLineParse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CommandLineParse

Parser for create CLI applications using Attributes on Methods to declare commands

Usage

Define a class to use as a Command Group and define a method to use a a Command

[CommandGroup("printer")]
class Printer
{
    [Command("print")]
    void Print([CommandParameter] message)
    {
        Console.WriteLine(message);
    }
}

Use the CommandParse.Run() method to parse and run the command

var cmd = "printer print \"Hello World\"";
await CommandParser.Run(cmd);

About

Parser to create CLI applications using Attributes on Methods to declare commands

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages