DEV Community

Dev Power
Dev Power

Posted on

Developing and installing your own CLI with dotnet tool and CliFx NuGet package

I wrote a blog post on developing and installing your own CLI with dotnet tool and CliFx NuGet package. You can find it here:

https://devpower.co.uk/dotnet/csharp/develop-a-cli-with-csharp/

If you're not interested in the whole thing, here is the TL;DR version:

  • dotnet tool is a mechanism to install/update/distribute console applications via NuGet packages
  • CliFx is an awesome NuGet package that allows you to convert a console application into a full-blown CLI with commands, subcommands, arguments and auto-generated usage message.

You can check out the references to find more about these:

Top comments (2)

Collapse
 
kaylumah profile image
Max Hamulyák

Seems like CliFx makes making these tools a breeze. Personally I have used System.Commandline.Hosting for this in the past, but unfortunatly that one is still in beta

Collapse
 
devpower profile image
Dev Power

Thanks for the comment. I remember using System.CommandLine.DragonFruit about 3 years ago. I'm surprised to see that one is still in alpha. Fortunately we have other open-source alternatives to those libraries.