Create your own .NET CLI tool

As a ASP.NET Core developer you are familiar with .NET Command Line Interface (CLI). You must have also used CLI tools such as dotnet-ef while building ASP.NET Core web apps. In addition to using built-in CLI tools you can create your own tools that can be used with .NET CLI. To this end this article introduces you to the overall tool creation and registration process.

http://www.binaryintellect.net/articles/ecb8341c-16f7-4c6d-adee-898e3fe66b3a.aspx