Gritty is a terminal emulator written in Go and Gio UI Framework, focusing on readability and documentation of the code.
You could use this emulator for normal work, but I created it as a reference implementation of vt100-ish terminal emulator. (I use kitty, and I'm happy with it. I only wanted to understand how terminals work.)
graph LR;
subgraph Controller
E
C
I
end
C[Controller] --> B[Buffer]
C[Controller] --> E[EncodeKeys]
E --> PTY
PTY --> P[Parse input]
P --> I[Interpret control sequences]
I --> C
G[GUI] --"send keys"--> C
G --"read buffer"--> C
Packages
buffer - Buffer is the model that contains a grid of characters, it also handles actions like "clear line" or "write rune".