Project

go-te

active

VT100/VT520 terminal library for Go — pyte-faithful, ESCTest2, SVG export.

Overview

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.

Motivation

It all started because I wanted to show "live" screenshots in webterm when I ported it to Go, and sort of escalated from there because I realized that there was _nothing_ out there that came close to pyte for Go.

How it works

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 isDiffScreen, which tracks dirty cells for efficient WebSocket updates because I needed that, and the SVG export feature snapshots any screen state for screenshots or test reports.

Features
🔣
Pyte-faithful, VT100–VT520

1:1 pyte semantics. ESCTest2 conformance.

🖼
SVG export

Snapshot screen state as SVG.

📦
Pure Go

go get github.com/rcarmo/go-te. Any GOARCH.

🔗
Shared engine

Powers webterm, go-rdp, ghostty-web.

Architecture
Byte stream PTY / SSH / pipe Escape parser CSI · OSC · DCS Screen model cells · cursor · attrs History scroll buffer Modes DEC private Consumer renderer / diff / snapshot Go terminal emulator library — VT100/VT220/VT520 screen model