# @xterm/headless

> A headless terminal component that runs in Node.js

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

## Install

```sh
npm install @xterm/headless
pnpm add @xterm/headless
yarn add @xterm/headless
bun add @xterm/headless
```

## Health

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

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

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 6.0.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 | 1.9 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 21285 |
| Maintainers | tyriar |
| Keywords | cli, command-line, console, pty, shell, ssh, styles, terminal-emulator, terminal, tty, vt100, webgl, xterm |

## Links

- npm: https://www.npmjs.com/package/@xterm/headless
- Repository: https://github.com/xtermjs/xterm.js
- Homepage: https://github.com/xtermjs/xterm.js#readme
- Issues: https://github.com/xtermjs/xterm.js/issues
- npm.io page: https://npm.io/package/@xterm/headless

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 6.0.0 (latest) — 2025-12-22
- 6.1.0-beta.313 (beta) — 2026-10-13
- 6.1.0-beta.312 — 2026-10-12
- 6.1.0-beta.311 — 2026-10-12
- 6.1.0-beta.310 — 2026-10-12
- 6.1.0-beta.309 — 2026-10-12
- 6.1.0-beta.308 — 2026-10-12
- 6.1.0-beta.307 — 2026-10-12
- 6.1.0-beta.306 — 2026-10-12
- 6.1.0-beta.305 — 2026-10-12
- 6.1.0-beta.304 — 2026-10-12
- 6.1.0-beta.303 — 2026-08-30
- 6.1.0-beta.302 — 2026-08-24
- 6.1.0-beta.301 — 2026-08-10
- 6.1.0-beta.300 — 2026-08-09
- … 490 more at https://npm.io/package/@xterm/headless/versions

## README

# [![xterm.js logo](logo-full.png)](https://xtermjs.org)

⚠ This package is experimental

`xterm-headless` is a headless terminal that can be run in node.js. This is useful in combination with the frontend [`xterm`](https://www.npmjs.com/package/xterm) for example to keep track of a terminal's state on a remote server where the process is hosted.

## Getting Started

First, you need to install the module, we ship exclusively through npm, so you need that installed and then add xterm.js as a dependency by running:

```sh
npm install xterm-headless
```

Then import as you would a regular node package. The recommended way to load `xterm-headless` is with TypeScript and the ES6 module syntax:

```javascript
import { Terminal } from '@xterm/headless';
```

## API

The full API for `xterm-headless` is contained within the [TypeScript declaration file](https://github.com/xtermjs/xterm.js/blob/master/typings/xterm-headless.d.ts), use the branch/tag picker in GitHub (`w`) to navigate to the correct version of the API.

Note that some APIs are marked *experimental*, these are added to enable experimentation with new ideas without committing to support it like a normal [semver](https://semver.org/) API. Note that these APIs can change radically between versions, so be sure to read release notes if you plan on using experimental APIs.

### Addons

Addons in `xterm-headless` work the [same as in `xterm`](https://github.com/xtermjs/xterm.js/blob/master/README.md#addons) with the one caveat being that the addon needs to be packaged for node.js and not use any DOM APIs.

Currently no official addons are packaged on npm.

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