I developed a tool to get all the CLI modules loaded into a local Slicer, use them as you were used to. But, when you click on apply it generates the command, saves it in a json file and uploads the json file to a database.
Then, a remote Slicer has a connection with the database, it checks if there is a command in the database, runs it remotely and then uploads back the outputs.
Thanks to the nice documentation and people here on Discourse, I have been able to parse CLI node parameters, get their values (nodes) and run some CLIs remotely.
The only exception I have is about colormaps. When I generate the CLI command in the local Slicer, the colormap parameter is empty and so the remote Slicer returns an error with missing parameter.
Slicer does some processing before running a CLI: export data to files, resolve dependencies (such as colormaps); and after running a CLI (displays results, applies a referenced transform, etc). I would suggest to intercept the CLI execution at a lower level so that you don’t have to reimplement all these pre/post CLI actions.
Slicer personal cloud did something similar. See more information about it on this page (regarding remote execution of modules). Probably @pieper and/or Jim Miller (GE Corporate Research) can give you more details.
It contains one python and one c++ sample CLI (see Applications folder). Developers need to write a slicer_cli_list.json (see Applications folder) file listing the CLIs to be exposed and write the Dockerfile with commands to install/build all pre-requisites and libraries needed by the CLIs.
All the functionality within slicer_cli_web is being integrated into the item tasks plugin of girder.