Skip to content
ChartForgeX
Class

TerminalStory

ChartForgeX.Terminal

Namespace
ChartForgeX.Terminal
Assembly
ChartForgeX.Stories
Modifiers
sealed
Attributes
Fluent

Models a deterministic, script-free animated terminal presentation.

Inheritance

  • object
  • TerminalStory

Usage

Explore 100 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Returned or exposed by 43

Accepted by parameters 57

Methods

public TerminalStory Blank() #

Adds a blank output line.

public TerminalStory Command(string command, double durationSeconds = 0) #

Adds a typed command.

Parameters

command string required
durationSeconds double = 0 optional
public static TerminalStory Create() #

Creates an empty terminal story.

public TerminalStory DeclareTab(string id, string title, TerminalDialect dialect, string workingDirectory, VisualTheme theme, Icon? icon = null, string? customPrompt = null, ThemeMode themeMode = Dark, TerminalStyleOptions? style = null) #

Declares a persistent terminal tab without changing the active tab.

Parameters

id string required
title string required
dialect ChartForgeX.Terminal.TerminalDialect required
workingDirectory string required
theme ChartForgeX.Themes.VisualTheme required
icon ChartForgeX.Icon? = null optional
customPrompt string? = null optional
themeMode ChartForgeX.ThemeMode = Dark optional
style ChartForgeX.Terminal.TerminalStyleOptions? = null optional
public double GetCommandDurationSeconds(string command) #

Calculates automatic typing time: visible text elements divided by characters per second, clamped to 0.35–4.5 seconds.

Parameters

command string required

Returns

double
public TerminalStory InitialTab(string id, string title, TerminalDialect dialect, string workingDirectory, VisualTheme theme, Icon? icon = null, string? customPrompt = null, ThemeMode themeMode = Dark, TerminalStyleOptions? style = null) #

Defines the initial persistent terminal tab before timeline authoring begins.

Parameters

id string required
title string required
dialect ChartForgeX.Terminal.TerminalDialect required
workingDirectory string required
theme ChartForgeX.Themes.VisualTheme required
icon ChartForgeX.Icon? = null optional
customPrompt string? = null optional
themeMode ChartForgeX.ThemeMode = Dark optional
style ChartForgeX.Terminal.TerminalStyleOptions? = null optional
public TerminalStory OpenTab(string id, string title, TerminalDialect dialect, string workingDirectory, VisualTheme theme, Icon? icon = null, string? customPrompt = null, double transitionSeconds = 0.2, ThemeMode themeMode = Dark, TerminalStyleOptions? style = null) #

Declares and activates a persistent terminal tab.

Parameters

id string required
title string required
dialect ChartForgeX.Terminal.TerminalDialect required
workingDirectory string required
theme ChartForgeX.Themes.VisualTheme required
icon ChartForgeX.Icon? = null optional
customPrompt string? = null optional
transitionSeconds double = 0.2 optional
themeMode ChartForgeX.ThemeMode = Dark optional
style ChartForgeX.Terminal.TerminalStyleOptions? = null optional
public TerminalStory Output(string text, Tone? tone = null) #

Adds one or more output lines.

Parameters

text string required
tone ChartForgeX.Tone? = null optional
public TerminalStory Pause(double seconds) #

Adds a silent pause to the animation timeline.

Parameters

seconds double required
public TerminalStory PlaybackSpeed(TerminalStoryPlaybackSpeed speed) #

Applies a reusable playback pace for typing, output reveals, and tab reading time.

Parameters

speed ChartForgeX.Terminal.TerminalStoryPlaybackSpeed required
public TerminalStory Progress(string label, double fraction, int width = 22) #

Adds a compact text progress bar.

Parameters

label string required
fraction double required
width int = 22 optional
public TerminalStory SelectTab(string id, double transitionSeconds = 0.2, ThemeMode themeMode = Dark, TerminalStyleOptions? style = null) #

Activates a previously declared terminal tab without clearing its buffer.

Parameters

id string required
transitionSeconds double = 0.2 optional
themeMode ChartForgeX.ThemeMode = Dark optional
style ChartForgeX.Terminal.TerminalStyleOptions? = null optional
public TerminalStory Table(TerminalTable table) #

Adds a formatted terminal table.

Parameters

table ChartForgeX.Terminal.TerminalTable required
public TerminalStory Transcript(IEnumerable<string> lines, Tone? tone = null) #

Adds captured transcript lines.

Parameters

lines System.Collections.Generic.IEnumerable<string> required
tone ChartForgeX.Tone? = null optional
public TerminalStory Typography(double fontSize, double lineHeight) #

Sets terminal typography.

Parameters

fontSize double required
lineHeight double required

Properties

public IReadOnlyList<TerminalStoryStep> Steps { get; } #

Gets the configured steps.

public IReadOnlyList<TerminalTab> Tabs { get; } #

Gets the persistent terminal tabs in display order.

public string ActiveTabId { get; } #

Gets the tab that will be active when the completed story is shown.

public VisualTheme Theme { get; set; } #

Gets or sets the initial-tab terminal theme. Set it before timeline authoring.

public ThemeMode ThemeMode { get; set; } #

Gets or sets the explicit initial-tab light or dark appearance. Set it before timeline authoring.

public TerminalStyleOptions Style { get; set; } #

Gets the initial-tab cursor and title-bar styling.

public TerminalWindowStyle WindowStyle { get; set; } #

Gets or sets the visible terminal window chrome independently of colors and command syntax.

public string Title { get; set; } #

Gets or sets the initial-tab title-bar text. Set it before timeline authoring.

public string WorkingDirectory { get; set; } #

Gets or sets the working directory shown in initial-tab prompts. Set it before timeline authoring.

public TerminalDialect Dialect { get; } #

Gets the prompt dialect.

public string CustomPrompt { get; } #

Gets the explicit custom prompt, when configured.

public int Width { get; set; } #

Gets or sets the logical SVG width, from 480 to 1800.

public double FontSize { get; private set; } #

Gets the terminal font size.

public double LineHeight { get; private set; } #

Gets the terminal line height.

public double InitialDelaySeconds { get; set; } #

Gets or sets the initial animation delay, from 0 to 10 seconds.

public double CharactersPerSecond { get; set; } #

Gets or sets the simulated typing speed, from 5 to 200 characters per second.

public double LineDelaySeconds { get; set; } #

Gets or sets the delay between output lines, from 0 to 3 seconds.

public double TabHoldSeconds { get; set; } #

Gets or sets the minimum reading time (0 to 10 seconds) after new content appears and before the active tab changes.

public bool ShowFinalPrompt { get; set; } #

Gets or sets whether the completed story shows a final prompt and cursor.

public int RasterScale { get; set; } #

Gets or sets the PNG output density multiplier, from 1 to 4.

Extension Methods

public static TerminalStory CharactersPerSecond(TerminalStory terminalStory, double value) #

Sets TerminalStory.CharactersPerSecond: Gets or sets the simulated typing speed, from 5 to 200 characters per second.

Parameters

terminalStory ChartForgeX.Terminal.TerminalStory required
The instance.
value double required
The value.

Returns

TerminalStory The same instance.

Examples

// C# initializer or property                 // C# fluent
terminalStory.CharactersPerSecond = value;    terminalStory.CharactersPerSecond(value);
public static TerminalStory Dialect(TerminalStory terminalStory, TerminalDialect dialect, string? customPrompt = null, ThemeMode themeMode = Dark, TerminalStyleOptions? style = null) #

Sets the prompt dialect and optional custom prompt.

Parameters

terminalStory ChartForgeX.Terminal.TerminalStory required
dialect ChartForgeX.Terminal.TerminalDialect required
customPrompt string? = null optional
themeMode ChartForgeX.ThemeMode = Dark optional
style ChartForgeX.Terminal.TerminalStyleOptions? = null optional
public static TerminalStory InitialDelaySeconds(TerminalStory terminalStory, double value) #

Sets TerminalStory.InitialDelaySeconds: Gets or sets the initial animation delay, from 0 to 10 seconds.

Parameters

terminalStory ChartForgeX.Terminal.TerminalStory required
The instance.
value double required
The value.

Returns

TerminalStory The same instance.

Examples

// C# initializer or property                 // C# fluent
terminalStory.InitialDelaySeconds = value;    terminalStory.InitialDelaySeconds(value);
public static TerminalStory LineDelaySeconds(TerminalStory terminalStory, double value) #

Sets TerminalStory.LineDelaySeconds: Gets or sets the delay between output lines, from 0 to 3 seconds.

Parameters

terminalStory ChartForgeX.Terminal.TerminalStory required
The instance.
value double required
The value.

Returns

TerminalStory The same instance.

Examples

// C# initializer or property              // C# fluent
terminalStory.LineDelaySeconds = value;    terminalStory.LineDelaySeconds(value);
public static TerminalStory RasterScale(TerminalStory terminalStory, int value) #

Sets TerminalStory.RasterScale: Gets or sets the PNG output density multiplier, from 1 to 4.

Parameters

terminalStory ChartForgeX.Terminal.TerminalStory required
The instance.
value int required
The value.

Returns

TerminalStory The same instance.

Examples

// C# initializer or property         // C# fluent
terminalStory.RasterScale = value;    terminalStory.RasterScale(value);
public static void SaveApng(TerminalStory story, string path, TerminalStoryAnimationOptions? options = null) #

Saves a terminal story as an animated PNG.

Parameters

story ChartForgeX.Terminal.TerminalStory required
path string required
options ChartForgeX.Terminal.TerminalStoryAnimationOptions? = null optional
public static void SaveGif(TerminalStory story, string path, TerminalStoryAnimationOptions? options = null) #

Saves a terminal story as an animated GIF.

Parameters

story ChartForgeX.Terminal.TerminalStory required
path string required
options ChartForgeX.Terminal.TerminalStoryAnimationOptions? = null optional
public static void SaveHtml(TerminalStory story, string path) #

Saves a terminal story as a complete HTML document.

Parameters

story ChartForgeX.Terminal.TerminalStory required
path string required
public static void SavePng(TerminalStory story, string path) #

Saves the completed state of a terminal story as PNG.

Parameters

story ChartForgeX.Terminal.TerminalStory required
path string required
public static void SaveSvg(TerminalStory story, string path) #

Saves a terminal story as SVG.

Parameters

story ChartForgeX.Terminal.TerminalStory required
path string required
public static void SaveTranscript(TerminalStory story, string path) #

Saves the exact terminal transcript as UTF-8 text.

Parameters

story ChartForgeX.Terminal.TerminalStory required
path string required
public static TerminalStory ShowFinalPrompt(TerminalStory terminalStory, bool value = true) #

Sets TerminalStory.ShowFinalPrompt: Gets or sets whether the completed story shows a final prompt and cursor.

Parameters

terminalStory ChartForgeX.Terminal.TerminalStory required
The instance.
value bool = true optional
The value; true when omitted.

Returns

TerminalStory The same instance.

Examples

// C# initializer or property             // C# fluent
terminalStory.ShowFinalPrompt = value;    terminalStory.ShowFinalPrompt(value);
Style 2 overloads
public static TerminalStory Style(TerminalStory terminalStory, TerminalStyleOptions value) #

Sets TerminalStory.Style: Gets the initial-tab cursor and title-bar styling.

Parameters

terminalStory ChartForgeX.Terminal.TerminalStory required
The instance.
value ChartForgeX.Terminal.TerminalStyleOptions required
The value.

Returns

TerminalStory The same instance.

Examples

// C# initializer or property    // C# fluent
terminalStory.Style = value;     terminalStory.Style(value);
public static TerminalStory Style(TerminalStory terminalStory, Action<TerminalStyleOptions> configure) #

Configures a copy of TerminalStory.Style (a new one when not set) and assigns a copy of it once the callback returns, leaving the property unchanged when the callback throws: Gets the initial-tab cursor and title-bar styling.

Parameters

terminalStory ChartForgeX.Terminal.TerminalStory required
The instance.
configure System.Action<ChartForgeX.Terminal.TerminalStyleOptions> required
Configures the copy.

Returns

TerminalStory The same instance.
public static TerminalStory TabHoldSeconds(TerminalStory terminalStory, double value) #

Sets TerminalStory.TabHoldSeconds: Gets or sets the minimum reading time (0 to 10 seconds) after new content appears and before the active tab changes.

Parameters

terminalStory ChartForgeX.Terminal.TerminalStory required
The instance.
value double required
The value.

Returns

TerminalStory The same instance.

Examples

// C# initializer or property            // C# fluent
terminalStory.TabHoldSeconds = value;    terminalStory.TabHoldSeconds(value);
public static TerminalStory Theme(TerminalStory terminalStory, VisualTheme value) #

Sets TerminalStory.Theme: Gets or sets the initial-tab terminal theme. Set it before timeline authoring.

Parameters

terminalStory ChartForgeX.Terminal.TerminalStory required
The instance.
value ChartForgeX.Themes.VisualTheme required
The value.

Returns

TerminalStory The same instance.

Examples

// C# initializer or property    // C# fluent
terminalStory.Theme = value;     terminalStory.Theme(value);
public static TerminalStory ThemeMode(TerminalStory terminalStory, ThemeMode value) #

Sets TerminalStory.ThemeMode: Gets or sets the explicit initial-tab light or dark appearance. Set it before timeline authoring.

Parameters

terminalStory ChartForgeX.Terminal.TerminalStory required
The instance.
value ChartForgeX.ThemeMode required
The value.

Returns

TerminalStory The same instance.

Examples

// C# initializer or property       // C# fluent
terminalStory.ThemeMode = value;    terminalStory.ThemeMode(value);
public static TerminalStory Title(TerminalStory terminalStory, string value) #

Sets TerminalStory.Title: Gets or sets the initial-tab title-bar text. Set it before timeline authoring.

Parameters

terminalStory ChartForgeX.Terminal.TerminalStory required
The instance.
value string required
The value.

Returns

TerminalStory The same instance.

Examples

// C# initializer or property    // C# fluent
terminalStory.Title = value;     terminalStory.Title(value);
public static byte[] ToApng(TerminalStory story, TerminalStoryAnimationOptions? options = null) #

Renders a terminal story as an animated PNG.

Parameters

story ChartForgeX.Terminal.TerminalStory required
options ChartForgeX.Terminal.TerminalStoryAnimationOptions? = null optional

Returns

byte[]
public static byte[] ToGif(TerminalStory story, TerminalStoryAnimationOptions? options = null) #

Renders a terminal story as an animated GIF.

Parameters

story ChartForgeX.Terminal.TerminalStory required
options ChartForgeX.Terminal.TerminalStoryAnimationOptions? = null optional

Returns

byte[]
ToHtmlFragment 2 overloads
public static string ToHtmlFragment(TerminalStory story) #

Renders a terminal story as an embeddable HTML fragment.

Parameters

story ChartForgeX.Terminal.TerminalStory required

Returns

string
public static string ToHtmlFragment(TerminalStory story, string idScope) #

Renders a terminal story as an embeddable HTML fragment with a deterministic ID scope.

Parameters

story ChartForgeX.Terminal.TerminalStory required
idScope string required

Returns

string
public static string ToHtmlPage(TerminalStory story) #

Renders a terminal story as a complete HTML document.

Parameters

story ChartForgeX.Terminal.TerminalStory required

Returns

string
public static byte[] ToPng(TerminalStory story) #

Renders the completed state of a terminal story to PNG bytes.

Parameters

story ChartForgeX.Terminal.TerminalStory required

Returns

byte[]
ToSvg 2 overloads
public static string ToSvg(TerminalStory story) #

Renders a terminal story to SVG markup.

Parameters

story ChartForgeX.Terminal.TerminalStory required

Returns

string
public static string ToSvg(TerminalStory story, string idScope) #

Renders a terminal story to SVG markup with a deterministic ID scope.

Parameters

story ChartForgeX.Terminal.TerminalStory required
idScope string required

Returns

string
public static string ToTranscript(TerminalStory story) #

Exports the exact command, output and table transcript in playback order.

Parameters

story ChartForgeX.Terminal.TerminalStory required

Returns

string

Exceptions

  • InvalidOperationException – The expanded transcript exceeds 16 Mi UTF-16 characters.
public static VisualArtifact ToVisualArtifact(TerminalStory story, string? id = null, VisualArtifactSourceLanguage sourceLanguage = Native) #

Captures the completed terminal display and its command/output transcript.

Parameters

story ChartForgeX.Terminal.TerminalStory required
id string? = null optional
sourceLanguage ChartForgeX.VisualArtifacts.VisualArtifactSourceLanguage = Native optional
public static TerminalStory Width(TerminalStory terminalStory, int value) #

Sets TerminalStory.Width: Gets or sets the logical SVG width, from 480 to 1800.

Parameters

terminalStory ChartForgeX.Terminal.TerminalStory required
The instance.
value int required
The value.

Returns

TerminalStory The same instance.

Examples

// C# initializer or property    // C# fluent
terminalStory.Width = value;     terminalStory.Width(value);
public static TerminalStory WindowStyle(TerminalStory terminalStory, TerminalWindowStyle value) #

Sets TerminalStory.WindowStyle: Gets or sets the visible terminal window chrome independently of colors and command syntax.

Parameters

terminalStory ChartForgeX.Terminal.TerminalStory required
The instance.
value ChartForgeX.Terminal.TerminalWindowStyle required
The value.

Returns

TerminalStory The same instance.

Examples

// C# initializer or property         // C# fluent
terminalStory.WindowStyle = value;    terminalStory.WindowStyle(value);
public static TerminalStory WorkingDirectory(TerminalStory terminalStory, string value) #

Sets TerminalStory.WorkingDirectory: Gets or sets the working directory shown in initial-tab prompts. Set it before timeline authoring.

Parameters

terminalStory ChartForgeX.Terminal.TerminalStory required
The instance.
value string required
The value.

Returns

TerminalStory The same instance.

Examples

// C# initializer or property              // C# fluent
terminalStory.WorkingDirectory = value;    terminalStory.WorkingDirectory(value);