Out
Output channel available inside action handlers.
Provides structured methods for stdout/stderr, JSON output, spinners, progress bars, and tables. The real implementation lives in src/core/output/; this interface defines the shape that handlers consume.
- Import:
@kjanat/dreamcli - Export kind: interface
- Declared in:
src/core/schema/command.ts - Source link:
packages/dreamcli/src/core/schema/command.ts:146
Signatures
interface Out {}Members
Properties
isTTY
Whether stdout is connected to a TTY (terminal).
Handlers can check this to decide whether to emit decorative output (spinners, progress bars, ANSI color codes). When false, the output is being piped or redirected — skip interactive decorations.
Note: jsonMode takes precedence — when jsonMode is true, decorative output should be suppressed regardless of isTTY.
isTTY: boolean;jsonMode
Whether the output channel is in JSON mode (--json flag active).
Handlers can check this to skip decorative output (spinners, progress bars, ANSI formatting) when machine-readable output is expected.
jsonMode: boolean;Methods
error
error(message: string): void;info
info(message: string): void;json
json(value: unknown): void;log
log(message: string): void;progress
progress(options: ProgressOptions): ProgressHandle;spinner
spinner(text: string, options?: SpinnerOptions): SpinnerHandle;stopActive
stopActive(): void;table
table<T extends Record<string, unknown>>(rows: readonly T[], options: TableOptions): void;warn
warn(message: string): void;