OutputOptions
Configuration for creating an output channel.
Every field is optional — sensible defaults are applied when omitted.
- Import:
@kjanat/dreamcli - Export kind: interface
- Declared in:
src/core/output/index.ts - Source link:
src/core/output/index.ts:57
Signatures
interface OutputOptions {}Members
Properties
stdout
Writer for stdout-bound messages (log, info, json). Defaults to process.stdout.write when running in Node/Bun.
stdout?: WriteFn;stderr
Writer for stderr-bound messages (warn, error). In JSON mode, log and info are also redirected here so that stdout contains only structured JSON output. Defaults to process.stderr.write when running in Node/Bun.
stderr?: WriteFn;isTTY
Whether stdout is connected to a TTY. When false, output may omit ANSI codes and decorations. Defaults to false (safe default — non-TTY until proven otherwise).
isTTY?: boolean;terminalSize
Terminal dimensions captured on the output channel for custom rendering.
terminalSize?: TerminalSize;getTerminalSize
Read the terminal's current dimensions before concurrent activity redraws. .run() supplies the runtime adapter's getter. Without usable dimensions, concurrent activities emit static start and completion messages.
getTerminalSize?: { (): TerminalSize | undefined; };verbosity
Verbosity level.
'normal'(default) — emit all messages'quiet'— suppressinfomessages
verbosity?: Verbosity;jsonMode
Enable JSON output mode.
When true, log and info messages are redirected to stderr so that stdout is reserved exclusively for structured json() output. warn and error continue to write to stderr as normal.
jsonMode?: boolean;color
Explicitly enable or disable ANSI colors on out.color.
When set, this wins over the auto-gate — use it to force colors in captured test output or when embedding into a host that manages its own color policy.
color?: boolean;hyperlinks
Resolved OSC 8 hyperlink support for out.isHyperlinkSupported.
When set, this wins over the isTTY fallback. Callers pass the NO_HYPERLINKS/FORCE_HYPERLINKS (and --no-hyperlinks/--hyperlinks) decision here via resolveHyperlinkOverride, keeping process access out of the output layer.
hyperlinks?: boolean;