Repolode
xtermjs

xtermjs/xterm.js

A frontend terminal component for the browser that lets web apps embed fully-featured terminals, used by VS Code and Hyper.

Stars
21,287
Forks
2,021
Open issues
322
Last commit
9 days ago

What is it?

Xterm.js is a frontend component that lets web applications display a full terminal to their users inside the browser. It is used by projects such as VS Code and its forks, Tabby and Hyper. It is installed from npm as @xterm/xterm and has zero dependencies in its core library.

Xterm.js is not a standalone terminal app and not a shell. It renders output and forwards keyboard input, and is typically connected to a process through a pseudoterminal API such as node-pty. Terminal programs like bash, vim and tmux work through it, including curses-based apps and mouse events. Support covers CJK characters, emoji and IMEs, and an optional GPU-accelerated WebGL renderer is available.

The project provides a set of official addons for fit-to-container sizing, search, web link detection, image display, clipboard access, ligatures and serialization. A headless build, @xterm/headless, runs in Node.js to track terminal state without rendering.

Key features

  • 01Runs common terminal apps such as bash, vim and tmux, including mouse events.
  • 02Supports CJK characters, emoji and IMEs.
  • 03Offers an optional GPU-accelerated WebGL renderer.
  • 04Core library has zero dependencies and ships as an npm package.
  • 05Provides official addons for search, web links, fit sizing, images and more.

Use cases

  • Adding a web-based terminal to an online IDE or cloud development environment.
  • Building a browser SSH or remote shell client connected through a websocket.
  • Showing live container or build logs with terminal rendering in a dashboard.
  • Running a headless terminal in Node.js to save and restore session state.

Quick start

  1. 1

    Install the module from npm

    npm install --save @xterm/xterm
  2. 2

    Import Terminal in your code

    import { Terminal } from '@xterm/xterm';
  3. 3

    Create a terminal, open it on an element and write to it

  4. 4

    Include the xterm.css stylesheet in your page

Things to know

  • It is a frontend component for the browser, not a standalone terminal application.
  • It must be connected to a backend process such as node-pty to run commands like bash.

Topics

FAQ

What is xterm.js?
A frontend terminal component for the browser that lets web apps embed fully-featured terminals, used by VS Code and Hyper. Xterm.js is a frontend component that lets web applications display a full terminal to their users inside the browser. It is used by projects such as VS Code and its forks, Tabby and Hyper. It is installed from npm as @xterm/xterm and has zero dependencies in its core library.
Is xterm.js free to use? What license does it have?
xterm.js is open source under the MIT license. Check the license terms before using it in commercial products.
Is xterm.js still maintained?
Actively maintained. The last commit to xterm.js was on Oct 13, 2026.
What can I use xterm.js for?
Adding a web-based terminal to an online IDE or cloud development environment. Building a browser SSH or remote shell client connected through a websocket. Showing live container or build logs with terminal rendering in a dashboard. Running a headless terminal in Node.js to save and restore session state.
How do I install xterm.js?
Install the module from npm: npm install --save @xterm/xterm Import Terminal in your code: import { Terminal } from '@xterm/xterm'; Create a terminal, open it on an element and write to it Include the xterm.css stylesheet in your page
Where can I get xterm.js?
The source code and installation instructions are on GitHub: https://github.com/xtermjs/xterm.js

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects