Detection runs once and produces a TerminalProfile: the output mode, the colour depth, the glyph tier, the window size, the theme preference and the culture. Every value carries the reason it was chosen, which Get-ConsoleCapability (and Terminal.Profile.Decisions in C#) lists. The frames below run the script shown under the first one with different environments. Each terminal names its capture platform; colour and glyph detection can differ while the cell-width policy stays pinned.
This console Mode Interactive ColorDepth TrueColor Glyphs Basic Width 100 Height 40 ThemeMode Auto Palette Default FontFace Consolas accessible: False reduced motion: False CONSOLEMONSTER_EMOJI_WIDTH: 2 CONSOLEMONSTER_AMBIGUOUS_WIDTH: 1 hyperlinks: False (terminal/CONSOLEMONSTER_HYPERLINKS; requires interactive VT, never redirected o r CI) mode: Interactive (VT terminal) colour: TrueColor (Windows build >=14931) glyphs: Basic (conhost font 'Consolas') VT: supported kind: Conhost width profile: emoji=2, ambiguous=1, zwj=Joined, flag=2, text=1 (environment) probe widths: False theme mode: Auto, palette Default (CONSOLEMONSTER_THEME) culture: en-US (CONSOLEMONSTER_CULTURE) size: 100x40 (visible window or defaults) images: HalfBlock (no image protocol advertised)
# What ConsoleMonster detected about this console, and why.
$capability = Get-ConsoleCapability
$capability |
Show-Console -View List -Title 'This console' -Property Mode, ColorDepth, Glyphs, Width, Height,
ThemeMode, Palette, FontFace
$capability.Decisions | ForEach-Object { " $_" }Full program
Import-Module ConsoleMonster
# What ConsoleMonster detected about this console, and why.
$capability = Get-ConsoleCapability
$capability |
Show-Console -View List -Title 'This console' -Property Mode, ColorDepth, Glyphs, Width, Height,
ThemeMode, Palette, FontFace
$capability.Decisions | ForEach-Object { " $_" }This console Mode Interactive ColorDepth Ansi256 Glyphs Full Width 100 Height 40 ThemeMode Auto Palette Default accessible: False reduced motion: False CONSOLEMONSTER_EMOJI_WIDTH: 2 CONSOLEMONSTER_AMBIGUOUS_WIDTH: 1 hyperlinks: False (terminal/CONSOLEMONSTER_HYPERLINKS; requires interactive VT, never redirected o r CI) mode: Interactive (VT terminal) colour: Ansi256 (TERM 256color) glyphs: Full (modern terminal, locale LC_ALL=en_US.UTF-8) VT: supported kind: Xterm width profile: emoji=2, ambiguous=1, zwj=Joined, flag=2, text=1 (environment) probe widths: False theme mode: Auto, palette Default (CONSOLEMONSTER_THEME) culture: en-US (CONSOLEMONSTER_CULTURE) size: 100x40 (visible window or defaults) images: HalfBlock (no image protocol advertised)
What is detected
- Mode. Interactive on a VT console, Stream when output is redirected or a CI system is detected, Plain when asked for. Stream and Plain write lines instead of redrawing.
- Colour depth. 24-bit, 256, 16 or none.
NO_COLORturns colour off. - Glyph tier. Full, Basic or ASCII. On conhost the console font is read to choose; in stream and CI output the tier is Basic. The tier changes only ConsoleMonster's own borders, markers and spinners; your text keeps its emoji and symbols on every tier.
- Size. The visible window, not the screen buffer, so nothing is written past the window or into its bottom-right cell.
- Widths. Display widths come from Unicode 17 tables, with emoji and ambiguous widths that can be overridden. A width probe reads the console screen buffer and never reads input.
- Links. Clickable OSC 8 links for URLs and file paths in Windows Terminal, VS Code, iTerm2, WezTerm, Kitty and Ghostty (outside tmux, screen and Zellij panes), VTE terminals and Konsole; never in redirected, CI, stream or plain output, where a link prints its target after the text as
text (url).CONSOLEMONSTER_HYPERLINKSoverrides it (see Environment overrides). - Background. In conhost,
autoreads the console background colour to choose the light or dark theme. Windows Terminal does not expose its colour scheme to console programs, so thereCONSOLEMONSTER_THEME=lightselects the light theme.
This console Mode Stream ColorDepth – None Glyphs Basic Width 100 Height 40 ThemeMode Dark Palette Default FontFace Consolas accessible: False reduced motion: False CONSOLEMONSTER_EMOJI_WIDTH: 2 CONSOLEMONSTER_AMBIGUOUS_WIDTH: 1 hyperlinks: False (terminal/CONSOLEMONSTER_HYPERLINKS; requires interactive VT, never redirected o r CI) mode: Stream (CI environment) colour: None (NO_COLOR) glyphs: Basic (stream/CI) VT: supported kind: Conhost width profile: emoji=2, ambiguous=1, zwj=Joined, flag=2, text=1 (environment) probe widths: False theme mode: Dark, palette Default (CONSOLEMONSTER_THEME) culture: en-US (CONSOLEMONSTER_CULTURE) size: 100x40 (visible window or defaults) images: None (CI output gets the placeholder; terminal: HalfBlock, no image protocol advertised)
CI=true and NO_COLOR=1: stream mode, no colour, Basic glyphs and no width probing.In C#, Terminal.Profile holds the same values and Decisions the same reasons. This program prints a shorter list than the script above:
using ConsoleMonster;
using ConsoleMonster.Capabilities;
using ConsoleMonster.Widgets;
// What ConsoleMonster detected about this console, and why.
TerminalProfile profile = Terminal.Profile;
KeyValueList facts = new KeyValueList()
.Add("Mode", profile.Mode.ToString())
.Add("ColorDepth", profile.ColorDepth.ToString())
.Add("Glyphs", profile.Glyphs.ToString())
.Add("Size", profile.Width + " × " + profile.Height);
Terminal.Write(facts);
foreach (string decision in profile.Decisions) {
Terminal.WriteMarkupLine(" " + ConsoleMonster.Text.Markup.Escape(decision));
}
Overriding detection
Any decision can be pinned with an environment variable (see Environment overrides). The site pins the colour depth, glyph tier, theme, culture and language for its captures, and the same script then reports each of them as pinned:
This console Mode Interactive ColorDepth TrueColor Glyphs Full Width 100 Height 40 ThemeMode Dark Palette Default FontFace Consolas accessible: False reduced motion: False CONSOLEMONSTER_EMOJI_WIDTH: 2 CONSOLEMONSTER_AMBIGUOUS_WIDTH: 1 hyperlinks: False (terminal/CONSOLEMONSTER_HYPERLINKS; requires interactive VT, never redirected o r CI) mode: Interactive (VT terminal) colour: TrueColor (CONSOLEMONSTER_COLOR) glyphs: Full (CONSOLEMONSTER_GLYPHS) VT: supported kind: Conhost width profile: emoji=2, ambiguous=1, zwj=Joined, flag=2, text=1 (environment) probe widths: False theme mode: Dark, palette Default (CONSOLEMONSTER_THEME) culture: en-US (CONSOLEMONSTER_CULTURE) size: 100x40 (visible window or defaults) images: HalfBlock (no image protocol advertised)
CONSOLEMONSTER_COLOR, _GLYPHS, _THEME, _CULTURE and _LANGUAGE pinned.In code, TerminalProfile.Fixed(width, height, colors, glyphs) builds a profile without detection, and TerminalProfile.WithCulture, WithThemeMode, WithPalette and WithSize change one value. Terminal.Write(widget, profile) renders with it:
using ConsoleMonster;
using ConsoleMonster.Capabilities;
using ConsoleMonster.Widgets;
Rule rule = new Rule("[bold]Release notes[/]");
Terminal.Write(rule); // as detected
Terminal.Write(rule, Terminal.Profile.WithColorDepth(ColorDepth.None)); // the same console, no colour
Terminal.Write(rule, TerminalProfile.Fixed(40, 10, ColorDepth.Ansi16, GlyphTier.Ascii)); // a fixed profile
Fonts and resizing during a session
In conhost, the console font is polled about once a second; a new face or size re-derives the glyph tier and the emoji and ambiguous widths. In Windows Terminal, widths are measured again after every resize, which also covers zooming with Ctrl+= and Ctrl+0. Print-once output reads the window size on every write, so output printed after a resize uses the new width.
Next
- Environment overrides: every variable that pins a decision.
- Accessibility: screen readers, high contrast and reduced motion.
- Hosts and CI: what each host, CI system and transcript gets.