In this tutorial we are going to learn:
- How to create a cli tool?
- How to create a nuget package?
- How to install it in our machine.
CLI tools are very useful, they are very easy to use. We are already using it in our every day.
dotnet new console -o CliToolDemo
It is the example of dotnet cli tool, simple way to create a .net console application. You can also create your own cli tools. We are going to use a package created by Microsoft named System.CommandLine
, which is a pre-released version as of I am writing this blog post. It is a pre-released version for so long, I wonder what are the plans about this package. You can also use a library named Cocona to create cli tools, which is pretty simple and widely popular. But I am going to stick with System.CommandLine
. You should definitely checkout the cocona.