Skip to content

OutputOptions

Output pipeline configuration.

public sealed class OutputOptions

Initializes a new instance of the OutputOptions class.

public OutputOptions()

Adds a flag alias mapped to an output format.

public void AddAlias(string alias, string format)
  • alias (string): Alias name without prefix (for example: “markdown”).
  • format (string): Target output format name.

AddTransformer(string, IOutputTransformer)

Section titled “AddTransformer(string, IOutputTransformer)”

Adds a transformer for an output format.

public void AddTransformer(string name, IOutputTransformer transformer)

Gets registered output aliases by alias name.

public IReadOnlyDictionary<string, string> Aliases { get; }

IReadOnlyDictionary<string, string>

Gets or sets the ANSI mode behavior.

public AnsiMode AnsiMode { get; set; }

AnsiMode

Gets or sets a value indicating whether banner output is enabled.

public bool BannerEnabled { get; set; }

bool

Gets the set of output format names eligible for banner rendering. Only formats in this set will display banners in interactive mode. Add custom format names (e.g. “spectre”) to enable banners for those formats.

public ISet<string> BannerFormats { get; }

ISet<string>

Gets or sets a value indicating whether structured output (for example JSON) should be ANSI colorized during interactive sessions.

public bool ColorizeStructuredInteractive { get; set; }

bool

Gets or sets the default output format.

public string DefaultFormat { get; set; }

string

Gets or sets the fallback render width when terminal width is unavailable.

public int FallbackWidth { get; set; }

int

Gets JSON serializer options used by the JSON transformer.

public JsonSerializerOptions JsonSerializerOptions { get; }

JsonSerializerOptions

Gets or sets the palette provider used when ANSI rendering is enabled.

public IAnsiPaletteProvider PaletteProvider { get; set; }

IAnsiPaletteProvider

Gets or sets a preferred render width for human output.

public int? PreferredWidth { get; set; }

int?

Gets result-flow options for paging and large result sets.

public ResultFlowOptions ResultFlow { get; }

ResultFlowOptions

Gets or sets the theme mode used for ANSI palette selection.

public ThemeMode ThemeMode { get; set; }

ThemeMode

Gets registered transformers by name.

public IReadOnlyDictionary<string, IOutputTransformer> Transformers { get; }

IReadOnlyDictionary<string, IOutputTransformer>