WolfCurses 2026.11.17.3
dotnet add package WolfCurses --version 2026.11.17.3
NuGet\Install-Package WolfCurses -Version 2026.11.17.3
<PackageReference Include="WolfCurses" Version="2026.11.17.3" />
<PackageVersion Include="WolfCurses" Version="2026.11.17.3" />
<PackageReference Include="WolfCurses" />
paket add WolfCurses --version 2026.11.17.3
#r "nuget: WolfCurses, 2026.11.17.3"
#:package WolfCurses@2026.11.17.3
#addin nuget:?package=WolfCurses&version=2026.11.17.3
#tool nuget:?package=WolfCurses&version=2026.11.17.3
Wolf Curses
Build text user interfaces in C#. You describe what the screen should look like; the library works out the smallest set of changes and draws it, flicker-free.
Windows and forms, menus, dialogs, file pickers, progress bars and graphs, plus images, sprites and animation, drawn in the terminal with real pixels where the terminal supports them.
Zero dependencies. PNG, JPEG and GIF decoding included.
![]()
Yes, that is a photograph in a terminal, at ~30 fps. Sixel where the terminal speaks it, half blocks everywhere else, detected automatically.
Install
dotnet add package WolfCurses
Quick start
A complete program with a menu, a dialog, and the loop that drives it:
using System.Threading;
using WolfCurses;
using WolfCurses.Controls;
using WolfCurses.Utility;
using WolfCurses.Window;
// Each enum value becomes a numbered menu choice; the description is the line the user reads.
public enum MainMenu
{
[Description("Say hello")] Hello = 1,
[Description("Quit")] Quit = 2
}
// Per-window state, yours to fill in.
public sealed class MainData : WindowData { }
// A window is a screen. Commands are wired to methods.
public sealed class MainWindow : Window<MainMenu, MainData>
{
public MainWindow(SimulationApp simUnit) : base(simUnit) { }
public override void OnWindowPostCreate()
{
AddCommand(() => MessageBox.Show(SimUnit, "Hello from WolfCurses!"), MainMenu.Hello);
AddCommand(() => SimUnit.Destroy(), MainMenu.Quit);
}
}
public sealed class MyApp : SimulationApp
{
public static MyApp Instance { get; private set; }
public static void Create() => Instance = new MyApp();
protected override void OnFirstTick() => Restart();
protected override void OnPreDestroy() => Instance = null;
public override string OnPreRender() => "My App";
public override void Restart()
{
base.Restart();
WindowManager.Add(typeof(MainWindow));
}
}
internal static class Program
{
private static void Main()
{
MyApp.Create();
while (MyApp.Instance != null)
{
MyApp.Instance.OnTick(true); // reads input, ticks logic, redraws what changed
Thread.Sleep(1);
}
}
}
That is the whole setup. Three things you might expect to write are already done for you:
- Windows are discovered. Every concrete
IWindowin your assembly, plus the built-in control windows, with no registration. - Keys are read and routed, at the start of every tick. ENTER submits the typed command, BACKSPACE edits it, every other key both fills the prompt and reaches the focused form.
- Frames present themselves, without flicker: rows overwritten in place rather than cleared first, only changed rows rewritten, the whole update as one write.
Forms (dialogs, prompts) derive from Form<TData> and attach to their parent window with a [ParentWindow(typeof(MainWindow))] attribute, again with no manual registration. Menus are steerable with the arrow keys as well as by typing a number, and typed input always wins. Up and Down walk the items in numbered order and roll over at the ends; when a menu is too tall for the terminal it reflows into columns, and Left and Right cross between them.
What else is in the box
Each of these has a fuller write-up with code in the main README.
Images in the terminal. Decode a PNG, JPEG or GIF and drop it into your window's output like any other string:
// Decode and render ONCE, then cache. A window renders every tick.
private readonly string _logo = AnsiImage.RenderFile("media/logo.png");
public override string OnRenderWindow() => _logo;
Scaled to fit with the CSS object-fit modes, transparency preserved, colour degrading from true colour through 256 and grayscale to plain ASCII, honouring NO_COLOR. Sixel and kitty are detected and used automatically, half blocks everywhere else. A file that cannot be loaded becomes the magenta-and-black checkerboard familiar from game engines instead of throwing, because in a text UI a stack trace lands on top of your interface. The decoders are written from spec in pure managed code, which is how this has zero dependencies, and IImageDecoder swaps in your own.
Sprites, animation and collision. A SpriteScene holds the background as pixels and recomposes it as often as you like. Set sprite.Image to animate one, and scene.SpritesTouching(sprite) reports what it ran into.
Widgets. ProgressBar, Sparkline, BarChart and LineGraph turn data into text you return from a render, with no windows to register. TextGrid is a rectangle of styled cells for boards and maps, with a viewport so a world larger than the screen just scrolls, and BoxDrawing picks the character that joins lines running in any set of directions.

Every widget takes colours and ramps, and colour is entirely opt-in: with styles left at their defaults a widget emits byte-for-byte what it did before colour existed, not even a reset.
Dialogs, panels and pickers. MessageBox, SelectList, TextInputDialog and FileDialog push themselves on top of the current screen, take over input, and call you back with the result before closing themselves. Box borders any text, measuring width past ANSI escapes.
Input. Mouse support is opt-in through AnsiConsole.EnableMouse() and Windows-only for now; presses, releases, wheel notches and (with a further opt-in) pointer motion, which is what click-and-drag is built from. HeldAxis recovers a held direction from the burst of presses a terminal actually delivers, since a terminal never reports a key being let go.
Editable text. TextBuffer, TextViewport, TabStops, ControlPictures, TextSearch and TextWords in WolfCurses.Documents are a document, the window onto it, the two halves of the translation between where a character is stored and where it is drawn, and finding and counting things in it, so an editor-shaped screen does not start by writing all six. The last of those is the one nobody expects: a terminal obeys a control character rather than drawing it, and a form feed used as a page break moves the cursor mid-row. DelimitedText reads and writes CSV properly, including the quoted field with a line break in it that no line-by-line splitter can handle at all. MenuBar and ScrollBar are the pull-down bar and the bar down the side; the menu bar takes presses and pointer movement, so an open menu highlights whatever you hover, and an entry that says it cannot be used just now is drawn greyed rather than merely being inert.
Clickable layouts. Keypad is a grid of labelled, clickable cells with spanning keys, whose layout is read by both the drawing and the hit test so the two cannot disagree. MonthGrid is the same idea for a month: six week rows always, today and a chosen day picked out, and today told rather than read from the clock so it can be tested and so a screen left open past midnight moves its own highlight.
Tables. TableViewport is the scrolling window onto a grid whose columns are not all one wide: which columns fit, where one is drawn, which one a click landed in, and how far right there is to scroll. TextRow builds a row out of styled runs and can draw a range of its columns, which is how a menu panel or a tooltip is drawn over the screen behind it: a finished styled row cannot be cut by column, because the cut lands inside an escape sequence.
Real-time screens. IntervalTimer paces anything that moves on its own, off the system tick rather than the once-a-second simulation tick. A late period is dropped rather than banked, so a slow frame is never repaid as a burst of instant ones.
Measuring styled text. An escape sequence has length but no width, so string.Length is the wrong number for anything you want to pad or place beside something else. AnsiText.VisibleLength, AnsiText.StripEscapes and AnsiText.Fit share one parser: the last pads or trims to an exact column count, carrying every escape through a trim so a run that was opened is still closed. TextColumns.Join puts blocks of text side by side using the same measurement.
See it running
Three example apps ship in the repository, each with its own guide:
- The library tour: images, sprites, widgets, colour, and every dialog.
- The arcade: ten games, each built on a different part of the library.
- The office suite: a word processor after the MS-DOS Editor, a BASIC environment after the one that shipped with DOS, a spreadsheet, a desk calculator, and a calendar.
Prebuilt, self-contained downloads for Windows, macOS and Linux are on the releases page, all of them in a single archive with no .NET install needed.
Links
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2026.11.17.3 | 76 | 11/17/2026 |
| 2026.8.23.6 | 215 | 8/23/2026 |
| 2026.8.18.8 | 142 | 8/18/2026 |
| 2026.8.18.6 | 135 | 8/18/2026 |
| 2026.7.22.16 | 478 | 7/22/2026 |
| 2026.7.22.15 | 133 | 7/22/2026 |
| 2026.7.21.14 | 127 | 7/21/2026 |
| 2026.7.19.13 | 135 | 7/19/2026 |
| 2026.7.18.12 | 135 | 7/18/2026 |
| 2026.7.18.11 | 125 | 7/18/2026 |
| 2026.7.17.10 | 136 | 7/17/2026 |
| 2026.7.15.9 | 130 | 7/15/2026 |
| 2026.7.15.8 | 130 | 7/15/2026 |
| 2026.7.11.7 | 138 | 7/11/2026 |
| 2026.7.10.6 | 138 | 7/10/2026 |
| 2026.7.10.5 | 128 | 7/10/2026 |
| 2026.7.10.4 | 134 | 7/10/2026 |
| 2026.7.9.3 | 134 | 7/9/2026 |
| 2026.7.9.2 | 133 | 7/9/2026 |
| 2018.9.12.1 | 2,608 | 9/12/2018 |