Sharpconsoleui logo

Sharpconsoleui

Organization
managedcode
sharpconsoleui

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 flicker-free rendering over local terminals or SSH; NativeAOT console tools. DO NOT USE FOR: simple line-based CLI output or argument parsing; non-interactive scripts; GUI/desktop (WPF/WinForms) or web UIs. INVOKES: inspect the project, add the SharpConsoleUI package, scaffold a window/control tree, and build/run to verify the app renders.

Overview

Publishermanagedcode
Repositorydotnet-skills
Skill namesharpconsoleui
Stars
492
Forks
38
Bundled files
8
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 8 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by managedcode on GitHub. Read the source before you install it.

Installation

Install the Sharpconsoleui AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/managedcode/dotnet-skills/tree/main/catalog/Frameworks/SharpConsoleUI/skills/sharpconsoleui
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/managedcode/dotnet-skills.git /tmp/dotnet-skills
mkdir -p .claude/skills
cp -r /tmp/dotnet-skills/catalog/Frameworks/SharpConsoleUI/skills/sharpconsoleui .claude/skills/sharpconsoleui
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Sharpconsoleui in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Sharpconsoleui on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Sharpconsoleui is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

SharpConsoleUI terminal application framework

Trigger On

  • building an interactive terminal UI: dashboards, wizards, settings screens, admin/monitoring consoles
  • building a full-screen single-window TUI: a .Frameless() (no title bar, no title buttons) + .Maximized() app that owns the whole terminal
  • building a multi-window terminal desktop: overlapping windows with drag/resize/minimize/maximize, z-order, focus routing, modal windows, and mouse support (full-screen and multi-window are equally first-class here)
  • wanting flicker-free rendering that stays clean over SSH (diff-based cell buffer, not full repaints)
  • needing rich terminal controls: data tables, tree/list views, forms, an embedded PTY terminal, markdown, charts, or video
  • shipping a NativeAOT-ready console application with a real UI

Do not trigger for plain line-based CLI tools, argument parsing, or non-interactive scripts.

Install

Workflow

  1. Create a NetConsoleDriver and a ConsoleWindowSystem that owns all windows.
  2. Build one or more windows with WindowBuilder (title, size, position, borders, padding).
  3. Add controls to each window with window.AddControl(...), usually via the Controls static factory.
  4. Wire interactivity through control events (e.g. Button.OnClick); call windowSystem.Shutdown() to exit.
  5. windowSystem.AddWindow(window) then windowSystem.Run() starts the render/input loop (blocks until shutdown).
  6. For layout, dialogs, portals/overlays, forms, and the full control set, load the reference files below.

Minimal app (read + show + interact)

csharp
using 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();

Layout + data example

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:

csharp
var 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.

Best practices

  • Describe the UI declaratively (retained mode). Let the framework own redraws, focus, and input — do not mix raw Console.Write into a running app.
  • The app runs on one cooperative UI thread. Never block it: don't call .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.
  • Use portals for dropdowns, overlays, and toasts, and the built-in Dialogs for confirm/prompt/progress, instead of hand-positioning windows. See references/recipes.md.
  • Apply semantic control Roles (Primary, Success, Danger, …) so colors come from the active theme instead of being hand-set.
  • Style all text with [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.
  • Prefer Controls.* factory + fluent builders over manual control construction for consistent wiring.
  • For a full app (not a single screen), follow the production patterns in 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.

Limitations to check before production

  • It is a full retained-mode application framework, not a drop-in for one-off Console.WriteLine output. Small non-interactive tools do not need it.
  • Cooperative single-threaded UI model: unsynchronized cross-thread control mutation, or blocking the UI thread on async work, is a bug — not a shortcut.
  • 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.
  • Advanced media (video, Kitty-graphics image rendering) auto-detects terminal capability and degrades to half-block/ASCII/braille fallbacks; verify on the target terminal.
  • NativeAOT is supported (the library is 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.

Deliver

  • an install + first-run guide ready to paste into a .NET console project
  • a minimal window app and a layout/data example that actually render
  • clear notes on the threading model, portals/dialogs, and terminal-capability tradeoffs

Validate

  • dotnet add package SharpConsoleUI restores and the project compiles.
  • The minimal app above builds and runs, showing a centered window with a working Quit button (Tab to focus, Enter/click to quit).
  • One layout/control sample from references/recipes.md renders correctly.
  • Any control used is confirmed against references/controls.md (correct factory/API).

Load References

  • Control reference — the 40+ control set grouped by purpose, with the factory/API entry point and a "use when" for each group.
  • Markup reference — the [tag]text[/] markup language (colors, decorations, links, [spinner], [markdown], [gradient], MarkupParser API). Markup works everywhere text renders — load this for any styled-text work.
  • Architecture reference — compositor, DOM layout pipeline, cooperative UI-thread model, marshalling, and NativeAOT notes.
  • Recipe reference — full-screen and multi-window apps, window builders, grids, dialogs, portals/toasts, and forms, with verified code.
  • Feature reference — gradients, transparency/alpha blending, compositor effects, animations, desktop background, and image/video/syntax-highlighting rendering.
  • System reference — constructor overloads, state services, panels, configuration, registry, MVVM data binding, flows, plugins, clipboard, shell-pipeline/schost distribution, and the "when to choose this framework" comparison + pattern catalog.
  • Application-pattern reference — how to structure and polish a real production app: single-window shell + content-swap navigation, own-your-header, custom awaitable modals, live process output, the semantic color/theme layer, escaping untrusted text, threading discipline, and a never-crash wrapper. Load this when building a full app, not just one screen.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Sharpconsoleui AI skill do?

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 flicker-free rendering over local terminals or SSH; NativeAOT console tools. DO NOT USE FOR: simple lin...

Why use Sharpconsoleui on TypingMind?

Because you install it once and use it with any model. Sharpconsoleui is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Sharpconsoleui in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/managedcode/dotnet-skills/tree/main/catalog/Frameworks/SharpConsoleUI/skills/sharpconsoleui. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Sharpconsoleui?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Sharpconsoleui?

As many as you like. As long as a model supports skills, you can use Sharpconsoleui with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Sharpconsoleui AI skill free?

Yes. It is published on GitHub by managedcode under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇