Description
Commands in oak-run currently live in a flat namespace. If a command is specific to only one implementation, it will leave along other implementation-specific commands without any means of distinguishing what belongs where.
I would like to add a layer of indirection to the oak-run command line interface, so to parse commands in the following fashion:
oak-run segment debug /path/to/folder oak-run mongo debug mongodb://host:12345 oak-run rdb debug jdbc:oracle:oci8:scott/tiger@myhost
In this scenario, oak-run would become a simple entry point that would delegate to implementation-specific command line utilities based on the first argument. In the previous example, segment, mongo and rdb would delegate to three different implementation specific CLI utilities. Each of these CLI utilities will understand the debug command and will collect command-line parameters as it sees fit.
If the code for a command is so generic that can be reused from different commands, it can be parameterised and reused from different implementation-specific commands.
The benefit of this approach is that we can start moving commands closer to the implementations. This approach would benefit oak-run as well, which is overloaded with many commands from many different implementations.