# @xterm/addon-serialize

> An addon for [xterm.js](https://github.com/xtermjs/xterm.js) that enables xterm.js to serialize a terminal framebuffer into string or html. This addon requires xterm.js v4+.

Latest version **0.14.0** (published 2025-12-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install @xterm/addon-serialize
pnpm add @xterm/addon-serialize
yarn add @xterm/addon-serialize
bun add @xterm/addon-serialize
```

## Health

**Score 65/100 (B)** — status: stable.

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

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.14.0 |
| Published | 2025-12-22 |
| First published | 2023-11-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 201 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 21204 |
| Author | The xterm.js authors |
| Maintainers | tyriar |
| Keywords | terminal, xterm, xterm.js |

## Links

- npm: https://www.npmjs.com/package/@xterm/addon-serialize
- Repository: https://github.com/xtermjs/xterm.js.git#master
- Homepage: https://github.com/xtermjs/xterm.js/tree/master#readme
- Issues: https://github.com/xtermjs/xterm.js/issues
- npm.io page: https://npm.io/package/@xterm/addon-serialize

## Alternatives

- [localforage](https://npm.io/package/localforage.md) — 6.2M weekly downloads
- [localforage-observable](https://npm.io/package/localforage-observable.md) — 30.8K weekly downloads
- [@y/y](https://npm.io/package/@y/y.md) — 30.1K weekly downloads
- [@metaobjectsdev/render](https://npm.io/package/@metaobjectsdev/render.md) — 3.5K weekly downloads
- [@ledgerhq/coin-algorand](https://npm.io/package/@ledgerhq/coin-algorand.md) — 1.1K weekly downloads

## Recent versions

- 0.14.0 (latest) — 2025-12-22
- 0.15.0-beta.301 (beta) — 2026-08-30
- 0.15.0-beta.300 — 2026-08-24
- 0.15.0-beta.299 — 2026-08-10
- 0.15.0-beta.298 — 2026-08-09
- 0.15.0-beta.297 — 2026-08-09
- 0.15.0-beta.296 — 2026-08-09
- 0.15.0-beta.295 — 2026-08-09
- 0.15.0-beta.294 — 2026-08-09
- 0.15.0-beta.293 — 2026-08-09
- 0.15.0-beta.292 — 2026-07-27
- 0.15.0-beta.291 — 2026-07-19
- 0.15.0-beta.290 — 2026-07-15
- 0.15.0-beta.289 — 2026-07-13
- 0.15.0-beta.288 — 2026-06-28
- … 478 more at https://npm.io/package/@xterm/addon-serialize/versions

## README

## @xterm/addon-serialize

An addon for [xterm.js](https://github.com/xtermjs/xterm.js) that enables xterm.js to serialize a terminal framebuffer into string or html. This addon requires xterm.js v4+.

⚠️ This is an experimental addon that is still under construction ⚠️

### Install

```bash
npm install --save @xterm/addon-serialize
```

### Usage

```ts
import { Terminal } from "@xterm/xterm";
import { SerializeAddon } from "@xterm/addon-serialize";

const terminal = new Terminal();
const serializeAddon = new SerializeAddon();
terminal.loadAddon(serializeAddon);

terminal.write("something...", () => {
  console.log(serializeAddon.serialize());
});
```

See the full [API](https://github.com/xtermjs/xterm.js/blob/master/addons/addon-serialize/typings/addon-serialize.d.ts) for more advanced usage.

### Benchmark

⚠️ Ensure you have `lolcat`, `hexdump` programs installed in your computer

```shell
$ git clone https://github.com/xtermjs/xterm.js.git
$ cd xterm.js
$ npm ci
$ cd addons/addon-serialize
$ npm run benchmark && npm run benchmark-baseline
$ # change some code in `@xterm/addon-serialize`
$ npm run benchmark-eval
```

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