Realtime Shell Scripts

The goal is to be able to watch long-running shell scripts with output trickling back through a websocket.

Activity

Create a shell plugin that held a script in the text component of the json. Only a site owner can modify the stored copy of this script.

The plugin can have buttons that control the script. To start with this will be just RUN.

Later STOP could kill -9 the subprocess running the script, or maybe something simpler.

For short scripts the server could run the script in response to an AJAX request. Nick would skip this step.

For longer scripts the server would establish a websocket connection with the plugin.

The socket connection could be closed when the plugin is abandoned. (How do we know this happens?)

The socket connection could be kept alive while the plugin is gone. (How does it reconnect?)

The socket connection could be closed (How could we reopen it?)

Related

Realtime Txtzyme is a similar project, but safer in that txtzyme code can't hurt anything.