Skip to content
ConsoleMonster

Environment overrides

NO_COLOR and the CONSOLEMONSTER_* variables pin what detection would otherwise decide, for CI, tests, screenshots and accessibility.

Variables are read when the profile is detected. They take precedence over the settings file that Show-ConsoleSetting and Set-ConsoleSetting -Save write, and Get-ConsoleSetting shows which one each value came from. An invalid value is ignored and noted in the profile's decisions, so Get-ConsoleCapability shows why it had no effect. CONSOLEMONSTER_NOW is the exception: it is read each time a date is shown, and an invalid value falls back to the clock without a note.

VariableValuesEffect
NO_COLORany valueNo colour anywhere, including host output in PowerShell. Status symbols stay.
CONSOLEMONSTER_COLORnone, 16, 256, truecolor or 24bitThe colour depth.
CONSOLEMONSTER_GLYPHSfull, basic, asciiThe glyph tier: box drawing, block and braille characters, status symbols and spinners.
CONSOLEMONSTER_MODEinteractive (or live), stream, plainInteractive redraws in place; stream writes append-only lines; plain writes ASCII lines without colour or escape sequences.
CONSOLEMONSTER_CIgithub, azure, gitlab, noneOverrides native CI groups, annotations and job-summary routing. Without it, only GITHUB_ACTIONS=true, TF_BUILD=true and GITLAB_CI=true select a protocol. Unknown values disable provider commands. This does not change terminal capability detection.
CONSOLEMONSTER_THEMEdark, light, highcontrast, colorblind, colorblind-light, colorblind-dark, autoThe palette. auto honors Windows High Contrast before reading the console background; colorblind picks its light or dark variant from the background the same way; an explicit theme takes precedence.
CONSOLEMONSTER_BORDERrounded, single, double, heavy, ascii or autoThe frame for panels, tables and inputs that use the default frame; auto uses the theme's. A widget's own frame stays.
CONSOLEMONSTER_DENSITYcomfortable or compactDefault widget spacing. Comfortable keeps standard spacing; Compact tightens padding and gaps. Explicit widget spacing stays as authored; an unset variable uses the theme.
CONSOLEMONSTER_STATUS_MARKERSsymbols, words or autoStatus symbols (✓ ✗ ▲) or bracketed words ([OK] [FAIL] [WARN]) in status columns, lists and headers; auto uses the theme's.
CONSOLEMONSTER_CULTUREa culture name, invariant or currentNumbers and dates in tables and presenters. An unknown name is ignored.
CONSOLEMONSTER_LANGUAGEa language name such as de or plThe language of built-in labels, separately from the number culture. German, Spanish, French and Italian are built in; others fall back to English.
CONSOLEMONSTER_EMOJI_WIDTH1, 2 or autoThe width of emoji, for consoles that draw them narrow.
CONSOLEMONSTER_AMBIGUOUS_WIDTH1, 2 or autoThe width of East Asian ambiguous characters.
CONSOLEMONSTER_NONINTERACTIVE1Prompts return their default or fail with a message that names the parameter to pass.
CONSOLEMONSTER_ACCESSIBLE1Numbered prompts, static apps, menus and grids, and append-only live narration. Status symbols stay visible and reduced motion is implied.
CONSOLEMONSTER_MOTIONreducedKeeps the normal layout with static spinners and at most one redraw per second.
CONSOLEMONSTER_NOMOUSE1Prompts, menus, pagers, the object explorer and apps leave the mouse to the terminal, for its own selection and scrollback. Every action keeps its key.
CONSOLEMONSTER_HYPERLINKSon, off, auto (also true/1, false/0)Clickable OSC 8 links for URLs and file paths. Detection turns them on in Windows Terminal, VS Code, iTerm2, WezTerm, Kitty and Ghostty (outside tmux, screen and Zellij panes), VTE terminals and Konsole; redirected, CI, stream and plain output never get them and print the target after the text instead, as text (url).
CONSOLEMONSTER_NOWan ISO 8601 time with Z or an offset, such as 2026-10-21T12:00:00ZThe "now" that relative dates (3 h ago) are counted from, for recordings and tests. Read each time a value is shown; unset or invalid uses the clock.
CONSOLEMONSTER_SETTINGSa file path, or noneThe settings file to read and save instead of settings.json in %APPDATA%\ConsoleMonster or ~/.config/ConsoleMonster; none ignores it, for tests and recordings that need fixed output.
CONSOLEMONSTER_UPDATE_GOLDEN1GoldenFile rewrites golden files instead of comparing.

Detection also reads CI and the variables of common CI systems (GitHub Actions, Azure Pipelines, Jenkins, GitLab, TeamCity), TERM (dumb selects plain mode), COLORTERM and WT_SESSION.

Redirected output (files, pipes and CI build logs) is as wide as COLUMNS when it is set. Without it, PowerShell commands use the width the host reports and other programs use 100 columns; Get-ConsoleCapability reports the width that applies. A terminal window always uses its own width.

Accessibility explains accessible output, reduced motion and the high-contrast and colour-blind palettes, with frames.

The same table under overrides

The script below is the same for both frames; only the environment changes. Detection reads the variables once per session, so run the script in a new one (powershell -NoProfile -File .\format-consoletable.ps1 on Windows PowerShell 5.1), then clear the variable:

$env:NO_COLOR = 1
pwsh -NoProfile -File ./format-consoletable.ps1
Remove-Item Env:NO_COLOR

$env:CONSOLEMONSTER_MODE = 'plain'
pwsh -NoProfile -File ./format-consoletable.ps1
Remove-Item Env:CONSOLEMONSTER_MODE

In the session you are in, Get-ConsoleCapability -Refresh detects again after you change a variable.

In bash, set it for one command: NO_COLOR=1 pwsh -File ./format-consoletable.ps1.

NO_COLOR=1 PowerShell 7.6
CONSOLEMONSTER_MODE=plain PowerShell 7.6
PowerShellformat-consoletable.ps1
# Build artifacts as a module build reports them.
$artifacts = @(
    [pscustomobject] @{ Name = 'Orion.2.0.0.nupkg'; Kind = 'NuGet'; Length = 1482113
        Time = [timespan]::FromSeconds(48.2); Signed = $true
        Path = 'D:\Builds\Orion\Packed\Orion.2.0.0.nupkg' }
    [pscustomobject] @{ Name = 'Orion.2.0.0.snupkg'; Kind = 'NuGet'; Length = 402331
        Time = [timespan]::FromSeconds(3.1); Signed = $true
        Path = 'D:\Builds\Orion\Packed\Orion.2.0.0.snupkg' }
    # … 6 more lines in the full program
)

$artifacts | Show-ConsoleTable -Title '[bold]Build artifacts[/]' -GroupBy Kind -Property @(
    @{ Name = 'Name'; Key = $true; Overflow = 'Never' }
    @{ Name = 'Length'; Header = 'Size'; Presenter = 'Bytes'; Priority = 9; Aggregate = 'Sum' }
    @{ Name = 'Time'; Header = 'Built in'; Presenter = 'Duration'; Priority = 6; Aggregate = 'Sum' }
    @{ Name = 'Signed'; Presenter = 'Boolean'; Priority = 5 }
    @{ Name = 'Path'; Overflow = 'TruncateMiddle'; Priority = 1; MinWidth = 20 }
) -ShowTotals
Full program
Import-Module ConsoleMonster

# Build artifacts as a module build reports them.
$artifacts = @(
    [pscustomobject] @{ Name = 'Orion.2.0.0.nupkg'; Kind = 'NuGet'; Length = 1482113
        Time = [timespan]::FromSeconds(48.2); Signed = $true
        Path = 'D:\Builds\Orion\Packed\Orion.2.0.0.nupkg' }
    [pscustomobject] @{ Name = 'Orion.2.0.0.snupkg'; Kind = 'NuGet'; Length = 402331
        Time = [timespan]::FromSeconds(3.1); Signed = $true
        Path = 'D:\Builds\Orion\Packed\Orion.2.0.0.snupkg' }
    [pscustomobject] @{ Name = 'Orion-2.0.0.zip'; Kind = 'Module'; Length = 2904576
        Time = [timespan]::FromSeconds(11.7); Signed = $true
        Path = 'D:\Builds\Orion\Packed\Orion-2.0.0.zip' }
    [pscustomobject] @{ Name = 'Docs.zip'; Kind = 'Module'; Length = 51302
        Time = [timespan]::FromSeconds(1.2); Signed = $false
        Path = 'D:\Builds\Orion\Packed\Docs.zip' }
)

$artifacts | Show-ConsoleTable -Title '[bold]Build artifacts[/]' -GroupBy Kind -Property @(
    @{ Name = 'Name'; Key = $true; Overflow = 'Never' }
    @{ Name = 'Length'; Header = 'Size'; Presenter = 'Bytes'; Priority = 9; Aggregate = 'Sum' }
    @{ Name = 'Time'; Header = 'Built in'; Presenter = 'Duration'; Priority = 6; Aggregate = 'Sum' }
    @{ Name = 'Signed'; Presenter = 'Boolean'; Priority = 5 }
    @{ Name = 'Path'; Overflow = 'TruncateMiddle'; Priority = 1; MinWidth = 20 }
) -ShowTotals
NO_COLOR=1 keeps the layout and the status words; CONSOLEMONSTER_MODE=plain also switches to ASCII.

Relative dates in recordings

CONSOLEMONSTER_NOW sets the moment that relative dates count from. It is read each time a value is shown, so it also reaches widgets made earlier; remove it after the recording.

CONSOLEMONSTER_NOW=2026-10-21T12:00:00Z PowerShell 7.6
PowerShellrelative-dates.ps1
# Relative dates count from CONSOLEMONSTER_NOW instead of the clock, so a recording says the same thing every time.
$env:CONSOLEMONSTER_NOW = '2026-10-21T12:00:00Z'

$reports = @(
    [pscustomobject] @{ Name = 'Mail flow'; Changed = [datetimeoffset] '2026-10-21T11:58:00Z' }
    [pscustomobject] @{ Name = 'Replication'; Changed = [datetimeoffset] '2026-10-21T09:00:00Z' }
    [pscustomobject] @{ Name = 'Certificates'; Changed = [datetimeoffset] '2026-10-18T12:00:00Z' }
)
$reports | Show-ConsoleTable -Property Name, @{ Name = 'Changed'; Presenter = 'DateRelative' }

Remove-Item Env:CONSOLEMONSTER_NOW
Full program
Import-Module ConsoleMonster

# Relative dates count from CONSOLEMONSTER_NOW instead of the clock, so a recording says the same thing every time.
$env:CONSOLEMONSTER_NOW = '2026-10-21T12:00:00Z'

$reports = @(
    [pscustomobject] @{ Name = 'Mail flow'; Changed = [datetimeoffset] '2026-10-21T11:58:00Z' }
    [pscustomobject] @{ Name = 'Replication'; Changed = [datetimeoffset] '2026-10-21T09:00:00Z' }
    [pscustomobject] @{ Name = 'Certificates'; Changed = [datetimeoffset] '2026-10-18T12:00:00Z' }
)
$reports | Show-ConsoleTable -Property Name, @{ Name = 'Changed'; Presenter = 'DateRelative' }

Remove-Item Env:CONSOLEMONSTER_NOW
Three dates shown with the DateRelative presenter, counted from CONSOLEMONSTER_NOW instead of the clock.

In Windows Terminal, VS Code, iTerm2, WezTerm, Kitty and Ghostty (outside tmux, screen and Zellij panes), VTE terminals and Konsole, URLs and file paths in tables, lists and log lines become OSC 8 links. Elsewhere they stay text. A column can ask for it with the Link presenter; Write-ConsoleText -Link and New-ConsoleText -Link give a link its own label:

Import-Module ConsoleMonster

Get-ChildItem -File | Show-ConsoleTable -Property Name, Length, @{ Name = 'FullName'; Header = 'Open'; Presenter = 'Link' }
Write-ConsoleText 'Project documentation' -Link 'https://consolemonster.dev/docs/'

# Off for this session, then back to detection.
$env:CONSOLEMONSTER_HYPERLINKS = 'off'
Get-ConsoleCapability -Refresh | Select-Object Kind, SupportsHyperlinks
Remove-Item Env:CONSOLEMONSTER_HYPERLINKS
Get-ConsoleCapability -Refresh | Select-Object Kind, SupportsHyperlinks

In C#

The same choices are available without the environment: TerminalProfile.Fixed(width, height, colors, glyphs) for a profile with no detection, and WithCulture, WithThemeMode, WithPalette, WithSize, WithColorDepth and WithMode to change one value. Live sessions take LiveSessionOptions.Profile, Theme and Culture.

using ConsoleMonster;
using ConsoleMonster.Capabilities;
using ConsoleMonster.Widgets;

KeyValueList facts = new KeyValueList().Add("Status", "passed").Add("Duration", "4.2 s");
// No colour, then plain output, for these two writes only:
Terminal.Write(facts, Terminal.Profile.WithColorDepth(ColorDepth.None));
Terminal.Write(facts, Terminal.Profile.WithMode(OutputMode.Plain));

In PowerShell, Get-ConsoleCapability shows the profile these variables produced, with the reason for each value.

Next

Edit this page on GitHub