I’m guessing it’s mostly useful for writing a terminal emulator in the browser. In theory I think all input and output on the terminal is done via text, which may contain control codes, so you’d still have to write code to render the text, support mouse input and selection, etc.
My first thought was using it as a compatibility layer for VT100-style CLI programs. Hypothetically, if we wanted to finally replace VT100 emulation and move to some new legacy-free protocol for terminals, we would need some sort of shim for running legacy VT100 programs and displaying them in our shiny new VT-next terminal. Similar to the `vt` program from plan 9.
It looks like the use case is if you want to script the usage of a tui program. In most cases it would be best to script the operation yourself with sed rather than ht/nano. I could see this being useful for scripting internal tui tools without access to the source code.
I shared the motivating use case for why Marcin and I built this (LLM agents using terminals) in a diff comment but I’ll also expand the readme to give examples of use cases.