More more information please visit Tutorial: Create a .NET tool using the .NET CLI.
An example of CLI tool using .NET Core.