Cysharp / ConsoleAppFramework

Zero Dependency, Zero Overhead, Zero Reflection, Zero Allocation, AOT Safe CLI Framework powered by C# Source Generator.
MIT License
1.62k stars 93 forks source link

Support for dotnet add style commands #130

Closed DamianReeves closed 3 months ago

DamianReeves commented 3 months ago

Its entirely possible I am wrong, but it doesn't seem there is a path to support commands like dotnet add. Are commands like the following possible?

dotnet add --help
Description:
  .NET Add Command

Usage:
  dotnet add [<PROJECT>] [command] [options]

Arguments:
  <PROJECT>  The project file to operate on. If a file is not specified, the command will search the current directory for one. [default: /Users/username/my-cwd/]

Options:
  -?, -h, --help  Show command line help.

Commands:
  package <PACKAGE_NAME>    Add a NuGet package reference to the project.
  reference <PROJECT_PATH>  Add a project-to-project reference to the project.

Note how we have a "command" then an Argument then more commands.

neuecc commented 3 months ago

It looks unnatural in mapping to C# methods. Therefore, I don't support it.

DamianReeves commented 3 months ago

It sounds like adding this feature is off the table then.