# @effect/printer-ansi

> An easy to use, extensible pretty-printer for rendering documents for the terminal

Latest version **0.51.0** (published 2026-07-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install @effect/printer-ansi
pnpm add @effect/printer-ansi
yarn add @effect/printer-ansi
bun add @effect/printer-ansi
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; popular repo.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.51.0 |
| Published | 2026-07-30 |
| First published | 2022-05-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 265.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 16100 |
| Maintainers | schickling, michael.arnaldi, effect-bot |

## Links

- npm: https://www.npmjs.com/package/@effect/printer-ansi
- Repository: https://github.com/Effect-TS/effect
- Homepage: https://effect.website
- Issues: https://github.com/Effect-TS/effect/issues
- npm.io page: https://npm.io/package/@effect/printer-ansi

## Dependencies (1)

- [@effect/printer](https://npm.io/package/@effect/printer.md) ^0.51.0

## Recent versions

- 0.51.0 (latest) — 2026-07-30
- 0.0.0-snapshot-6ebc752baf28354006ca2a0ae783a5bccf5de9ad (snapshot) — 2024-07-15
- 0.50.0 — 2026-07-13
- 0.49.0 — 2026-03-20
- 0.48.0 — 2026-03-16
- 0.47.0 — 2025-11-04
- 0.46.0 — 2025-09-30
- 0.45.0 — 2025-07-21
- 0.44.14 — 2025-07-15
- 0.44.13 — 2025-07-13
- 0.44.12 — 2025-07-03
- 0.44.11 — 2025-07-02
- 0.44.10 — 2025-06-26
- 0.44.9 — 2025-06-23
- 0.44.8 — 2025-06-17
- … 292 more at https://npm.io/package/@effect/printer-ansi/versions

## README

# 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

---
_Source: https://npm.io/package/@effect/printer-ansi · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
