Faithful Go port of the Python pyte library, validated against pyte's full test suite and ESCTest2 conformance tests. Multiple screen variants: base, diff (dirty tracking), history, debug. Powers webterm and a few other of my projects.
I wanted to show live terminal screenshots in webterm when I ported it to Go, and could not find anything for Go that came close to pyte.
Follows pyte's architecture where feasible, aiming for a very close match to pyte exact semantics in Go -- edge cases handled identically. The notable addition is DiffScreen, which tracks dirty cells for efficient WebSocket updates; the SVG export feature snapshots any screen state for screenshots or test reports.
1:1 pyte semantics. ESCTest2 conformance.
Snapshot screen state as SVG.
go get github.com/rcarmo/go-te. Any GOARCH.
Powers webterm, go-rdp, ghostty-web.