Export-ConsoleRecording
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>]#SessionExport-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>]#DashboardDescription
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 @recordingOptionsReturn 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 @recordingOptionsReturn SVG and HTML from an existing matching dashboard recording
Parameters
- -AtSeconds Double
- Source recording time for PNG, before playback speed or idle compression.
- -Background String
- Slide background: Theme (default), Solid or Gradient.
- Possible values:
Theme,Solid,Gradient - -BackgroundColor String
- Solid background or gradient start as #RGB or #RRGGBB.
- -BackgroundEndColor String
- Gradient end as #RGB or #RRGGBB; omitted uses the theme background.
- -Chapter String
- Exports the completed view of this chapter as PNG.
- -ChapterHoldSeconds Double
- Extra export hold at every chapter marker, unaffected by speed or idle capping.
- -ChapterSpeeds Hashtable
- 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
- None (default), MacOS, Windows or Linux. Choose a window style to show chrome; None hides it.
- Possible values:
MacOS,Windows,Linux - -FinalFrame SwitchParameter
- With a session cast, exports the final visible frame as static SVG or PNG.
- -Fit String
- 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[]
- Additional raster font-family fallbacks, in preferred order.
- -FontFamily String
- Installed raster font; omitted uses embedded JetBrains Mono.
- -Format String
- 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
- Frames per second sampled from the recording (default 10).
- -Height Int32
- Dashboard playback height in cells (default 30). Session casts retain their recorded dimensions.
- -HoldLastFrameSeconds Double
- Final screen hold after the source timeline and reading holds (default 2 seconds).
- -IdleLimitSeconds Double
- Maximum source delay on an unchanged screen; zero disables capping. Reading and explicit holds are never capped.
- -LoopCount Int32
- Total animation plays: zero repeats forever, one plays once.
- -MaxFontSize Double
- Maximum raster font size in pixels; default 72.
- -Pace RecordingPace
- 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
- With -Path, also writes the file to the pipeline.
- -Path String
- The file to write, or a directory with -PerChapter. Graphics require a destination; text formats can go to the pipeline.
- -PerChapter SwitchParameter
- Writes numbered PNG slides to the destination directory, one per chapter.
- -Preset String
- Graphics canvas: Docs, Slide16x9, Slide4x3 or Social.
- Possible values:
Docs,Slide16x9,Slide4x3,Social - -RecordingPath String
- Session .cast file, or dashboard .jsonl with -Dashboard.
- -Speed Double
- Playback speed baked into the export (default 1).
- -Theme ExportTheme
- 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
- The title (page title, title bar, asciicast title).
- -TrimEndChapter String
- End before this chapter marker. Its output and hold are excluded.
- -TrimEndSeconds Double
- Exclusive source position at which to end. Cannot be combined with TrimEndChapter.
- -TrimStartChapter String
- Begin at this chapter marker, retaining its hold and all later output.
- -TrimStartSeconds Double
- Inclusive source position at which to begin. Cannot be combined with TrimStartChapter.
- -Width Int32
- Dashboard playback width in cells (default 0: terminal width, falling back to 100). Session casts retain their recorded dimensions.
- -Dashboard IWidget
- 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.