CsConsoleFormat icon indicating copy to clipboard operation
CsConsoleFormat copied to clipboard

Integrate with popular NuGet packages for parsing command line

Open Athari opened this issue 7 years ago • 4 comments

Integrate with popular command-line parsers to allow:

  1. Zero-effort improvement to formatting of help texts. Should match the original tool's formatting closely, but improve upon it.

  2. Easy customization options like colors, offsets, headers, padding etc.

  3. Deep customization by providing source data in a ready-to-use form if the original tool doesn't. Code for generating documents from the points above should serve as a sample in this case.

Likely candidates:

Evaluate command line packages:

  • https://www.nuget.org/packages?q=command+line
  • http://nugetmusthaves.com/Package?q=command+line
  • https://github.com/quozd/awesome-dotnet#cli

Athari avatar Mar 08 '18 02:03 Athari

Check out System.CommandLine from the corefxlab. There's a chance it might become the built-in way to do this for .NET.

drewnoakes avatar Mar 08 '18 11:03 drewnoakes

@drewnoakes Is it available as a NuGet package? I can't find it. It has some limitations and questionable implementation in a few places, but I like its API. If it isn't available on NuGet though, I can't support it in a sensible way. It's also been in CoreFXLabs for 3 years already, which isn't promising.

[Edit] Found the package on MyGet. Better than nothing, but it certainly complicates things. Microsoft also stole System.CommandLine NuGet identifier, but they aren't using it.

Athari avatar Mar 08 '18 22:03 Athari

I'm not associated with the project and know as much as you. Only thought you might like to look at it as well as those in your list.

drewnoakes avatar Mar 09 '18 14:03 drewnoakes

One more nice command line parsing package for .Net Standard: https://github.com/natemcmaster/CommandLineUtils

fedarovich avatar Apr 04 '18 11:04 fedarovich