command-line-api icon indicating copy to clipboard operation
command-line-api copied to clipboard

Is this project dead?

Open goldsam opened this issue 2 years ago • 18 comments
trafficstars

Is this project dead? There has only ever been beta prereleases and the last such was nearly a year and half ago. The examples don't compile against the most recent nuget.org release. I want to be excited about a project backed by the .Net Foundation, but this project seems like an idea that was never followed through on. . Is there any intent to make progress, or should I look at another option such as CommandLineParser?

goldsam avatar Nov 01 '23 14:11 goldsam

The dotnet tool of .NET SDK heavily depends on this library. I don't know what the actual reasons for the stall are but I hope the team is busy with the .NET 8 release and can resume work here after that.

KalleOlaviNiemitalo avatar Nov 01 '23 14:11 KalleOlaviNiemitalo

The examples don't compile against the most recent nuget.org release.

Which examples are those? The example in Tutorial: Get started with System.CommandLine compiles OK against System.CommandLine 2.0.0-beta4.22272.1, which is the most recent nuget.org release.

(However, the first three options under "Test the app" do not work. The first option and the third option do not work because the shell searches for the scl executable along PATH, which does not include the current directory. The second option does not work because scl tries to read scl.runtimeconfig.json from the current directory but it's in the bin/Debug/net6.0 subdirectory.)

KalleOlaviNiemitalo avatar Nov 01 '23 14:11 KalleOlaviNiemitalo

I stand corrected. I was looking at the examples on the main branch. The examples do work for the released package version.

goldsam avatar Nov 01 '23 16:11 goldsam

Is this project dead? There has only ever been beta prereleases and the last such was nearly a year and half ago. The examples don't compile against the most recent nuget.org release. I want to be excited about a project backed by the .Net Foundation, but this project seems like an idea that was never followed through on. . Is there any intent to make progress, or should I look at another option such as CommandLineParser?

The whole dotnet-suggest cli tab completion feature seems like it's gotta happen, though I'd prefer it in a low ceremony attribute based source-generated version.

jakenuts avatar Nov 03 '23 15:11 jakenuts

The productization of this repo is currently designed at dotnet/runtime repo (https://github.com/dotnet/runtime/issues/84177).

huoyaoyuan avatar Nov 07 '23 06:11 huoyaoyuan

Please post in this repo if more System.CommandLine issues are filed in https://github.com/dotnet/runtime/, so that prerelease users can subscribe to individual issues there rather than watch the whole repo.

KalleOlaviNiemitalo avatar Nov 07 '23 06:11 KalleOlaviNiemitalo

@huoyaoyuan Are you talking about Microsoft.Extensions.Configuration.CommandLine (which is a completely different library)? I searched pretty thoroughly through the runtime repo, and I'm not seeing much there related to this repo/project. Could you please elaborate on what you mean by "productization of this repo"?

goldsam avatar Nov 07 '23 17:11 goldsam

Are you talking about Microsoft.Extensions.Configuration.CommandLine (which is a completely different library)?

No. I'm even unaware of such a library. The linked issue (https://github.com/dotnet/runtime/issues/84177) is discussing API in System.CommandLine namespace.

I searched pretty thoroughly through the runtime repo, and I'm not seeing much there related to this repo/project.

There is no code there currently, but only some issues for API review, tagged in area-System.Console.

Could you please elaborate on what you mean by "productization of this repo"?

See #1882. In short, Once we release as part of the System namespace, we will consider the API locked and will work to avoid further breaking changes. Since we will live with that API, we need to take the time now to get it right.

There are already pull requests tweaking namespace and type names like #2167.

huoyaoyuan avatar Nov 08 '23 06:11 huoyaoyuan

Following myself; I'm trying to advocate to use this library but the lack of a real release is a barrier for me at my employer.

bhehe avatar Nov 17 '23 21:11 bhehe

Agreed - I would much rather have had real releases at 0.1.0, 0.2.0, etc, indicating volatile API but as actual releases.

That API then gets locked down going towards 1.0.0 (whether it stays here or becomes part of the main runtime) makes perfect sense.

But it's hard to drive adoption with "scary" beta versions, which also means you're not getting feedback from a good chunk of developer's who can't try the current version in real-world scenarios.

Zastai avatar Dec 14 '23 21:12 Zastai

Agreed with the above. The other thing that makes this difficult is the lack of communication around an ETA.

We have been dying to use this library in https://github.com/Azure/bicep for over 2 years. For this duration, this project has felt like it's "almost ready", so we built our own super basic solution, and didn't put energy into investigating alternatives (because "we'll be able to switch soon"). In retrospect, if we knew we'd be waiting for this long, we'd have just picked an alternative and moved on. It's hard to know that we won't be waiting another 2 years at this point.

anthony-c-martin avatar Dec 14 '23 21:12 anthony-c-martin

See my project here: https://github.com/dotmake-build/command-line

DotMake.CommandLine is a library which provides declarative syntax for System.CommandLine via attributes for easy, fast, strongly-typed (no reflection) usage. The library includes includes a source generator which automagically converts your classes to CLI commands and properties to CLI options or CLI arguments. Supports trimming and AOT compilation !

calacayir avatar Dec 25 '23 02:12 calacayir

Now that .NET 8 is out, can some time be given to this API? If not, I guess using Microsoft.Extensions.Configuration.CommandLine is a mostly OK option.

lloydjatkinson avatar Jan 04 '24 00:01 lloydjatkinson

I believe Microsoft.Extensions.Configuration.CommandLine works for simple CLI applications where commands/sub-commands and other concepts are either not required or are simple enough to be written in the same app. For other scenarios, either use the nightly builds (with breaking changes) or use SpectreConsole which has many more features and is stable.

mburumaxwell avatar Jan 04 '24 07:01 mburumaxwell

I believe Microsoft.Extensions.Configuration.CommandLine works for simple CLI applications where commands/sub-commands and other concepts are either not required or are simple enough to be written in the same app. For other scenarios, either use the nightly builds (with breaking changes) or use SpectreConsole which has many more features and is stable.

You are right. It's strange that System.CommandLine appears to be being neglected. Entire new projects have been created and realised in the same time span, like Aspire...

lloydjatkinson avatar Jan 04 '24 14:01 lloydjatkinson

Hoping they find time to improve System.Commandline, but other options include (in no particular order):

  • https://github.com/spectreconsole/spectre.console
  • https://github.com/mayuki/Cocona
  • https://github.com/commandlineparser/commandline

timker avatar May 19 '24 22:05 timker

Hoping they find time to improve System.Commandline, but other options include (in no particular order):

This project is actively being worked on; see https://github.com/dotnet/command-line-api/issues/2338

BenjaminMichaelis avatar May 20 '24 14:05 BenjaminMichaelis

Another advanced alternative: https://github.com/Cysharp/ConsoleAppFramework

aetos382 avatar Jun 04 '24 04:06 aetos382