Skip to content
ConsoleMonster

Everyday output in one line. The monster when you need it.

ConsoleMonster makes the output of the commands you already run readable, and draws tables, trees, charts, live runs, dashboards, menus and forms when you need more. One engine for .NET and PowerShell 5.1 and 7, with no package dependencies and plain lines when the output is a log.

Install-Module ConsoleMonster -Scope CurrentUser
  • No dependencies
  • PowerShell 5.1 and 7
  • netstandard2.0, net472, net8.0, net10.0
  • MIT licence
  • v2.4.2

Better output for the commands you already run: one line turns it on for the session.

Everyday PowerShell output
Enable-ConsoleFormatting 100×4024-bitFull

Shows PowerShell's own output, then the same service inventory, version and dictionary after Enable-ConsoleFormatting. It plays once when it comes into view and stops on the after view; Play runs it again. Before and After under the player jump to each half. Recorded at an interactive PowerShell 7 prompt from the script in the tab beside it.

Two lines

PowerShell
# 1. Install once
Install-Module ConsoleMonster -Scope CurrentUser

# 2. Turn it on for this session
Enable-ConsoleFormatting

# 3. Keep it on: paste the lines this prints into your profile (notepad $PROFILE), then open a new session
Enable-ConsoleFormatting -ProfileSnippet

Everyday

You don't need both. Formatting changes what you already type; Show-Console* is for when you want control.

Make everything nicer, automatically

Turn on formatting, then use your normal PowerShell commands. See the same output before and after.

Enable-ConsoleFormatting; Get-Process

Show any objects exactly how you want

Choose the columns and groups for a particular result. The explicit commands are safe to use in scripts.

$objects | Show-ConsoleTable -Property Name, Site, State -GroupBy Site

Monster

Complete console applications: an admin tool with menus and forms, live dashboards, parallel runs and test runs, recorded and replayed.

One engine for C# and PowerShell

The module's cmdlets are a thin layer over the same .NET library. Both programs shown here ran for this page, the script on Windows PowerShell 5.1 and PowerShell 7 and the C# program on .NET 8, each 92 columns wide, and every cell they drew was compared.

Show-ConsoleTable 92 columns24-bitFull

Drawn identically by C# on .NET 8 PowerShell 7.6 Windows PowerShell 5.1

PowerShellcontrollers.ps1
$controllers = @(
    [pscustomobject] @{ Name = 'DC01.ad.adatum.com'; Site = 'Warsaw'; Status = 'Pass'; Latency = 12
        LastSync = [timespan]::FromSeconds(42) }
    # … 6 more lines in the full program
)
$controllers | Show-ConsoleTable -Title '[bold]Domain controllers[/]' -Property @(
    @{ Name = 'Name'; Key = $true }
    @{ Name = 'Site'; Priority = 2 }
    @{ Name = 'Status'; Presenter = 'Status'; Priority = 9 }
    @{ Name = 'Latency'; Presenter = 'Number'; Unit = 'ms'; Priority = 5; WarnAbove = 100 }
    @{ Name = 'LastSync'; Header = 'Last sync'; Presenter = 'Duration'; Priority = 4 }
)
Full program
Import-Module ConsoleMonster

$controllers = @(
    [pscustomobject] @{ Name = 'DC01.ad.adatum.com'; Site = 'Warsaw'; Status = 'Pass'; Latency = 12
        LastSync = [timespan]::FromSeconds(42) }
    [pscustomobject] @{ Name = 'DC02.ad.adatum.com'; Site = 'Warsaw'; Status = 'Warn'; Latency = 140
        LastSync = [timespan]::FromMinutes(42) }
    [pscustomobject] @{ Name = 'DC03.eu.ad.adatum.com'; Site = 'Dublin'; Status = 'Pass'
        Latency = 31; LastSync = [timespan]::FromSeconds(64) }
    [pscustomobject] @{ Name = 'DC04.eu.ad.adatum.com'; Site = 'Dublin'; Status = 'Fail'
        Latency = 0; LastSync = [timespan]::FromHours(4) }
)
$controllers | Show-ConsoleTable -Title '[bold]Domain controllers[/]' -Property @(
    @{ Name = 'Name'; Key = $true }
    @{ Name = 'Site'; Priority = 2 }
    @{ Name = 'Status'; Presenter = 'Status'; Priority = 9 }
    @{ Name = 'Latency'; Presenter = 'Number'; Unit = 'ms'; Priority = 5; WarnAbove = 100 }
    @{ Name = 'LastSync'; Header = 'Last sync'; Presenter = 'Duration'; Priority = 4 }
)
C#Program.cs
DomainController[] controllers =
{
    new("DC01.ad.adatum.com", "Warsaw", StatusKind.Pass, 12, TimeSpan.FromSeconds(42)),
    // … 2 more lines in the full program
    new("DC04.eu.ad.adatum.com", "Dublin", StatusKind.Fail, 0, TimeSpan.FromHours(4))
};
var table = Table.For(controllers);
table.Title = "[bold]Domain controllers[/]";
table.Column(c => c.Name, c =>
{
    c.IsKey = true;
}).Column(c => c.Site, c =>
{
    c.Priority = 2;
}).Column(c => c.Status, c =>
{
    c.Presenter = CellPresenters.Status;
    c.Priority = 9;
}).Column(c => c.Latency, c =>
{
    c.Presenter = new NumberPresenter("ms");
    c.Priority = 5;
    c.AddRoleRules(RoleRule.Above(100, ThemeToken.Warn));
}).Column(c => c.LastSync, c =>
{
    c.Header = "Last sync";
    c.Presenter = CellPresenters.Duration;
    c.Priority = 4;
});
Terminal.Write(table);

record DomainController(string Name, string Site, StatusKind Status, int Latency,
    TimeSpan LastSync);
Full program
using ConsoleMonster;
using ConsoleMonster.Presenters;
using ConsoleMonster.Styling;
using ConsoleMonster.Widgets;

DomainController[] controllers =
{
    new("DC01.ad.adatum.com", "Warsaw", StatusKind.Pass, 12, TimeSpan.FromSeconds(42)),
    new("DC02.ad.adatum.com", "Warsaw", StatusKind.Warn, 140, TimeSpan.FromMinutes(42)),
    new("DC03.eu.ad.adatum.com", "Dublin", StatusKind.Pass, 31, TimeSpan.FromSeconds(64)),
    new("DC04.eu.ad.adatum.com", "Dublin", StatusKind.Fail, 0, TimeSpan.FromHours(4))
};
var table = Table.For(controllers);
table.Title = "[bold]Domain controllers[/]";
table.Column(c => c.Name, c =>
{
    c.IsKey = true;
}).Column(c => c.Site, c =>
{
    c.Priority = 2;
}).Column(c => c.Status, c =>
{
    c.Presenter = CellPresenters.Status;
    c.Priority = 9;
}).Column(c => c.Latency, c =>
{
    c.Presenter = new NumberPresenter("ms");
    c.Priority = 5;
    c.AddRoleRules(RoleRule.Above(100, ThemeToken.Warn));
}).Column(c => c.LastSync, c =>
{
    c.Header = "Last sync";
    c.Presenter = CellPresenters.Duration;
    c.Priority = 4;
});
Terminal.Write(table);

record DomainController(string Name, string Site, StatusKind Status, int Latency,
    TimeSpan LastSync);

Readable on every console

ConsoleMonster detects the colour depth and which glyphs the console font can draw, and every widget renders at each level. Status never depends on colour alone: without colour, the symbol and the word remain.

  • 24-bit, 256 and 16 colours, or none
  • Full, Basic and ASCII glyph sets; on conhost the font decides
  • NO_COLOR and the CONSOLEMONSTER_COLOR, _GLYPHS, _MODE and _THEME overrides

Switch tiers on every widget

24-bit colour 24-bitFull
256 colour 256Full
16 colour 16Basic
NO_COLOR No colourASCII
The program behind all four
C#Program.cs
// One assessment summary: phases, results as a stacked bar and the rule rate as a sparkline, in a panel.
double[] rate = { 18, 21, 19, 24, 27, 26, 31, 29, 34, 38, 36, 41, 39, 44, 47, 45, 50, 48, 53, 57 };
Terminal.Write(new Panel(
    new Rows()
        .Add(new Phases()
            .Set("Discover", StatusKind.Pass, default, "2.1s")
            .Set("Collect", StatusKind.Pass, default, "14s")
            .Set("Evaluate", StatusKind.Running, default, "64%"))
        .Add(new StackedBar()
            .Add("Passed", 412, ThemeToken.Pass)
            .Add("Warnings", 51, ThemeToken.Warn)
            .Add("Failed", 23, ThemeToken.Fail)
            .Add("Skipped", 14, ThemeToken.Skip))
        .Add(new Sparkline() { Title = "rules/s", Unit = "/s" }.AddRange(rate)),
    "[bold]Nightly checks[/]") { HeaderRight = "lab01.contoso.com" });
Full program
using ConsoleMonster;
using ConsoleMonster.Layout;
using ConsoleMonster.Styling;
using ConsoleMonster.Widgets;

// One assessment summary: phases, results as a stacked bar and the rule rate as a sparkline, in a panel.
double[] rate = { 18, 21, 19, 24, 27, 26, 31, 29, 34, 38, 36, 41, 39, 44, 47, 45, 50, 48, 53, 57 };
Terminal.Write(new Panel(
    new Rows()
        .Add(new Phases()
            .Set("Discover", StatusKind.Pass, default, "2.1s")
            .Set("Collect", StatusKind.Pass, default, "14s")
            .Set("Evaluate", StatusKind.Running, default, "64%"))
        .Add(new StackedBar()
            .Add("Passed", 412, ThemeToken.Pass)
            .Add("Warnings", 51, ThemeToken.Warn)
            .Add("Failed", 23, ThemeToken.Fail)
            .Add("Skipped", 14, ThemeToken.Skip))
        .Add(new Sparkline() { Title = "rules/s", Unit = "/s" }.AddRange(rate)),
    "[bold]Nightly checks[/]") { HeaderRight = "lab01.contoso.com" });

Tables that fit the window

Tables negotiate their width instead of overflowing it. This is the table above at 44 columns: below 60 cells, when the columns no longer fit, each row becomes a card titled with its key.

  • Columns hide by priority, and a footer names the hidden ones
  • Text wraps after separators, so paths and DNS names break where you would break them
  • A single record renders as a record view

Change the width on the tables page

the same table 44×2524-bitFull

Live dashboards from many threads

A live session takes updates from any thread through a lock-free queue and draws about 15 frames a second, writing only the cells that changed. Console output and PowerShell streams are captured into a log region instead of tearing the screen.

Frames per second under load
15.0
Updates per second
80,210
Render cost per frame
1.045 ms
Updates dropped
0

Measured during the recorded runs: the stress test program (32 workers, with stray Console.WriteLine calls) and the benchmark program. The programs and their run steps · the benchmarks.

On a console

dotnet run 110×3224-bitFull

In CI and redirected output

CONSOLEMONSTER_MODE=stream 100 columnsstream mode

Where to go next

The gallery has 29 widget examples with their PowerShell and C# source, the module has 118 cmdlets with full help, and the .NET API is documented type by type.