-
Notifications
You must be signed in to change notification settings - Fork 0
Add CLI Schema Option for System.CommandLine #3
Copy link
Copy link
Open
Labels
changelog:addedAdd a new feature (SemVer:MINOR)Add a new feature (SemVer:MINOR)scope:introspectionThe CLI Introspection librariesThe CLI Introspection librariestype:featRequest/add a new feature (this correlates with MINOR in Semantic Versioning)Request/add a new feature (this correlates with MINOR in Semantic Versioning)
Milestone
Description
Activity
Metadata
Metadata
Assignees
Labels
changelog:addedAdd a new feature (SemVer:MINOR)Add a new feature (SemVer:MINOR)scope:introspectionThe CLI Introspection librariesThe CLI Introspection librariestype:featRequest/add a new feature (this correlates with MINOR in Semantic Versioning)Request/add a new feature (this correlates with MINOR in Semantic Versioning)
Summary
Add
System.CommandLineOption for .NET CLI Schema via--cli-schema.Remarks
The .NET CLI added CLI introspection with
--cli-schemain the .NET 10 SDK.Features
Option<bool>toSystem.CommandLineapplicationsOption<bool>should be recursive, to allow to JSONify the CLI command tree for the invoked command or subcommandOption<bool>should be hidden, to not show in the help outputenumto select the versionSystem.Text.Jsonto output the JSON representationpublicmembers<TargetFrameworks>for the LibraryC#,F#, andVisual BasicExample
See: https://learn.microsoft.com/dotnet/core/whats-new/dotnet-10/sdk#cli-introspection-with---cli-schema
See also
System.CommandLinerepository: https://github.com/dotnet/command-line-apiSystem.CommandLinedocumentation: https://learn.microsoft.com/dotnet/standard/commandline/System.Text.Jsondocumentation: https://learn.microsoft.com/dotnet/standard/serialization/system-text-json/overview