Hi Philip,
The Orion server doesn't provide a way to execute arbitrary shell commands out-of-the-box. Assuming you're using the Java-based Orion server, it is designed to be accessed by multiple users, and the ability to run shell commands with server privileges is a security problem.
However, you could extend the Orion server and write a new servlet that provides this functionality. For example, you can register it with a servlet path like
/shellcommand/{command}?{arguments}. Then your client-side plugin could simply make an XHR call to this new servlet, passing the user's command arguments received from gcli. You can use
NpmServlet.java as a starting point, since it captures process output and forwards it back to the client, which you will probably have to do.
Keep in mind though, that the existing gcli-based Orion shell page doesn't provide a way for shell commands to receive standard input from the user. So any pagers or interactive programs that prompt the user will not work. Orion contributors are working on a TTY-based shell that will replace the gcli shell, and will solve this problem.
There is also ongoing work to
integrate Docker with Orion, which allows each user to get a separate, fully-featured *nix shell to play with. This may be of interest to you, as you could potentially create a virtual filesystem that mounts the user's Orion projects as well as other locations in the filesystem that the user needs to access.