whatisgithub

What is xterm.js?

xtermjs/xterm.js — explained in plain English

Analysis updated 2026-06-21

20,436TypeScriptAudience · developerComplexity · 3/5Setup · moderate

In one sentence

A web component that embeds a fully working terminal inside a browser page, used by VS Code and browser-based IDEs to let users run real shell commands without leaving the browser.

Mindmap

mindmap
  root((repo))
    What it does
      Renders terminal in browser
      Handles keyboard input
      Streams shell output
    Addons
      WebGL renderer
      Fit to container
      Search in buffer
      Image support
    Tech stack
      TypeScript
      WebGL
      node-pty
    Use cases
      Cloud IDE terminal
      Browser SSH client
      Admin console
      Electron app
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Build a browser-based SSH client that connects to a remote server and renders shell output in a web page.

USE CASE 2

Add a real terminal panel to a cloud IDE or Electron desktop app.

USE CASE 3

Create an in-browser admin console that lets users run commands on a server.

USE CASE 4

Embed an interactive terminal in an educational platform for coding exercises.

What is it built with?

TypeScriptWebGLNode.jsnpm

How does it compare?

xtermjs/xterm.jsfullcalendar/fullcalendargeekyants/nativebase
Stars20,43620,45320,393
LanguageTypeScriptTypeScriptTypeScript
Setup difficultymoderateeasyeasy
Complexity3/52/53/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Core widget needs a separate library (node-pty) to connect to a real shell process.

So what is it?

Xterm.js is a building-block component for web developers that puts a fully working terminal, the kind of black, blinking-cursor command-line window you see on a computer, inside a web page. It powers the integrated terminal in VS Code and its forks, and standalone apps like Tabby and Hyper. Xterm.js is not a terminal app you download, and it is not bash. It is a front-end widget that draws the terminal screen and handles keyboard input, you connect it to a real shell (such as bash) through a separate library like node-pty. Keystrokes flow from the browser into the shell, and the shell's output is streamed back and rendered. It works with most terminal applications, including curses-based ones like vim and tmux, and supports mouse events. It has rich Unicode support (CJK, emojis, IMEs), an optional GPU-accelerated renderer, screen-reader and contrast settings, configurable theming and custom glyphs, and a documented API. Extra functionality lives in optional addons you install separately: fitting the terminal to its container, attaching to a remote process over WebSocket, clipboard access, search, image rendering, font ligatures, web-link detection, a WebGL renderer, serializing the buffer to VT escape sequences or HTML, and Unicode helpers. You would use xterm.js if you are building anything in the browser that needs a real terminal, a cloud IDE, an SSH client, a browser-based admin console, or an Electron desktop app. It is written in TypeScript with zero runtime dependencies in the core, distributed on npm as @xterm/xterm, and a headless build (@xterm/headless) is also available for Node.js. Supported browsers are the latest Chrome, Edge, Firefox, and Safari.

Copy-paste prompts

Prompt 1
Using xterm.js and node-pty in a Node.js/Express app, show me how to spawn a bash shell and stream its output to a browser terminal widget via WebSocket.
Prompt 2
How do I theme an xterm.js terminal with a dark background and custom font size, and fit it to fill its parent div automatically using the FitAddon?
Prompt 3
Show me how to enable the WebGL renderer addon in xterm.js for GPU-accelerated rendering and fall back to the canvas renderer if WebGL is unavailable.
Prompt 4
How do I add clickable hyperlink support to xterm.js using the WebLinksAddon, and open links in a new tab?
Prompt 5
Give me a minimal Electron app that embeds xterm.js connected to a local bash shell using node-pty.

Frequently asked questions

What is xterm.js?

A web component that embeds a fully working terminal inside a browser page, used by VS Code and browser-based IDEs to let users run real shell commands without leaving the browser.

What language is xterm.js written in?

Mainly TypeScript. The stack also includes TypeScript, WebGL, Node.js.

How hard is xterm.js to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is xterm.js for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.