Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Use SharpConsoleUI to build full terminal (TUI) applications in .NET — equally suited to full-screen single-window apps and multi-window desktops with overlapping draggable windows — using a compositor, a DOM layout engine, and 40+ reactive controls (data tables, tree views, forms, an embedded PTY terminal, markdown, charts, video). USE FOR: interactive console apps, full-screen TUIs, multi-window terminal desktops, dashboards, wizards, and admin/monitoring UIs that need focus, mouse, and flicke
.claude/skills/managedcode-sharpconsoleui/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 51% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 47% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 66% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 79% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 64% | 0% |
.Frameless() (no title bar, no title buttons) + .Maximized() app that owns the whole terminalDo not trigger for plain line-based CLI tools, argument parsing, or non-interactive scripts.
dotnet add package SharpConsoleUIdotnet add package SharpConsoleUI --version <version><PackageReference Include="SharpConsoleUI" Version="x.y.z" />net8.0, net9.0, net10.0.mermaidflowchart LR A["NetConsoleDriver (RenderMode.Buffer)"] --> B["ConsoleWindowSystem"] B --> C["WindowBuilder -> Window"] C --> D["window.AddControl(Controls.*)"] D --> E["DOM layout: Measure -> Arrange -> Paint"] E --> F["windowSystem.AddWindow(window)"] F --> G["windowSystem.Run() (blocks until Shutdown)"] G --> H["compositor merges per-window buffers -> terminal"]
NetConsoleDriver and a ConsoleWindowSystem that owns all windows.WindowBuilder (title, size, position, borders, padding).window.AddControl(...), usually via the Controls static factory.Button.OnClick); call windowSystem.Shutdown() to exit.windowSystem.AddWindow(window) then windowSystem.Run() starts the render/input loop (blocks until shutdown).csharpusing SharpConsoleUI; using SharpConsoleUI.Builders; using SharpConsoleUI.Controls; using SharpConsoleUI.Drivers; var driver = new NetConsoleDriver(RenderMode.Buffer); var windowSystem = new ConsoleWindowSystem(driver); var window = new WindowBuilder(windowSystem) .WithTitle("Hello World") .WithSize(50, 12) .Centered() .Build(); window.AddControl(Controls.Markup() .AddLine("[bold cyan]Hello, SharpConsoleUI![/]") .Build()); window.AddControl(Controls.Button("Quit") .OnClick((sender, e, win) => windowSystem.Shutdown()) .Build()); windowSystem.AddWindow(window); windowSystem.Run();
Use a GridControl when you need columns/rows with fixed, size-to-content, or proportional (Star) tracks, and put content controls (tables, lists, markdown) into the cells:
csharpvar grid = Controls.Grid() .Columns(GridLength.Cells(20), GridLength.Star(1)) // fixed sidebar + fill .Rows(GridLength.Auto(), GridLength.Star(1)) // toolbar + body .RowGap(1) .Place(Controls.Markup("[bold]Dashboard[/]").Build(), 0, 0, colSpan: 2) .Place(sidebarList, 1, 0) .Place(dataTable, 1, 1) .Build(); window.AddControl(grid);
See references/recipes.md for full grid/table/form/dialog examples and references/controls.md for the control chosen per region.
Console.Write into a running app..Result / .Wait() on async work inside a handler (it deadlocks the loop). Push blocking/CPU work off-thread and marshal UI mutations back with EnqueueOnUIThread / InvokeAsync. See references/architecture.md.Dialogs for confirm/prompt/progress, instead of hand-positioning windows. See references/recipes.md.Roles (Primary, Success, Danger, …) so colors come from the active theme instead of being hand-set.[tag]text[/] markup — it works everywhere text renders (labels, titles, status bars, table cells, tree nodes), including [markdown], [gradient=…], and inline [spinner]. Escape untrusted text with MarkupParser.Escape(...). See references/markup.md.Controls.* factory + fluent builders over manual control construction for consistent wiring.references/app-patterns.md: one maximized window with content-swap navigation, an app-owned header/hint bar, custom awaitable modals closed via CloseModalWindow, dialogs clamped to DesktopDimensions, a semantic color/theme layer (no hardcoded hex), and a wrapper so no async action can crash the loop.Console.WriteLine output. Small non-interactive tools do not need it.TerminalControl (the embedded PTY emulator) runs on Linux and Windows 10 1809+ (openpty on Linux, ConPTY on Windows); it throws PlatformNotSupportedException on other OSes. On Linux it requires PtyShim.RunIfShim(args) as the very first line of Main (a safe no-op on Windows) — see references/controls.md.IsAotCompatible and CI-verified), but confirm your own reflection/serialization code is trim/AOT-safe; HtmlControl is the one documented AOT caveat. See references/architecture.md.dotnet add package SharpConsoleUI restores and the project compiles.references/recipes.md renders correctly.references/controls.md (correct factory/API).[tag]text[/] markup language (colors, decorations, links, [spinner], [markdown], [gradient], MarkupParser API). Markup works everywhere text renders — load this for any styled-text work.Other measured skills in the registry, with their headline benchmark lift.