TimeWarp.Terminal 1.0.0-beta.1

Prefix Reserved
This is a prerelease version of TimeWarp.Terminal.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package TimeWarp.Terminal --version 1.0.0-beta.1
                    
NuGet\Install-Package TimeWarp.Terminal -Version 1.0.0-beta.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="TimeWarp.Terminal" Version="1.0.0-beta.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TimeWarp.Terminal" Version="1.0.0-beta.1" />
                    
Directory.Packages.props
<PackageReference Include="TimeWarp.Terminal" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add TimeWarp.Terminal --version 1.0.0-beta.1
                    
#r "nuget: TimeWarp.Terminal, 1.0.0-beta.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package TimeWarp.Terminal@1.0.0-beta.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=TimeWarp.Terminal&version=1.0.0-beta.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=TimeWarp.Terminal&version=1.0.0-beta.1&prerelease
                    
Install as a Cake Tool

TimeWarp.Terminal

Terminal abstractions and widgets for console applications - IConsole, ITerminal, panels, tables, rules, and ANSI color support.

Interfaces

IConsole

Basic console I/O abstraction for testable console applications.

public interface IConsole
{
    void Write(string message);
    void WriteLine(string? message = null);
    void WriteErrorLine(string? message = null);
    string? ReadLine();
}

ITerminal

Extended terminal interface with cursor control, colors, and hyperlinks.

public interface ITerminal : IConsole
{
    ConsoleKeyInfo ReadKey(bool intercept);
    void SetCursorPosition(int left, int top);
    (int Left, int Top) GetCursorPosition();
    int WindowWidth { get; }
    bool IsInteractive { get; }
    bool SupportsColor { get; }
    bool SupportsHyperlinks { get; }
    void Clear();
}

Implementations

Class Description
NuruConsole Production IConsole wrapping System.Console
NuruTerminal Production ITerminal with full terminal capabilities
TestConsole Test implementation with captured output
TestTerminal Test implementation for interactive scenarios

Testing Example

var terminal = new TestTerminal();
terminal.QueueInput("user input");

// Run code that uses ITerminal
myCommand.Execute(terminal);

// Verify output
Assert.Contains("expected text", terminal.GetOutput());

Widgets

Panel

Bordered panel with title and content.

terminal.WritePanel(panel => panel
    .WithTitle("Status")
    .WithContent("All systems operational")
    .WithBorder(BorderStyle.Rounded));

Table

Formatted table with columns and rows.

terminal.WriteTable(table => table
    .AddColumn("Name")
    .AddColumn("Value")
    .AddRow("CPU", "45%")
    .AddRow("Memory", "2.1 GB"));

Rule

Horizontal rule with optional title.

terminal.WriteRule(rule => rule
    .WithTitle("Section")
    .WithStyle(LineStyle.Double));

ANSI Colors

Extension methods for colored console output.

terminal.WriteLine("Success!".Green());
terminal.WriteLine("Warning!".Yellow().Bold());
terminal.WriteLine("Error!".Red().OnWhite());

Available Colors

Black, Red, Green, Yellow, Blue, Magenta, Cyan, White

Bright variants: BrightRed, BrightGreen, etc.

Styles

Bold(), Dim(), Italic(), Underline(), Strikethrough()

Background Colors

OnRed(), OnGreen(), OnBlue(), etc.

Terminal hyperlinks (OSC 8) for supported terminals.

terminal.WriteHyperlink("Click here", "https://example.com");

// Or using extension method
terminal.WriteLine("Visit ".WithHyperlink("our site", "https://example.com"));
Product Compatible and additional computed target framework versions.
.NET 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on TimeWarp.Terminal:

Package Downloads
TimeWarp.Nuru

Route-based CLI framework for .NET - batteries included with telemetry, REPL, and shell completion

TimeWarp.Nuru.Core

Core library for TimeWarp.Nuru CLI framework - slim foundation with CreateSlimBuilder() for minimal CLIs

TimeWarp.Amuru

Fluent API for elegant C# scripting with pipeline support

TimeWarp.Jaribu

Lightweight testing helpers for single-file C# programs and scripts. Jaribu (Swahili: test/trial) provides TestRunner pattern and assertion helpers for executable .cs files.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0-beta.12 172 3/22/2026
1.0.0-beta.11 36 3/22/2026
1.0.0-beta.10 44 3/19/2026
1.0.0-beta.9 40 3/18/2026
1.0.0-beta.7 187 2/22/2026
1.0.0-beta.6 54 2/22/2026
1.0.0-beta.5 729 2/14/2026
1.0.0-beta.4 187 2/6/2026
1.0.0-beta.3 57 2/5/2026
1.0.0-beta.2 439 12/23/2025
1.0.0-beta.1 152 12/22/2025