Skip to content
ConsoleMonster
Cmdlet

Export-ConsoleRecording

Module
ConsoleMonster
Outputs
System.String System.IO.FileInfo

Exports a terminal session or dashboard recording to slide images, animations, video, a player or asciicast.

Syntax

Export-ConsoleRecording
[-AtSeconds <Double>]
[-Background <Theme|Solid|Gradient>]
[-BackgroundColor <String>]
[-BackgroundEndColor <String>]
[-Chapter <String>]
[-ChapterHoldSeconds <Double>]
[-ChapterSpeeds <Hashtable>]
[-ChromeStyle <MacOS|Windows|Linux>]
[-FinalFrame]
[-Fit <Content|Terminal>]
[-FontFallbacks <String[]>]
[-FontFamily <String>]
[-Format <String>]
[-FramesPerSecond <Double>]
[-Height <Int32>]
[-HoldLastFrameSeconds <Double>]
[-IdleLimitSeconds <Double>]
[-LoopCount <Int32>]
[-MaxFontSize <Double>]
[-Pace <Source|Slow|Normal|Fast>]
[-PassThru]
[[-Path] <String>]
[-PerChapter]
[-Preset <Docs|Slide16x9|Slide4x3|Social>]
[-RecordingPath] <String>
[-Speed <Double>]
[-Theme <Auto|Dark|Light|HighContrast|Current>]
[-Title <String>]
[-TrimEndChapter <String>]
[-TrimEndSeconds <Double>]
[-TrimStartChapter <String>]
[-TrimStartSeconds <Double>]
[-Width <Int32>]
[<CommonParameters>]
#
Parameter set: Session
Export-ConsoleRecording
[-Background <Theme|Solid|Gradient>]
[-BackgroundColor <String>]
[-BackgroundEndColor <String>]
[-ChapterHoldSeconds <Double>]
[-ChapterSpeeds <Hashtable>]
[-ChromeStyle <MacOS|Windows|Linux>]
[-Dashboard] <IWidget>
[-Fit <Content|Terminal>]
[-FontFallbacks <String[]>]
[-FontFamily <String>]
[-Format <String>]
[-FramesPerSecond <Double>]
[-Height <Int32>]
[-HoldLastFrameSeconds <Double>]
[-IdleLimitSeconds <Double>]
[-LoopCount <Int32>]
[-MaxFontSize <Double>]
[-Pace <Source|Slow|Normal|Fast>]
[-PassThru]
[[-Path] <String>]
[-Preset <Docs|Slide16x9|Slide4x3|Social>]
[-RecordingPath] <String>
[-Speed <Double>]
[-Theme <Auto|Dark|Light|HighContrast|Current>]
[-Title <String>]
[-TrimEndChapter <String>]
[-TrimEndSeconds <Double>]
[-TrimStartChapter <String>]
[-TrimStartSeconds <Double>]
[-Width <Int32>]
[<CommonParameters>]
#
Parameter set: Dashboard

Description

PNG selects the final frame, -AtSeconds a source time, -Chapter a completed chapter, or -PerChapter numbered slides. GIF and APNG are managed animations without an external executable. Without -Dashboard, reads a whole-session asciicast v2 from Invoke-ConsoleRecording -Interactive or Invoke-ConsoleRecording. Html writes a self-contained player with chapters, speed, scrubbing and copy text; Svg is animated; Text and Markdown include scrollback; -FinalFrame writes a static SVG. With -Dashboard, replays Invoke-ConsoleDashboard widget updates into the same definition, preserving the dashboard HTML, SVG and asciicast v3 exports; Markdown writes timestamped fenced frames through the bundled add-on. Add #t=30000 to an HTML address to open at 30 seconds.

Examples

Example 1

# Requires an existing session.cast recorded by Invoke-ConsoleRecording.
$recordingOptions = @{
    RecordingPath = './session.cast'
    Format = 'Text'
}
Export-ConsoleRecording @recordingOptions

Return a text document from an existing terminal recording

Example 2

# Requires run.jsonl recorded with this dashboard definition.
$dashboardOptions = @{
    Title = 'Build'
    Content = {
        $statusListOptions = @{
            WidgetId = 'steps'
            Content = { 'Compile' }
        }
        New-ConsoleStatusList @statusListOptions
    }
}
$dashboard = New-ConsoleDashboard @dashboardOptions
$recordingOptions2 = @{
    Dashboard = $dashboard
    RecordingPath = './run.jsonl'
    Format = 'Svg'
}
Export-ConsoleRecording @recordingOptions2
$recordingOptions = @{
    Dashboard = $dashboard
    RecordingPath = './run.jsonl'
    Format = 'Html'
    Width = 120
    Height = 36
}
Export-ConsoleRecording @recordingOptions

Return SVG and HTML from an existing matching dashboard recording

Parameters

-AtSeconds Double optionalsets: Session
Source recording time for PNG, before playback speed or idle compression.
-Background String optional
Slide background: Theme (default), Solid or Gradient.
Possible values: Theme, Solid, Gradient
-BackgroundColor String optional
Solid background or gradient start as #RGB or #RRGGBB.
-BackgroundEndColor String optional
Gradient end as #RGB or #RRGGBB; omitted uses the theme background.
-Chapter String optionalsets: Session
Exports the completed view of this chapter as PNG.
-ChapterHoldSeconds Double optional
Extra export hold at every chapter marker, unaffected by speed or idle capping.
-ChapterSpeeds Hashtable optional
Hashtable of chapter labels to positive speed multipliers, for example @{ Install = 4; Results = 1 }. Multiplies Speed for source and reading delays; explicit holds retain their duration. Labels must be unique in the recording.
-ChromeStyle WindowChromeStyle optional
None (default), MacOS, Windows or Linux. Choose a window style to show chrome; None hides it.
Possible values: MacOS, Windows, Linux
-FinalFrame SwitchParameter optionalsets: Session
With a session cast, exports the final visible frame as static SVG or PNG.
-Fit String optional
Slide fitting: Content trims unused rows and columns with two trailing columns of padding; Terminal keeps the complete grid. Animations use one stable size throughout the clip.
Possible values: Content, Terminal
-FontFallbacks String[] optional
Additional raster font-family fallbacks, in preferred order.
-FontFamily String optional
Installed raster font; omitted uses embedded JetBrains Mono.
-Format String optional
Png, Gif, Apng, Html, Svg, Asciicast, Text, Markdown, FencedText or PlayerData. The destination extension selects a default; .json means PlayerData. Text applies to terminal sessions; Markdown also exports dashboard recordings as timestamped fenced frames.
Possible values: Html, Svg, Asciicast, PlayerData, Text, Markdown, FencedText, Png, Gif, Apng
-FramesPerSecond Double optional
Frames per second sampled from the recording (default 10).
-Height Int32 optional
Dashboard playback height in cells (default 30). Session casts retain their recorded dimensions.
-HoldLastFrameSeconds Double optional
Final screen hold after the source timeline and reading holds (default 2 seconds).
-IdleLimitSeconds Double optional
Maximum source delay on an unchanged screen; zero disables capping. Reading and explicit holds are never capped.
-LoopCount Int32 optional
Total animation plays: zero repeats forever, one plays once.
-MaxFontSize Double optional
Maximum raster font size in pixels; default 72.
-Pace RecordingPace optional
Slow, Normal (default), Fast or Source. Adds reading time after output settles. Explicitly specifying Pace overrides recorded demo pace directives. Source adds no reading time; use IdleLimitSeconds 0 to retain all source delays.
Possible values: Source, Slow, Normal, Fast
-PassThru SwitchParameter optional
With -Path, also writes the file to the pipeline.
-Path String optionalposition: 1
The file to write, or a directory with -PerChapter. Graphics require a destination; text formats can go to the pipeline.
-PerChapter SwitchParameter optionalsets: Session
Writes numbered PNG slides to the destination directory, one per chapter.
-Preset String optional
Graphics canvas: Docs, Slide16x9, Slide4x3 or Social.
Possible values: Docs, Slide16x9, Slide4x3, Social
-RecordingPath String requiredposition: 0
Session .cast file, or dashboard .jsonl with -Dashboard.
-Speed Double optional
Playback speed baked into the export (default 1).
-Theme ExportTheme optional
Auto (default) uses a terminal recording's captured palette, otherwise Dark. Dark, Light and HighContrast override it; Current uses the session's active theme.
Possible values: Auto, Dark, Light, HighContrast, Current
-Title String optional
The title (page title, title bar, asciicast title).
-TrimEndChapter String optional
End before this chapter marker. Its output and hold are excluded.
-TrimEndSeconds Double optional
Exclusive source position at which to end. Cannot be combined with TrimEndChapter.
-TrimStartChapter String optional
Begin at this chapter marker, retaining its hold and all later output.
-TrimStartSeconds Double optional
Inclusive source position at which to begin. Cannot be combined with TrimStartChapter.
-Width Int32 optional
Dashboard playback width in cells (default 0: terminal width, falling back to 100). Session casts retain their recorded dimensions.
-Dashboard IWidget requiredposition: 0sets: Dashboard
The dashboard (or widget tree) the recording was made with.

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.