LiveRun monitors work scheduled by your application or script. Each finished item prints once above an inline dashboard, so completed work stays in normal terminal scrollback. The dashboard occupies at most 40% of terminal height by default.
Try it
This example reports two illustrative outcomes without contacting either target. Replace the comments and updates with your own checks. Choose PowerShell or C#; the output comes from the C# program with a fixed clock, while PowerShell shows the time your script takes.
Install-Module ConsoleMonster -Scope CurrentUser$checks = @(
[pscustomobject]@{ Name = 'Read inventory'; Target = 'node-01'; Category = 'Inventory' }
[pscustomobject]@{ Name = 'Check storage'; Target = 'node-02'; Category = 'Storage' }
)
$run = New-ConsoleRun -Items $checks -Name Name -Target Target -Group { $_.Category } -Title 'Fleet checks'
try {
Update-ConsoleRun $run -Index 0 -State Running -Phase 'collecting'
# Run your inventory check here, then report its result.
Update-ConsoleRun $run -Index 0 -State Pass
Update-ConsoleRun $run -Index 1 -State Running -Phase 'evaluating'
Update-ConsoleRun $run -Index 1 -State Warn -Message 'Free space is below the preferred threshold'
} finally {
$summary = Complete-ConsoleRun $run -PassThru
}Full program
Import-Module ConsoleMonster
$checks = @(
[pscustomobject]@{ Name = 'Read inventory'; Target = 'node-01'; Category = 'Inventory' }
[pscustomobject]@{ Name = 'Check storage'; Target = 'node-02'; Category = 'Storage' }
)
$run = New-ConsoleRun -Items $checks -Name Name -Target Target -Group { $_.Category } -Title 'Fleet checks'
try {
Update-ConsoleRun $run -Index 0 -State Running -Phase 'collecting'
# Run your inventory check here, then report its result.
Update-ConsoleRun $run -Index 0 -State Pass
Update-ConsoleRun $run -Index 1 -State Running -Phase 'evaluating'
Update-ConsoleRun $run -Index 1 -State Warn -Message 'Free space is below the preferred threshold'
} finally {
$summary = Complete-ConsoleRun $run -PassThru
}Run: ./large-run.ps1
dotnet new console -n FleetChecks
cd FleetChecks
dotnet add package ConsoleMonsterusing (LiveRun run = new LiveRun(new[] {
new RunItem("Read inventory", "node-01", "Inventory"),
new RunItem("Check storage", "node-02", "Storage")
}, new LiveRunOptions {
Title = "Fleet checks",
ProgressInterval = TimeSpan.Zero,
// The preview fixes time; omit Clock when monitoring real work.
Clock = () => TimeSpan.Zero
})) {
run.Started(0, "collecting");
run.Finished(0, StatusKind.Pass, duration: TimeSpan.FromSeconds(1.2));
run.Started(1, "evaluating");
run.Finished(1, StatusKind.Warn, "Free space is below the preferred threshold", TimeSpan.FromSeconds(2.4));
RunSnapshot summary = run.Complete();
}Full program
using ConsoleMonster.Live;
using ConsoleMonster.Styling;
using (LiveRun run = new LiveRun(new[] {
new RunItem("Read inventory", "node-01", "Inventory"),
new RunItem("Check storage", "node-02", "Storage")
}, new LiveRunOptions {
Title = "Fleet checks",
ProgressInterval = TimeSpan.Zero,
// The preview fixes time; omit Clock when monitoring real work.
Clock = () => TimeSpan.Zero
})) {
run.Started(0, "collecting");
run.Finished(0, StatusKind.Pass, duration: TimeSpan.FromSeconds(1.2));
run.Started(1, "evaluating");
run.Finished(1, StatusKind.Warn, "Free space is below the preferred threshold", TimeSpan.FromSeconds(2.4));
RunSnapshot summary = run.Complete();
}Run: dotnet run
✓ Read inventory node-01 1.2s ▴ Check storage node-02 Free space is below the preferred threshold 2.4s Fleet checks · 2 / 2 finished · 0ms ✓ 1 passed · ✗ 0 failed · ▴ 1 warnings · – 0 skipped Groups ╭───────────┬──────┬────────┬────────┬──────────┬─────────╮ │ Group │ Done │ Passed │ Failed │ Warnings │ Skipped │ ├───────────┼──────┼────────┼────────┼──────────┼─────────┤ │ Inventory │ 1/1 │ 1 │ 0 │ 0 │ 0 │ │ Storage │ 1/1 │ 0 │ 0 │ 1 │ 0 │ ╰───────────┴──────┴────────┴────────┴──────────┴─────────╯ Problems Check storage Item Check storage Target node-02 State ▴ WARN Duration 2.4s Message Free space is below the preferred threshold
✓ Read inventory node-01 1.2s ▴ Check storage node-02 Free space is below the preferred threshold 2.4s Fleet checks · 2 / 2 finished · 0ms ✓ 1 passed · ✗ 0 failed · ▴ 1 warnings · – 0 skipped Groups ╭───────────┬──────┬────────┬────────┬──────────┬─────────╮ │ Group │ Done │ Passed │ Failed │ Warnings │ Skipped │ ├───────────┼──────┼────────┼────────┼──────────┼─────────┤ │ Inventory │ 1/1 │ 1 │ 0 │ 0 │ 0 │ │ Storage │ 1/1 │ 0 │ 0 │ 1 │ 0 │ ╰───────────┴──────┴────────┴────────┴──────────┴─────────╯ Problems Check storage Item Check storage Target node-02 State ▴ WARN Duration 2.4s Message Free space is below the preferred threshold
How it works
Declare the items, report state changes, then complete the run in finally. The monitor leaves your script's output and exit code alone:
$run = New-ConsoleRun -Items $checks -Name Name -Target Target -Group { $_.Category }
try {
Update-ConsoleRun $run -Index 0 -State Running -Phase 'collecting'
Update-ConsoleRun $run -Index 0 -State Pass
} finally {
$summary = Complete-ConsoleRun $run -PassThru
}
-Name, -Target and -Group accept property names or script blocks. Item positions start at zero. Running updates can change the phase without restarting elapsed time. Pass, Fail, Warn and Skip finish an item once. In C#, the handle's Started and Finished methods accept calls from worker threads.
The larger previews below show 214 illustrative checks with eight active workers partway through a run. Their C# scene is also used by the golden-frame tests:
✓ Service health 108 node-12 4.2s ✓ Certificate expiry 109 node-13 1.2s ✓ Route reachability 110 node-14 2.2s ✓ Volume permissions 111 node-15 3.2s ✓ Time synchronisation 112 node-16 4.2s ✓ Directory replication 113 node-01 1.2s ✓ DNS records 114 node-02 2.2s ✓ Free disk space 115 node-03 3.2s ✓ Service health 116 node-04 4.2s ✓ Certificate expiry 117 node-05 1.2s ✓ Route reachability 118 node-06 2.2s ✓ Volume permissions 119 node-07 3.2s ✓ Time synchronisation 120 node-08 4.2s ✓ Directory replication 121 node-09 1.2s ✓ DNS records 122 node-10 2.2s ✓ Free disk space 123 node-11 3.2s ✓ Service health 124 node-12 4.2s ✓ Certificate expiry 125 node-13 1.2s ✓ Route reachability 126 node-14 2.2s ✓ Volume permissions 127 node-15 3.2s ✓ Time synchronisation 128 node-16 4.2s ✓ Directory replication 129 node-01 1.2s ✓ DNS records 130 node-02 2.2s ✓ Free disk space 131 node-03 3.2s ✓ Service health 132 node-04 4.2s ✓ Certificate expiry 133 node-05 1.2s ▴ Route reachability 134 node-06 A partial response was returned; review the … 2.2s ✓ Volume permissions 135 node-07 3.2s ✓ Time synchronisation 136 node-08 4.2s ✗ Directory replication 137 node-09 Endpoint did not answer within the configure… 1.2s ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── Fleet checks ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━───────────────────────────────── 64% 137/214 Elapsed 1m 40s · ETA 1m 37s · 47.2/min ▂▂▂▂▂▃▃▅▆▇▇▁ ✓ 125 passed · ✗ 4 failed · ▴ 3 warnings · – 5 skipped Running now · 8 workers ⠼ DNS records 138 · node-10 · collecting 4.0s ⠼ Free disk space 139 · node-11 · evaluating 3.8s ⠼ Service health 140 · node-12 · collecting 3.6s ⠼ Certificate expiry 141 · node-13 · evaluating 3.4s ⠼ Route reachability 142 · node-14 · collecting 3.2s ⠼ Volume permissions 143 · node-15 · evaluating 3.0s ⠼ Time synchronisation 144 · node-16 · collecting 2.8s ⠼ Directory replication 145 · node-01 · evaluating 2.6s Up next · 69 queued DNS records 146 · node-02 · + 68 queued Groups Identity ━━━━━━━━━━━━━━━━──────── 35/54 ✓32 ✗1 ▴0 Network ━━━━━━━━━━━━━━━───────── 34/54 ✓31 ✗0 ▴2 Storage ━━━━━━━━━━━━━━━───────── 34/53 ✓32 ✗1 ▴0 Services ━━━━━━━━━━━━━━━───────── 34/53 ✓30 ✗2 ▴1 Problems so far · 7 · + 5 more ▴ Route reachability 134 · node-06: A partial response was returned; review the detailed report. ✗ Directory replication 137 · node-09: Endpoint did not answer within the configured deadline. Check the connection and… p log · f all · g groups · ? help
✓ Service health 108 node-12 4.2s ✓ Certificate expiry 109 node-13 1.2s ✓ Route reachability 110 node-14 2.2s ✓ Volume permissions 111 node-15 3.2s ✓ Time synchronisation 112 node-16 4.2s ✓ Directory replication 113 node-01 1.2s ✓ DNS records 114 node-02 2.2s ✓ Free disk space 115 node-03 3.2s ✓ Service health 116 node-04 4.2s ✓ Certificate expiry 117 node-05 1.2s ✓ Route reachability 118 node-06 2.2s ✓ Volume permissions 119 node-07 3.2s ✓ Time synchronisation 120 node-08 4.2s ✓ Directory replication 121 node-09 1.2s ✓ DNS records 122 node-10 2.2s ✓ Free disk space 123 node-11 3.2s ✓ Service health 124 node-12 4.2s ✓ Certificate expiry 125 node-13 1.2s ✓ Route reachability 126 node-14 2.2s ✓ Volume permissions 127 node-15 3.2s ✓ Time synchronisation 128 node-16 4.2s ✓ Directory replication 129 node-01 1.2s ✓ DNS records 130 node-02 2.2s ✓ Free disk space 131 node-03 3.2s ✓ Service health 132 node-04 4.2s ✓ Certificate expiry 133 node-05 1.2s ▴ Route reachability 134 node-06 A partial response was returned; review the … 2.2s ✓ Volume permissions 135 node-07 3.2s ✓ Time synchronisation 136 node-08 4.2s ✗ Directory replication 137 node-09 Endpoint did not answer within the configure… 1.2s ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── Fleet checks ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━───────────────────────────────── 64% 137/214 Elapsed 1m 40s · ETA 1m 37s · 47.2/min ▂▂▂▂▂▃▃▅▆▇▇▁ ✓ 125 passed · ✗ 4 failed · ▴ 3 warnings · – 5 skipped Running now · 8 workers ⠼ DNS records 138 · node-10 · collecting 4.0s ⠼ Free disk space 139 · node-11 · evaluating 3.8s ⠼ Service health 140 · node-12 · collecting 3.6s ⠼ Certificate expiry 141 · node-13 · evaluating 3.4s ⠼ Route reachability 142 · node-14 · collecting 3.2s ⠼ Volume permissions 143 · node-15 · evaluating 3.0s ⠼ Time synchronisation 144 · node-16 · collecting 2.8s ⠼ Directory replication 145 · node-01 · evaluating 2.6s Up next · 69 queued DNS records 146 · node-02 · + 68 queued Groups Identity ━━━━━━━━━━━━━━━━──────── 35/54 ✓32 ✗1 ▴0 Network ━━━━━━━━━━━━━━━───────── 34/54 ✓31 ✗0 ▴2 Storage ━━━━━━━━━━━━━━━───────── 34/53 ✓32 ✗1 ▴0 Services ━━━━━━━━━━━━━━━───────── 34/53 ✓30 ✗2 ▴1 Problems so far · 7 · + 5 more ▴ Route reachability 134 · node-06: A partial response was returned; review the detailed report. ✗ Directory replication 137 · node-09: Endpoint did not answer within the configured deadline. Check the connection and… p log · f all · g groups · ? help
✓ Service health 108 node-12 4.2s ✓ Certificate expiry 109 node-13 1.2s ✓ Route reachability 110 node-14 2.2s ✓ Volume permissions 111 node-15 3.2s ✓ Time synchronisation 112 node-16 4.2s ✓ Directory replication 113 node-01 1.2s ✓ DNS records 114 node-02 2.2s ✓ Free disk space 115 node-03 3.2s ✓ Service health 116 node-04 4.2s ✓ Certificate expiry 117 node-05 1.2s ✓ Route reachability 118 node-06 2.2s ✓ Volume permissions 119 node-07 3.2s ✓ Time synchronisation 120 node-08 4.2s ✓ Directory replication 121 node-09 1.2s ✓ DNS records 122 node-10 2.2s ✓ Free disk space 123 node-11 3.2s ✓ Service health 124 node-12 4.2s ✓ Certificate expiry 125 node-13 1.2s ✓ Route reachability 126 node-14 2.2s ✓ Volume permissions 127 node-15 3.2s ✓ Time synchronisation 128 node-16 4.2s ✓ Directory replication 129 node-01 1.2s ✓ DNS records 130 node-02 2.2s ✓ Free disk space 131 node-03 3.2s ✓ Service health 132 node-04 4.2s ✓ Certificate expiry 133 node-05 1.2s ▴ Route reachability 134 node-06 A parti… 2.2s ✓ Volume permissions 135 node-07 3.2s ✓ Time synchronisation 136 node-08 4.2s ✗ Directory replication 137 node-09 Endpoin… 1.2s ──────────────────────────────────────────────────────────── Fleet checks ━━━━━━━━━━━━━━━━━━━━──────────── 64% 137/214 Elapsed 1m 40s · ETA 1m 37s · 47.2/min ▂▂▂▂▂▃▃▅▆▇▇▁ ✓ 125 pass · ✗ 4 fail · ▴ 3 warn · – 5 skip Running now · 8 workers ⠼ DNS records 138 · node-10 · collecting 4.0s ⠼ Free disk space 139 · node-11 · evaluating 3.8s ⠼ Service health 140 · node-12 · collecting 3.6s ⠼ Certificate expiry 141 · node-13 · evaluating 3.4s ⠼ Route reachability 142 · node-14 · collecting 3.2s ⠼ Volume permissions 143 · node-15 · evaluating 3.0s ⠼ Time synchronisation 144 · node-16 · collecting 2.8s ⠼ Directory replication 145 · node-01 · evaluating 2.6s Up next · 69 queued DNS records 146 · node-02 · + 68 queued Groups · 4 categories Problems so far · 7 · + 5 more ▴ Route reachability 134 · node-06: A partial response was … ✗ Directory replication 137 · node-09: Endpoint did not ans… p log · f all · g groups · ? help
✓ Service health 108 node-12 4.2s ✓ Certificate expiry 109 node-13 1.2s ✓ Route reachability 110 node-14 2.2s ✓ Volume permissions 111 node-15 3.2s ✓ Time synchronisation 112 node-16 4.2s ✓ Directory replication 113 node-01 1.2s ✓ DNS records 114 node-02 2.2s ✓ Free disk space 115 node-03 3.2s ✓ Service health 116 node-04 4.2s ✓ Certificate expiry 117 node-05 1.2s ✓ Route reachability 118 node-06 2.2s ✓ Volume permissions 119 node-07 3.2s ✓ Time synchronisation 120 node-08 4.2s ✓ Directory replication 121 node-09 1.2s ✓ DNS records 122 node-10 2.2s ✓ Free disk space 123 node-11 3.2s ✓ Service health 124 node-12 4.2s ✓ Certificate expiry 125 node-13 1.2s ✓ Route reachability 126 node-14 2.2s ✓ Volume permissions 127 node-15 3.2s ✓ Time synchronisation 128 node-16 4.2s ✓ Directory replication 129 node-01 1.2s ✓ DNS records 130 node-02 2.2s ✓ Free disk space 131 node-03 3.2s ✓ Service health 132 node-04 4.2s ✓ Certificate expiry 133 node-05 1.2s ▴ Route reachability 134 node-06 A parti… 2.2s ✓ Volume permissions 135 node-07 3.2s ✓ Time synchronisation 136 node-08 4.2s ✗ Directory replication 137 node-09 Endpoin… 1.2s ──────────────────────────────────────────────────────────── Fleet checks ━━━━━━━━━━━━━━━━━━━━──────────── 64% 137/214 Elapsed 1m 40s · ETA 1m 37s · 47.2/min ▂▂▂▂▂▃▃▅▆▇▇▁ ✓ 125 pass · ✗ 4 fail · ▴ 3 warn · – 5 skip Running now · 8 workers ⠼ DNS records 138 · node-10 · collecting 4.0s ⠼ Free disk space 139 · node-11 · evaluating 3.8s ⠼ Service health 140 · node-12 · collecting 3.6s ⠼ Certificate expiry 141 · node-13 · evaluating 3.4s ⠼ Route reachability 142 · node-14 · collecting 3.2s ⠼ Volume permissions 143 · node-15 · evaluating 3.0s ⠼ Time synchronisation 144 · node-16 · collecting 2.8s ⠼ Directory replication 145 · node-01 · evaluating 2.6s Up next · 69 queued DNS records 146 · node-02 · + 68 queued Groups · 4 categories Problems so far · 7 · + 5 more ▴ Route reachability 134 · node-06: A partial response was … ✗ Directory replication 137 · node-09: Endpoint did not ans… p log · f all · g groups · ? help
Height, output and controls
The header shows the progress bar, counts, elapsed time, smoothed ETA and throughput. Running rows show names, targets, phases and elapsed time. The next queued items and optional groups use spare height. Warnings and failures stay pinned. In a short terminal, groups disappear first, queued rows collapse to a count, and active rows collapse to the worker count.
At completion, the dashboard is removed and the full summary prints into scrollback: totals, groups, every problem with wrapped detail, and the optional report path. Terminal scrollback retention is controlled by the terminal application.
CI and redirected output use append-only lines. -NoLive forces this mode. -ProgressEvery and -ProgressSeconds control compact progress updates. C# exposes the same settings through LiveRunOptions. -HeightPercent changes the dashboard limit.
Background workers can call $run.Started($index, $phase) and $run.Finished($index, $state, $message) directly. Use Wait-ConsoleRun $run on the calling pipeline while those workers run: PowerShell hosts receive timed progress through that command's output pump. Join workers before Complete-ConsoleRun, including during cancellation. In C#, observe run.Cancellation, let workers report their last outcomes, then call Complete.
-InteractiveKeys enables p to pause/resume completion lines, f to filter new log lines to problems, g to show/hide groups, and ? for key help. Work and dashboard counts continue while the log is paused. Held lines flush on resume or completion. -Trend adds a throughput sparkline when width permits. Without keyboard input these controls are omitted.
Related
For scheduling work directly, see live runs. For building your own composition, see live sessions.