# @xterm/addon-attach

> An addon for [xterm.js](https://github.com/xtermjs/xterm.js) that enables attaching to a web socket. This addon requires xterm.js v4+.

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

## Install

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

## 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.12.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 | 19.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 21260 |
| Author | The xterm.js authors |
| Maintainers | tyriar |
| Keywords | terminal, xterm, xterm.js |

## Links

- npm: https://www.npmjs.com/package/@xterm/addon-attach
- 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-attach

## 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.12.0 (latest) — 2025-12-22
- 0.13.0-beta.312 (beta) — 2026-10-12
- 0.13.0-beta.311 — 2026-10-12
- 0.13.0-beta.310 — 2026-10-12
- 0.13.0-beta.309 — 2026-10-12
- 0.13.0-beta.308 — 2026-10-12
- 0.13.0-beta.307 — 2026-10-12
- 0.13.0-beta.306 — 2026-10-12
- 0.13.0-beta.305 — 2026-10-12
- 0.13.0-beta.304 — 2026-10-12
- 0.13.0-beta.303 — 2026-08-30
- 0.13.0-beta.302 — 2026-08-24
- 0.13.0-beta.301 — 2026-08-10
- 0.13.0-beta.300 — 2026-08-09
- 0.13.0-beta.299 — 2026-08-09
- … 489 more at https://npm.io/package/@xterm/addon-attach/versions

## README

## @xterm/addon-attach

An addon for [xterm.js](https://github.com/xtermjs/xterm.js) that enables attaching to a web socket. This addon requires xterm.js v4+.

### Install

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

### Usage

```ts
import { Terminal } from '@xterm/xterm';
import { AttachAddon } from '@xterm/addon-attach';

const terminal = new Terminal();
const attachAddon = new AttachAddon(webSocket);
terminal.loadAddon(attachAddon);
```

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

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