I know how to create custom CLI commands with input parameters like: bin/magento customers:syncbyid --id=69
, but I'd like to know how (if even possible) I can create a command with an option without a name like this: bin/magento customers:syncbyid 69
. This would be very useful because this specific command would only ever require 1 parameter. Typing the parameter name with each use would be wasted time.
The documentation on commands is very scarce, so if the possibility even exists, I'd have no idea about that. I've tried setting the option name to an empty string, but this throws the error "An option name cannot be empty".
$this->addOption(
'id',
null,
InputOption::VALUE_REQUIRED,
'ID'
);