Fast, allocation-friendly .NET library to generate, parse, and manipulate ANSI/VT escape sequences (writer, markup, tokenizer, ANSI-aware text utilities).
$ dotnet add package XenoAtom.AnsiXenoAtom.Ansi is a fast, allocation-friendly .NET library for building rich ANSI/VT output and processing ANSI text. It helps you emit styled sequences, format markup, tokenize streams, and perform ANSI-aware text operations.
net10.0+ library and NativeAOT readyAnsiWriter fluent API (writes to TextWriter or IBufferWriter<char>)AnsiMarkup for markup strings, including interpolated strings (formatted values are escaped)AnsiCapabilities) including color downgrading, private-mode gating, and optional safe-mode behaviorAnsiTokenizer) with chunked parsing support (ESC and 8-bit C1 forms)AnsiStyledTextParser) that interprets SGR + OSC 8 into AnsiStyle/hyperlink runsAnsiText): strip, visible width measurement (wcwidth), wrap, truncate (optionally preserving ANSI)AnsiColors, AnsiColors.Web, AnsiPalettes) for named colors and xterm-like RGB approximations[!NOTE] XenoAtom.Ansi is a low-level foundation library, not a terminal UI framework like
Spectre.Console. It focuses on emitting and parsing ANSI/VT sequences againstTextWriter/ character buffers. It does not provide widgets, layout, input loops, or terminal state management (those belong in higher-level libraries).

samples/HelloWorld — basic formatting across a few linessamples/HelloAdvanced — richer demo (colors, decorations, markup, OSC 8 links, screen helpers)Run:
dotnet run --project samples/HelloWorld/HelloWorld.csprojdotnet run --project samples/HelloAdvanced/HelloAdvanced.csprojFor more details on how to use XenoAtom.Ansi, please visit the user guide.
This software is released under the BSD-2-Clause license.
Alexandre Mutel aka xoofx.