mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-27 00:07:58 +01:00
1.2 KiB
1.2 KiB
Getting Started
Paste these commands into your favorite terminal on Windows, Mac, or Linux. This will install the Terminal.Gui.Templates, create a new "Hello World" TUI app, and run it.
(Press Esc to exit the app)
dotnet new --install Terminal.Gui.templates
dotnet new tui -n myproj
cd myproj
dotnet run
Adding Terminal.Gui to a Project
To install Terminal.Gui from Nuget into a .NET Core project, use the dotnet CLI tool with this command.
dotnet add package Terminal.Gui
Using the Templates
Use the Terminal.Gui.Templates.
Sample Usage in C#
The following example shows a basic Terminal.Gui application in C# (this is ./Example/Example.cs):
[!code-csharpProgram.cs]
When run the application looks as follows:
Building the Library and Running the Examples
- Windows, Mac, and Linux - Build and run using the .NET SDK command line tools (
dotnet buildin the root directory). RunUICatalogwithdotnet run --project UICatalog. - Windows - Open
Terminal.slnwith Visual Studio 202x.
