Profpatsch/users/Profpatsch/avt-go
- cmd/smoke/main.go 959 B
- parser/ 50.3 KiB · 3 files
- terminal/ 90.0 KiB · 3 dirs, 10 files
- types/types.go 13.4 KiB
- util/util.go 1.9 KiB
- LICENSE 11.1 KiB
- NOTICE 350 B
- README.md 677 B
- cell.go 358 B
- charset.go 152 B
- color.go 131 B
- default.nix 416 B
- go.mod 58 B
- go.sum 155 B
- line.go 137 B
- pen.go 274 B
- tabs.go 119 B
- vt.go 3.2 KiB
avt-go
A Go transliteration of avt by Marcin Kulik, a virtual terminal emulator library licensed under Apache-2.0. It parses ANSI/VT escape sequences and maintains a virtual screen buffer with cursor, scrollback, and alternate screen support.
This port exists so Go projects like git-blimey can use terminal emulation
without FFI into the Rust crate. The public API mirrors avt closely — create a
Vt, feed it bytes with FeedStr, and inspect the result via View(),
Cursor(), Text(), or Dump() to serialise and restore state.
vt := avt.New(80, 24)
vt.FeedStr("\x1b[31mhello\x1b[0m world")
fmt.Println(vt.Text())