I was wondering how can I get to develop a toolset that I can then run using package manager console commands to modify my project (analyze or generate code).
Someting like Microsoft.EntityFrameworkCore.Tools that adds add/remove-migration etc. commands.
We can see all commands to interact with NuGet in Package Manger Console from this link. Unfortunately, there is no command to create a nuget package. ( https://learn.microsoft.com/en-us/nuget/reference/powershell-reference )
You can try this command “dotnet pack” in PMC, it effectively created the nuget package in my test.