Free & Apache-2.0 licensed terminal UI framework for .NET

Terminal UI should do more. This one clicks.

OpenTail.TUI is a reactive, Elm-architecture terminal UI framework for .NET. It has mouse input on Windows (for now), full RGB color, clickable links and a diff view, and it runs entirely inside a plain console window.

✓ Apache-2.0 licensed ✓ .NET 10 and 11, AOT-ready ✓ Zero runtime dependencies
opentail-tui://demo 30fps
MOUSE Windows, full-screen: click a list row, click a slider, click a link.
01
List row clickedselection follows the cursor, not just ↑/↓
done
02
[docs](url) clickedMarkdownBlock link → Link.TryOpen
opened
03
Desktop notificationSystemNotification.Show, from inside the terminal
sent
04
Paste arrived as one messagePasteMsg on Linux and macOS
1 msg
RENDERERDouble-buffered diff
ARCHITECTUREElm — Init/Update/View
DEPENDENCIES0 at runtime
80+widgets & building blocks
875automated tests, on .NET 10 and 11
30fpszero-flicker diffed rendering
0runtime dependencies
Not just pretty output

Clicks that land where they are drawn.

Most .NET console libraries make text look nice. OpenTail.TUI builds interactive apps: click a row to select it, click a slider to set it, click a link and your browser opens it. Mouse input is read on Windows in full-screen mode for now. Linux and macOS mouse support is not built yet.

01

Mouse hit-testing, shared with the drawing

Widgets that take clicks follow one contract: Render draws the widget, and HitTest (or HandleMouse) reports what a click landed on, using the same position math. So a click always agrees with what is on screen. Click a list row, click a slider to set its value, or click a link.

click to selectclick to setWindows, full-screen
02

Elm architecture, genuinely testable

Init, Update and View are ordinary methods on a record. Feed a message into Update in a unit test and assert on the new model. No terminal is needed.

public sealed record Counter(int Count) : IModel
{
public Cmd? Init() => null;
public (IModel Model, Cmd? Cmd) Update(IMsg msg) => msg switch
{ KeyMsg { Key: ConsoleKey.Spacebar } => (this with { Count = Count + 1 }, null),
_ => (this, null), };
public void View(Rect area, CellBuffer buffer) =>
buffer.SetText(area.X, area.Y, $"Count: {Count}", Theme.Dark.Text, area.Width);
}
03

Zero-flicker, 30fps rendering

A double-buffered CellBuffer diffs against the last painted frame and writes only what changed. The render loop runs at 30fps, so live timers, spinners and glowing text update without a stray repaint.

Cell-level ANSI diffing, not a full-screen redraw
04

Reaches outside the terminal, carefully

Link.TryOpen launches a URL in the browser. Link.TryOpenFolder opens a directory in Explorer or Finder, and refuses anything that is not an existing directory, so it can never run a file. SystemNotification.Show pops a real OS notification.

just text output→a live OS notification
05

Full RGB color, with a fallback

Colors are full RGB. When the terminal cannot show them, the renderer falls back to 256 colors or none. ImageWidget draws an actual bitmap with the half-block technique, and can decode an uncompressed BMP file directly, with no image-decoding package.

06

Diffs that fold, and a height you can cap

DiffBlock draws a unified diff with a tinted row for each added and removed line. Long runs of unchanged lines fold into a row you can click to open, and the height can be capped with a "more rows" footer. PaginatorState, StopwatchState and TimerState are plain values the model owns, so paging and timing test without a clock.

row tintfold unchanged linesheight cap
The whole architecture, in one loop

Model. Message. Render. Repeat.

Every OpenTail.TUI screen is the same four-step loop: the discipline that makes Elm and Bubble Tea apps easy to reason about, brought to .NET.

  1. 01
    Model

    Plain C# records hold your screen's entire state, with no hidden framework fields.

  2. 02
    Update

    A pure function maps an incoming message (key, click, tick) to the next model.

  3. 03
    View

    Paint the model into a CellBuffer. The diff renderer works out what actually changed.

  4. 04
    Ship

    AOT-compatible and zero-dependency at runtime. CI builds a NativeAOT binary on Linux and Windows.

"Can a user click a list row?"ListView.HitTest (Windows)
"Can they click a hyperlink?"MarkdownBlock + Link (Windows)
"Will it flicker at 30fps?"Double-buffered diffing
"Does it work over SSH and in CI?"Plain ANSI. Redirected input is never read
"Is it actually used anywhere?"FlightDeck, a testing dashboard
The catalog, not the alphabet

Find it before you hand-roll it.

Tables, forms, overlays, effects, charts and layout primitives, organized in WIDGETS.md by the problem each one solves. So "I need a centered modal" leads straight to the widget that already does it correctly.

ListViewTextInputSlider DiffBlockFormInputsMarkdownBlock LinkImageWidgetToastOverlay FoldedTextPaginatorViewTimerView PasswordInputNumberInputTextAreaCheckboxList ToggleSwitchTreeFilePickerCommandMenu ProgressBarGaugeSparklineBarChartCalendar TaskListStatusBarSpinnerStopwatchViewGlowTextRainbowText TypewriterTextPulseRevealTextMarqueeSkeleton CodeBlockExceptionViewBreadcrumbsTabs CollapsiblePanelBoxRuleViewport LogViewportLiveLogScrollbarTuiTestHost ModalHelperCanvasWidgetLayout / ConstraintGridLayout

Every widget is a stateless renderer: construct it fresh each frame with whatever data it needs. Cross-frame state (cursor position, scroll offset, selection) lives in a separate plain record your model owns, which is what keeps Update unit-testable without a terminal.

Built to be actually used

Clickable widgets answer "what did they click?"

Click handling is not bolted on. Widgets that take clicks implement it consistently: Render and HitTest or HandleMouse share the same position math, so a click lands where it is drawn.

  • Click a list row: it selects, not just ↑/↓ (Windows, full-screen)
  • Click a slider to set its value
  • Click a link: your browser opens it
  • 875 automated tests, including hit-test edge cases
Free, forever

Apache-2.0 licensed. No paid tier.

OpenTail.TUI is a standalone open-source library, not gated behind any paid product. Use it in any .NET project.

Install from NuGet: dotnet add package OpenTail.TUI. The latest tagged release is 1.0.1, and it does not include the widgets above. Those are on the main branch of the repository and are listed in its CHANGELOG.

FAQ

The obvious questions.

Short, direct answers, the same standard the rest of the OpenTail family holds itself to.

Isn't this just Spectre.Console?

Different focus. Spectre.Console is excellent at formatting one-shot console output: tables, prompts, progress bars. OpenTail.TUI is built for full interactive apps: an Elm-style Update/View loop, live-updating dashboards, and mouse input on Windows, including clicking a list row or a hyperlink.

Does mouse support need a special terminal?

Mouse input on Windows is read through the console input API in full-screen mode. It has not yet been checked in Windows Terminal, so treat it as Windows-only for now. Linux and macOS mouse input is not built yet. If mouse input cannot be enabled, the app still gets keyboard input.

What does it depend on?

Nothing at runtime. The only package reference in the project is MinVer, a build-time-only version stamp that never ships with your app.

Is it AOT / trimming compatible?

Yes. The project sets IsAotCompatible, and the native console interop uses source-generated P/Invoke (LibraryImport), not reflection. CI publishes a NativeAOT build on Linux and Windows.

Can I see it in a real application?

The bundled demo shows the widgets: clone the repository and run dotnet run --project Demo. FlightDeck, a real-time testing dashboard, was built on OpenTail.TUI. A widget catalogue page in the demo is still to come.

Does it work over SSH or in CI?

The output is plain ANSI, so it works wherever ANSI does. SSH has not been checked yet, and clipboard copy over SSH is off unless you turn it on. When input or output is redirected, for example piped or running in CI, the app does not read the keyboard or draw, and it does not crash.

OpenTail.TUI

Terminals got boring.
This fixes that.

On NuGet

dotnet add package OpenTail.TUI

Explore the widgets View on NuGet