Skip to content

Refactor command handling #152

@andreychh

Description

@andreychh

The current CLI implementation in Application.java is responsible for both parsing command-line arguments and executing commands, without separating these concerns.

I propose refactoring the CLI to use a command pattern:

  • Add a CLICommand interface and implement separate commands for --help, --version, and main execution logic.
  • Introduce a dispatcher (e.g. CLICommands class) to select and execute the appropriate command based on input arguments.
  • Improve error handling by adding a custom CLIException for CLI-specific errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions