Skip to content

Parsing command line arguments without using reflection? #945

Open

Description

@mikechristiansenvae

Is there a way to parse command line options without using reflection? As it stands, I have to make a class for each "verb". I would like to be able to specify all of the data that CommandLineParser needs without being required to have a class to represent the verbs.

The documentation for System.CommandLine gives a good example of something that would be good for us. Ideally, I wouldn't need to switch to System.CommandLine, since I already use CommandLineParser.

Is there any way to do this?

Activity

  1. ericnewton76 commented on Dec 5, 2025

    @ericnewton76
    Member

    Thats the way it was designed.

    If you have a way to do it, even a draft PR would go a long way towards showing a way to do it like you suggest.

  2. ericnewton76 commented on Sep 26, 2026

    @ericnewton76
    Member

    I speculated this would be a great v3 addition.

    A fluent builder of sorts. Ideally not having to enumerate all possible options just to narrow down to one verb at runtime

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions