diff --git a/src/dotnet_mytool/Program.cs b/src/dotnet_mytool/Program.cs new file mode 100644 index 0000000..c0764b5 --- /dev/null +++ b/src/dotnet_mytool/Program.cs @@ -0,0 +1,23 @@ +using System; +using System.CommandLine; + +namespace DotNetMyTool +{ + class Program + { + static int Main(string[] args) + { + var rootCommand = new RootCommand(); + + var setEnvCommand = new Command("set-env", "Set an environment variable") + { + new Argument("variable", "The environment variable in the format VAR_NAME=value"), + new Option("--target", () => "User", "The target scope: User or Machine") + }; + + rootCommand.AddCommand(setEnvCommand); + + return rootCommand.InvokeAsync(args).Result; + } + } +}