XenoAtom.Terminal.Graphics
2.1.0
Prefix Reserved
dotnet add package XenoAtom.Terminal.Graphics --version 2.1.0
NuGet\Install-Package XenoAtom.Terminal.Graphics -Version 2.1.0
<PackageReference Include="XenoAtom.Terminal.Graphics" Version="2.1.0" />
<PackageVersion Include="XenoAtom.Terminal.Graphics" Version="2.1.0" />
<PackageReference Include="XenoAtom.Terminal.Graphics" />
paket add XenoAtom.Terminal.Graphics --version 2.1.0
#r "nuget: XenoAtom.Terminal.Graphics, 2.1.0"
#:package XenoAtom.Terminal.Graphics@2.1.0
#addin nuget:?package=XenoAtom.Terminal.Graphics&version=2.1.0
#tool nuget:?package=XenoAtom.Terminal.Graphics&version=2.1.0
XenoAtom.Terminal

<img align="right" width="256px" height="256px" src="https://raw.githubusercontent.com/XenoAtom/XenoAtom.Terminal/main/img/XenoAtom.Terminal.png">
XenoAtom.Terminal is a modern replacement for System.Console designed for TUI/CLI apps: serialized output, rich ANSI/markup rendering, unified input events, and deterministic tests.
๐ Quick start
using XenoAtom.Terminal;
Terminal.WriteLine("Hello");
Terminal.WriteMarkup("[bold green]Hello[/] [gray]world[/]!");
โจ Features
- Console-compatible API surface: Title, cursor, window,
ReadKey/ReadLine-style workflows - Output (ANSI-safe):
- Serialized writers prevent interleaved escape sequences across threads
- Atomic writes for multi-step output without tearing
- Markup + ANSI styling (powered by XenoAtom.Ansi)
- Custom markup tokens via
Terminal.MarkupStyles/Terminal.SetMarkupStyle - Graphics capability detection via
Terminal.Graphicsand optional image output throughXenoAtom.Terminal.Graphics(Kitty, iTerm2, Sixel), including direct-output fallback text, optional cell reservation, encoded image caching, Sixel RGB332 fast palette mode, and real-time frame source notifications
- Input (unified events):
- Single event stream for keys, text, mouse, resize, signals
- Async + cancellation-friendly APIs for TUI loops
- Interactive ReadLine editor:
- Cursor movement, mid-line insert/delete, word navigation/delete
- Grapheme cluster-aware editing (emoji/ZWJ/combining sequences)
- Undo/redo + reverse incremental history search
- Selection by keyboard (Shift) and mouse click/drag
- History stored on the
TerminalReadLineOptionsinstance (shareable, not global) - Completion + extensibility via custom key/mouse handlers (
TerminalReadLineController) - Clipboard-friendly shortcuts (Ctrl+C/Ctrl+X/Ctrl+V) when available
- Readable control-char helpers via
TerminalChar(e.g.TerminalChar.CtrlC) - Gesture formatting/parsing via
TerminalKeyGesture(e.g.CTRL+R) - Styled prompt (
PromptMarkup) + custom line rendering (MarkupRenderer)
- Scopes + state management:
- Reliable scopes: alternate screen, raw/cbreak mode, bracketed paste, mouse reporting, hide cursor
- State tracking: style/colors/decorations, title, cursor position/visibility, window size
- Clipboard: cross-platform text plus named clipboard formats (for example PNG images), including OSC 52 text fallback for remote shells
- CI + testing:
- CI-aware backend keeps colors when output is redirected
- In-memory backend for deterministic tests (capture output + inject events)
- Cross-platform + AOT: Windows Console + Unix (Linux/macOS),
net10.0+ and NativeAOT-friendly design - Unix terminfo detection: uses terminfo + environment hints for colors (16/256/truecolor) and related capabilities (alternate screen/cursor visibility)
Screenshot of the interactive sample HelloReadLine demo:

XenoAtom.Terminal is a terminal API, not a widget/UI framework. It provides safe I/O, terminal state/scopes, and input events; higher-level libraries can build screen buffers, widgets, and layouts on top.
๐ User Guide
For more details on how to use XenoAtom.Terminal, please visit the user guide.
๐งช Sample
samples/HelloImagedisplays a small markup header and a sample image with terminal graphics.samples/HelloTerminalprints all input events (key/mouse/resize/text/signal) and demonstrates scopes.samples/HelloReadLinedemonstrates the interactiveReadLineeditor (history, selection, completion, and markup rendering).samples/LogTerminalprints colored pseudo log lines (timestamp/level/category/message) and is run in CI to validate ANSI output.
๐ชช License
This software is released under the BSD-2-Clause license.
๐ค Author
Alexandre Mutel aka xoofx.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- SkiaSharp (>= 3.119.2)
- SkiaSharp.NativeAssets.Linux (>= 3.119.2)
- SkiaSharp.NativeAssets.macOS (>= 3.119.2)
- SkiaSharp.NativeAssets.Win32 (>= 3.119.2)
- XenoAtom.Ansi (>= 1.7.0)
- XenoAtom.Terminal (>= 2.1.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on XenoAtom.Terminal.Graphics:
| Package | Downloads |
|---|---|
|
XenoAtom.Terminal.UI.Graphics
Terminal image controls and presenters for XenoAtom.Terminal.UI |
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on XenoAtom.Terminal.Graphics:
| Repository | Stars |
|---|---|
|
XenoAtom/XenoAtom.Terminal.UI
XenoAtom.Terminal.UI is a modern, reactive retained-mode terminal UI framework for .NET
|
| Version | Downloads | Last Updated |
|---|---|---|
| 2.1.0 | 208 | 4/27/2026 |