# ANSI Terminal Pretty Printer for Effect-TS - [ANSI Terminal Pretty Printer for Effect-TS](#ansi-terminal-pretty-printer-for-effect-ts) - [Installation](#installation) - [`@effect/printer-ansi`](#effectprinter-ansi) - [Overview](#overview) - [Terminal Output and Untrusted Text](#terminal-output-and-untrusted-text) - [Acknowledgements](#acknowledgements) ## Installation ### `@effect/printer-ansi` ```bash npm install @effect/printer-ansi ``` ```bash pnpm install @effect/printer-ansi ``` ```bash 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](../printer/README.md). ## 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