DomTerm

DomTerm is a combined terminal emulator and REPL console using web technologies - i.e. JavaScript and DOM: Users can type commands which gets sent to an application, which evaluates the command, and displays the results, typically in some kind of type-script format.

The qtdomterm application is self-contained terminal emulator based on DomTerm and QtWebEngine.

This LWN article provides background, motivation, and a summary of the functionality.

The name “DomTerm” refers to that it works by manipulating the Document Object Model (DOM) of a browser: the nested structure of elements, text, and attributes. (Also, most other appropriate names were already taken...)

DomTerm is Free Software (open-source) available at https://github.com/PerBothner/DomTerm.

The older JWebTerminal project was based on similar concepts, but was mostly written in Java using Javafx WebView.

Recent advances:

Why another terminal emulator

The goal of this project is to combine two related but separate tools: a terminal emulator, and a rich-text console, and do it properly.

There are many terminal emulators, including quite a few written in JavaScript. However, they generally work with a rectangular grid of characters, and don’t integrate rich text (images, math, variable-width text, variable-length lines, interaction) well.

There are also various tools designed for REPL-style interaction, chat clients, etc. Examples include IPython or the the JavaScript console of a web browser. However, they don’t work as terminal emulators, or at best have limited functonality or require switching modes.

For rich text applications it seems obvious to use web technologies: DOM and JavaScript.

One goal of this project is a stand-alone terminal emulator application that techies can use as a day-to-day terminal emulator, and that also seamlessly provides support for rich text and interaction. That means an embedded web engine.

The core of the project is a JavaScript package that can be used and embedded in different modes and applications.