WolfCurses

Every programmer ends up with a pile of code that follows them from project to project. Mine is a terminal UI library called WolfCurses. It has been on GitHub for a decade, and these days it is the first package I add when I sit down to write a tool. This post is about what it is and how it got that way. The repository's own README is written for someone who has already decided to use it, and this is the part that comes before that.
The one-line description has not changed much in ten years: you describe what the screen should look like, and the library works out the smallest set of changes and draws it without flicker. Everything else grew around that.
Where it started
In late 2015 I was writing a clone of The Oregon Trail in C#. A game like that is mostly screens. A menu, a store, a river crossing, a status page, each one waiting for a number or a keypress and then handing off to the next. The code for moving between those screens, reading the keyboard and redrawing only the rows that changed had nothing to do with oxen or dysentery, so a couple of months in I pulled it out into its own repository. The name is a pun on curses, the library Ken Arnold shipped with BSD Unix and which Rogue made famous. The game still runs on it.
That is why the vocabulary is what it is. Your program is a SimulationApp. It has a tick. Screens are windows, and the thing that owns them is a WindowManager. A menu is an enum with a description on each value, and each value becomes a numbered choice on screen that is wired to a method. None of that was designed for general use. It was designed to get a wagon to Oregon, and then it turned out to be the shape most small programs already have.

How it grew
Most of 2016 went into it, and then it sat. Adding features to it as I needed them as the years went on. That is the honest history of a utility library. It does not get worked on so much as used, and once in a while something it lacks becomes annoying enough to fix.
- Dialogs and pickers. A message box, a yes/no confirm, a text prompt with validation and password masking, single and multiple choice lists, and a file dialog that browses drives and folders. Each one pushes itself on top of the current screen, takes over input, calls you back, and closes itself.
- Widgets that are just strings. A progress bar, a marquee, a spinner, a sparkline, bar and column charts, a line graph, and a bordered box with a title. Every one of them is a class with a
Rendermethod that returns text. There is no window to register, so they compose with anything, including a plainConsole.WriteLine. - Images. PNG, JPEG and GIF decoders written for the library, drawn as real pixels where the terminal speaks sixel or kitty and as half-block characters everywhere else. A photograph in a terminal at about thirty frames a second is a strange thing to see the first time.
- Sprites. A scene that holds a background as pixels, composites sprites over it in order with transparency, and tells you which ones are touching.
- Editable documents. A text buffer with a caret and selection, a scrolling viewport, tab stops, search, a CSV reader that survives quoted line breaks, a menu bar, a scroll bar, a keypad, a month grid, a record card, a timeline. This is the part an editor-shaped program would otherwise start by writing.
- Mouse input, Windows only so far, with presses, releases, moves and wheel as separate events.
![]()
The one rule I have held to the whole time is that the package depends on nothing. Not an image library, not a terminal abstraction, not a color package. When I needed to draw a PNG in a terminal I wrote a PNG decoder. When JPEG came up I wrote that too, progressive included, and checked both against an independent decoder in the test suite. That sounds like stubbornness, and partly it is. But for a library whose job is to be dropped into small and sometimes throwaway programs, it is the feature that matters most. Adding it costs one package reference and nothing else arrives with it, and nothing underneath it can go stale or get pulled.
The examples are the test bed
The repository ships three example programs, and I have come to think of them as the real test suite. The demo is one screen per feature: every dialog, every widget, the image and sprite stack, the menu bar, the keypad, the calendar, the text editor, mouse events. It has a menu item that redraws the whole thing with each renderer in turn, which is the quickest way to find out what your terminal can actually do.
The office suite is a collection of things typical of those types of programs. A word processor laid out after the DOS Editor, a BASIC environment with graphics and PC speaker sound, a spreadsheet with formulas and charts, a desk calculator with a paper tape, a planner, a card file, and a media player that runs over whatever ffmpeg is already installed. Each application exists to exercise some piece of the library, and adding another one is a folder and a single line in the menu.

The arcade is ten games, each deliberately built on a different part of the library, with no package references at all. Snake, Minesweeper, Tetris, chess, Missile Command, a labyrinth, Pac-Man, Blackjack, Poker and Battlezone. Between them they cover both input styles, every pacing model, drawn and decoded graphics, and falling back to characters when the terminal cannot show a picture.

The examples are mostly me creating these small programs to demonstrate some functionality but more importantly it at some point was a need I had in some other utility I was making at the time. It's a good back and fourth where the examples help me figure out how to improve functionality in the library itself.
Getting it
dotnet add package WolfCurses
It targets .NET 10 and the source is at github.com/Maxwolf/WolfCurses. The releases page has self-contained builds of all three examples for Windows, macOS and Linux, with no .NET install needed, if you would rather see it before reading any code.
If all you want is a progress bar in a console program, it does that in one line. If you want to write the next Rogue, it does that too. It is not a product. It is the drawer I keep reaching into, and after ten years the drawer is well stocked.