Creating Theia based IDE around/for command line tools


I should start by saying that I’m quite new to the world of TypeScript/JS programming and I have very limited experience with node.js based application development.

At my working group we are creating a bunch of command line tools (mostly compilers for domain specific languages, but also some formal verification tools) and I have been looking for a framework to build a graphical interface for potential developers of these tools for a while now. Some other tools from our group use an Eclipse based IDE, but I think that for the newer projects it would be nice to try out Theia instead.

My question is maybe quite naive and very broad, so I’d be glad for any pointers in the right direction. I kind of understand the overall architecture of Theia, of how it’s built as a couple of (loosely) coupled extensions, and I have at least a decent idea of how to create the UI parts for the workbench. What I’m a bit unsure is about how to connect these UI elements with the command line tools we are developing. Is there a possibility of running them in a separate process/thread and somehow get Theia to communicate with them? Our tools are mostly written in Java, OCaml, and C. From what I gathered, I could probably create some wrapper code around some of the tools and try and communicate via JSON-RPC with them, though how that works in practice and how I combine that with the Theia IDE is again beyond my understanding.

As I said, this might be a trivial question, or one that is really not directly answerable, so I’m happy for any input on this!

Hi @nick94,

so in general, like you already said, communication between the UI (frontend) and CLI applications (backend) can be accomplished using our JSON-RPC interface, which connects interfaces in the frontend with service implementations in the backend. You can read more about that in our documentation.

I believe that’s also what other users of Theia do for their CLI interactions. For example, Arduino have created an interface for their CLI daemon (written in Go I believe) here, implement it in the backend, bind it here (frontend) and here (backend) and finally consume it as a service in the frontend.

I hope those pointers are good enough to get you started :slight_smile:

1 Like

That is perfect! Thank you so much!

1 Like

Hi Nick, we are currently doing some POC/MVP work with Theia, but the feature set that you discussing we have been able to do. We could possibly share if you wish to see some working examples. We are focusing on shell, Docker type instantiations. Enjoy