The symfony console component is a great library for brewing your own CLI applications to help you out with development. I'm working on one right now that helps me quickly write well-formatted and tested data transfer objects. It's called DTOx and you can check it out here!
If you have looked at the console documentation, it is not immediately apparent how you might pass an arbitrarily long argument list to your command. Why would you want to do that? Well, I'd argue if used sparingly, it could allow for a cleaner and shorter command. Here is an example that may be familiar to those who know MVC frameworks:
create model User string:name int:age
int:age are arguments, but we would not want to define them for this command, but want to allow for any number of arguments to be parsed. To do so, in defining our last argument, we must specify the mode constant
IS_ARRAY as in this code sample:
//... ->addArgument( 'variables', InputArgument::IS_ARRAY, 'Specify your variables!' );
That's all there is to it!