Files
effect/packages/printer-ansi
effect-botandgithub-actions[bot] 417e0faa80 Version Packages (v3) (#6466)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-07-30 16:17:27 +12:00
..
2026-07-30 02:59:57 +00:00
2026-07-30 02:59:57 +00:00
2026-07-30 16:17:27 +12:00
2023-12-27 10:49:58 +01:00
2026-07-30 16:17:27 +12:00
2026-07-30 02:59:57 +00:00
2023-12-27 10:49:58 +01:00

ANSI Terminal Pretty Printer for Effect-TS

Installation

@effect/printer-ansi

npm install @effect/printer-ansi
pnpm install @effect/printer-ansi
yarn add @effect/printer-ansi

Overview

This package defines a renderer for documents generated by the @effect/printer package, suitable for displaying them on ANSI-compatible terminals, including colors, bolding, underlining and italicizing.

For more information about @effect/printer in general, refer to the main @effect/printer package documentation.

Terminal Output and Untrusted Text

Text leaves are rendered verbatim, including control characters. Rendering returns a string and does not make untrusted text safe for a terminal. Apply AnsiDoc.sanitize to attacker-controlled subtrees before writing the result to a terminal. Keep trusted, intentional terminal sequences outside the sanitized subtree.

Acknowledgements

This package is a port of https://github.com/quchen/prettyprinter