MIT · Self-contained

A full-screen TUI
in one package

Schipper.Io.Xterm bundles its own grid, renderer, color, input, and ITerminal. It does not reference Ansi. Mouse is SGR 1006, paste is UTF-8, alt-screen is DEC 1049.

0
Package deps
SGR
Mouse
1049
Alt screen
Demo
File browser

Emit, decode, lay out, restore

XtermSession flips modes on enter and writes the inverse on dispose, even if the first leave write fails.

Modern sequences

OSC title, hyperlinks, clipboard, cursor styles, synchronized output, SGR mouse, bracketed paste, focus reporting.

Layout

Immediate painters and a retained ScreenLayout. Regions report size, including empty content. Wide runes take two cells.

ConsoleTerminal

Raw/VT on Windows and Unix, UTF-8 code page, quick-edit off so mouse reports arrive. Modes restore on dispose.

Begin a session. Compose a layout.

The file browser in demo/ is a complete program on this package.

C#
using var terminal = new ConsoleTerminal();
await using var session = await XtermSession.BeginAsync(
    terminal,
    new XtermSessionOptions
    {
        MouseMode = MouseMode.ButtonEvent,
        BracketedPaste = true,
    });

var layout = new ScreenLayout(terminal.Columns, terminal.Rows);
Region header = layout.AddTop(1, name: "header");
Region body = layout.AddFill(name: "body");

Source on GitHub

Do not name a type Xterm. The sequence type is Vt.

Repository