TUIKit 0.0.1
See the version list below for details.
dotnet add package TUIKit --version 0.0.1
NuGet\Install-Package TUIKit -Version 0.0.1
<PackageReference Include="TUIKit" Version="0.0.1" />
<PackageVersion Include="TUIKit" Version="0.0.1" />
<PackageReference Include="TUIKit" />
paket add TUIKit --version 0.0.1
#r "nuget: TUIKit, 0.0.1"
#:package TUIKit@0.0.1
#addin nuget:?package=TUIKit&version=0.0.1
#tool nuget:?package=TUIKit&version=0.0.1
TUIKit
A concurrent, high-performance terminal UI framework for .NET. TUIKit lets you drop a multi-pane, live-updating interface into an ordinary console application — the kind of surface an AI agent harness needs: a streaming transcript on one side, tool output and telemetry on another, an input composer at the bottom, and modal dialogs on top of it all.
It is built for the case where several threads are writing at once. A background worker can call pane.WriteLine(...) while the render thread repaints, and TUIKit handles the ordering, the diffing, and the escape-sequence minimization for you.
Status: under active development. The public API is still moving. See
TUIKIT_PLAN.mdfor the phase-by-phase build.
Why it exists
Most console UI libraries assume a single-threaded, immediate-mode loop and a fixed split layout. An agent harness breaks both assumptions. Output arrives in a flood of markdown tokens from one thread while tool calls mutate their status lines from another, the operator scrolls back through history without losing the live tail, and a confirmation dialog can appear at any moment. TUIKit is designed around that reality: retained panes that own their state, thread-safe writes, in-place line updates, and a layout you describe as a set of regions rather than a rigid split.
Feature highlights
- Developer-defined regions. Declare any number of rectangles, each with its own resize behavior (fixed, proportional, or edge-anchored). TUIKit reflows them when the window changes.
- Thread-safe direct writes. Any thread may write to any pane. Ordering is FIFO per pane.
- Mutable content. Update a line already on screen —
running…becomesdone (1.2s), a progress bar advances in place. - Streaming + smart scroll lock. Scroll up to detach from the live tail; return to the bottom to re-attach. A
↓ N newindicator tells you what you're missing. - Styled text and markdown. Fluent styled spans plus a markdown renderer for agent output.
- Correct Unicode width. Double-width CJK, combining marks, and emoji grapheme clusters render and diff correctly.
- Enhanced keyboard input. Kitty / CSI-u and
win32-input-mode, routed through a central command table with scopes, multi-key chords, and a configurable Ctrl+C policy. - Mouse, links, and selection. Click-to-focus, hover scroll, virtual links plus OSC 8, text selection with OSC 52 copy.
- Modals and notifications. Focus-trapping modal stack with async results, plus non-focus-stealing toasts.
- Headless rendering. Render to an in-memory cell buffer and assert it as text — the same substrate TUIKit uses for its own tests.
Terminal support
Tier-1, tested targets: Windows Terminal, iTerm2, Ghostty, WezTerm, Alacritty, kitty — including over SSH and inside tmux. Terminals without enhanced keyboard or truecolor support (macOS Terminal.app, legacy conhost, PuTTY) run in a degraded mode with capability reporting rather than failing. When stdout is not a TTY, TUIKit degrades to plain line output.
Target frameworks
netstandard2.0, net8.0, net10.0. The netstandard2.0 target carries a compatibility shim and a small set of package dependencies; modern targets are dependency-free.
Getting started
// Illustrative — the surface API is still stabilizing (see TUIKIT_PLAN.md).
Full runnable code lives in src/TUIKit.Example — a simulated agent control harness that exercises every major feature. Press ? inside it for a full keybinding reference.
Building and testing
dotnet build src/TUIKit.sln
dotnet run --project src/Test.Automated # console test runner
dotnet run --project src/Test.Automated -- --results results.json
dotnet test src/Test.Xunit
dotnet test src/Test.Nunit
License
MIT. See LICENSE.md.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Microsoft.Bcl.AsyncInterfaces (>= 8.0.0)
- System.Memory (>= 4.6.0)
- System.Threading.Channels (>= 8.0.0)
-
net10.0
- No dependencies.
-
net8.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.
v0.1.0 (Alpha) — first public preview. Core rendering, layout, panes, input, mouse/links, modals, widgets, theming, hosting, and headless testing. API and capabilities are subject to change.