MIT · net10.0 · Zero dependencies

Terminal primitives
without a toolkit tax

Schipper.Io.Ansi is the cell grid, color model, ANSI-art parser, and UTF-8 input decoder. Other packages sit on top of it; nothing in this package sits on them.

0
Package deps
UTF-8
Wire encoding
CP437
On-disk art
AOT
Compatible

The terminal layer TUI does not reimplement

Color, cells, screen diffs, and key decoding live here. Schipper.Io.Tui consumes them. Schipper.Io.Xterm does not — it ships its own copy on purpose.

ScreenBuffer + diffs

Paint cells, then emit a full frame or a run-length diff. Truecolor downgrades to 256 and basic-16 before style runs are compared.

Color that degrades

Basic-16, xterm-256, and truecolor. Color.Downgrade maps through the cube and gray ramp, then a precomputed 16-color table.

ANSI.SYS art

SAUCE records, iCE color, pending wrap, tab stops, and pen-colored erase. CP437 is the on-disk format, not the SSH wire.

UTF-8 input

InputParser decodes the wire as UTF-8, holds a split CRLF, and aborts a broken CSI instead of swallowing the next key.

Paint a buffer. Write the bytes.

A host implements ITerminal. The package never opens a console. Source is public; the package version is still 0.1.0-dev.

  • →Zero-based cells in ScreenBuffer
  • →DEC 2026 sync via Ansi.BeginSync / EndSync
  • →Keep events with the List<KeyEvent> overload of Feed
C#
using Schipper.Io.Ansi;
using Schipper.Io.Ansi.Colors;
using Schipper.Io.Ansi.Screen;

var screen = new ScreenBuffer(width: 80, height: 24);
var ink = Color.Rgb(222, 238, 240);
var paper = Color.Rgb(8, 20, 34);
screen.Fill(new Cell(' ', ink, paper));
screen.DrawText(2, 1, "Schipper.Io.Ansi", ink, paper);

string frame = ScreenRenderer.RenderFull(screen, ColorDepth.TrueColor);
await terminal.WriteAsync(frame);

Source on GitHub

MIT. Clone, build in the SDK container, pack into the local feed.

Repository Widgets on Ansi →