dotnet-terminal-gui
БесплатноБез исполняемых скриптовНе проверенBuilding full TUI apps. Terminal.Gui v2: views, layout (Pos/Dim), menus, dialogs, bindings, themes.
от wshaddix★ 94 звезды на GitHubОб этом скилле
dotnet-terminal-gui
Terminal.Gui v2 for building full terminal user interfaces with windows, menus, dialogs, views, layout, event handling, color themes, and mouse support. Cross-platform across Windows, macOS, and Linux terminals.
Version assumptions: .NET 8.0+ baseline. Terminal.Gui 2.0.0-alpha (v2 Alpha is the active development line for new projects -- API is stable with comprehensive features; breaking changes possible before Beta but core architecture is solid). v1.x (1.19.0) is in maintenance mode with no new features.
Scope boundary: This skill owns full TUI application development with Terminal.Gui -- application lifecycle, layout, views, menus, dialogs, event handling, themes. Rich console output (tables, progress bars, prompts, markup) is owned by [skill:dotnet-spectre-console]. CLI command-line parsing is owned by [skill:dotnet-system-commandline]. CLI application architecture and distribution are owned by [skill:dotnet-cli-architecture] and [skill:dotnet-cli-distribution].
Cross-references: [skill:dotnet-spectre-console] for rich console output alternative, [skill:dotnet-csharp-async-patterns] for async TUI patterns, [skill:dotnet-native-aot] for AOT compilation considerations, [skill:dotnet-system-commandline] for CLI parsing, [skill:dotnet-csharp-dependency-injection] for DI in TUI apps, [skill:dotnet-accessibility] for TUI accessibility limitations and screen reader considerations.
Package Reference
<ItemGroup>
<!-- v2 Alpha -- recommended for new projects -->
<PackageReference Include="Terminal.Gui" Version="2.0.0-alpha.*" />
</ItemGroup>
Terminal.Gui v2 targets .NET 8+ and .NET Standard 2.0/2.1. For v1 maintenance projects, use Version="1.19.*".
Application Lifecycle
Terminal.Gui v2 uses an instance-based model with IApplication and IDisposable for proper resource cleanup. This replaces v1's static Application.Init() / Application.Run() / Application.Shutdown() pattern.
Basic Application
using Terminal.Gui;
// Create and initialize the application (instance-based in v2)
using IApplication app = Application.Create().Init();
var window = new Window
{
Title = "My TUI App",
Width = Dim.Fill(),
Height = Dim.Fill()
};
var label = new Label
{
Text = "Hello, Terminal.Gui!",
X = Pos.Center(),
Y = Pos.Center()
};
window.Add(label);
app.Run(window);
Application with Typed Result
using IApplication app = Application.Create().Init();
// Run a dialog and get a typed result
app.Run<MyInputDialog>();
string? result = app.GetResult<string>();
Lifecycle Events
// IsRunningChanging -- cancellable, fires before state change
// IsRunningChanged -- non-cancellable, fires after state change
window.IsRunningChanged += (sender, args) =>
{
if (!args.NewValue)
{
// Window is closing -- clean up resources
}
};
Layout System
Terminal.Gui v2 unifies layout into a single model (v1's Absolute/Computed distinction is removed). Position is controlled by Pos (X, Y) and size by Dim (Width, Height), both relative to the SuperView's content area.
Pos Types (Positioning)
// Absolute -- fixed coordinate
view.X = 5; // Pos.Absolute(5)
// Percent -- percentage of parent
view.X = Pos.Percent(25); // 25% from left
// Center -- centered in parent
view.X = Pos.Center();
// AnchorEnd -- anchored from right/bottom edge
view.X = Pos.AnchorEnd(10); // 10 from right edge
// Relative to another view
view.X = Pos.Right(otherView) + 1; // 1 right of otherView
view.Y = Pos.Bottom(otherView) + 1; // 1 below otherView
view.X = Pos.Left(otherView); // aligned left with otherView
view.Y = Pos.Top(otherView); // aligned top with otherView
// Align -- align groups of views
view.X = Pos.Align(Alignment.End); // right-align (e.g., dialog buttons)
// Func -- custom function
view.X = Pos.Func(() => CalculateX());
// Arithmetic
view.X = Pos.Center() - 10;
view.Y = Pos.Bottom(label) + 2;
Dim Types (Sizing)
// Absolute -- fixed size
view.Width = 40; // Dim.Absolute(40)
// Percent -- percentage of parent
view.Width = Dim.Percent(50); // 50% of parent width
// Fill -- fill remaining space
view.Width = Dim.Fill(); // fill to right edge
view.Width = Dim.Fill(2); // fill minus 2 (margin)
// Auto -- size based on content (replaces v1's AutoSize)
view.Width = Dim.Auto();
view.Width = Dim.Auto(minimumContentDim: 20);
// Relative to another view
view.Width = Dim.Width(otherView);
view.Height = Dim.Height(otherView);
// Func -- custom function
view.Width = Dim.Func(() => CalculateWidth());
// Arithmetic
view.Width = Dim.Fill() - 10;
view.Height = Dim.Height(label) + 2;
Frame vs. Viewport
- Frame -- outermost rectangle: location and size relative to SuperView
- Viewport -- visible portion of conten
Установить dotnet-terminal-gui в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл dotnet-terminal-gui?
Building full TUI apps. Terminal.Gui v2: views, layout (Pos/Dim), menus, dialogs, bindings, themes.
Как установить скилл dotnet-terminal-gui?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл dotnet-terminal-gui запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic