Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a way to get a structured representation of a given .NET CLI command #46345

Open
baronfel opened this issue Jan 28, 2025 · 0 comments
Open
Labels
cli-ux Issues and PRs that deal with the UX of the CLI (exit codes, log output, verbs/options, and so on)

Comments

@baronfel
Copy link
Member

Is your feature request related to a problem? Please describe.

It can be useful for tools that are doing feature-probing of the .NET CLI to provide some structured representation of the CLI Command being invoked.

Describe the solution you'd like

This structured representation should provide access to

  • the names and aliases of the command (if any)
  • the options on the command
  • the arguments on the command
  • the subcommands on this command (recursively)

In this output, hidden items should be shown.

Additional context

The least grammar impacting way to do this would be a Directive, a la dotnet run [structure format=json], but there's space for some kind of global flag that could be used as well (dotnet run --dump-grammar?).

This was first requested in dotnet/aspire#7112 (comment).

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-CLI untriaged Request triage from a team member labels Jan 28, 2025
@baronfel baronfel added cli-ux Issues and PRs that deal with the UX of the CLI (exit codes, log output, verbs/options, and so on) and removed untriaged Request triage from a team member Area-CLI labels Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli-ux Issues and PRs that deal with the UX of the CLI (exit codes, log output, verbs/options, and so on)
Projects
None yet
Development

No branches or pull requests

1 participant