whatisgithub

What is wterm?

vercel-labs/wterm — explained in plain English

Analysis updated 2026-05-18

2,937TypeScriptAudience · developerComplexity · 3/5LicenseSetup · moderate

In one sentence

A terminal emulator for the web that renders to the DOM for native text selection and accessibility, powered by a Zig and WASM core.

Mindmap

mindmap
  root((wterm))
    What it does
      Web terminal emulator
      Renders to DOM
      Native text selection
    Tech stack
      Zig
      WebAssembly
      React and Vue
    Use cases
      Browser based terminals
      Web IDE consoles
      Remote shell access
    Setup
      Zig toolchain
      Node and pnpm

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

Embed a terminal in a web app that connects to a remote shell over WebSocket.

USE CASE 2

Add a browser based terminal to a React or Vue application using the framework specific packages.

USE CASE 3

Run terminal style apps like vim, less, or htop inside a browser tab via the alternate screen buffer support.

What is it built with?

TypeScriptZigWebAssemblyReactVue

How does it compare?

vercel-labs/wtermpmndrs/use-cannonnutlope/self.so
Stars2,9372,9482,980
LanguageTypeScriptTypeScriptTypeScript
Setup difficultymoderatemoderatemoderate
Complexity3/53/53/5
Audiencedeveloperdevelopervibe coder

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

How do you get it running?

Difficulty · moderate Time to first run · 30min

Building from source requires the Zig 0.16+ toolchain in addition to Node.js 20+ and pnpm.

Apache 2.0: free to use, modify, and distribute, including commercially, as long as you keep the license and copyright notice.

So what is it?

wterm, pronounced dub term, is a terminal emulator built for the web. Unlike many terminal emulators that draw everything onto a canvas, wterm renders its output directly to the DOM, which means native text selection, copy and paste, browser find, and accessibility support all work automatically without extra code. The core parsing engine is written in Zig and compiled to WebAssembly for near native performance. The project is organized as a set of packages that build on each other. The core package is a headless WebAssembly bridge with a TerminalCore interface and a WebSocket transport for connecting to a backend. On top of that sit framework specific packages: a DOM renderer for vanilla JavaScript use, a React component with a useTerminal hook, and a Vue 3 component with a template ref API. There is also an optional full featured VT emulation core powered by libghostty for applications that need complete terminal compatibility, an in browser Bash shell package, and a package for rendering Markdown inside the terminal. Feature wise, wterm supports the alternate screen buffer needed for full screen terminal apps like vim, less, and htop, keeps a configurable scrollback history, supports 24 bit color, automatically resizes using ResizeObserver, and only redraws rows that actually changed on each frame for efficiency. It ships with several built in themes, including Solarized Dark and Monokai, defined through CSS custom properties. To build wterm from source you need Zig 0.16 or newer, Node.js 20 or newer, and pnpm 10 or newer. After installing dependencies with pnpm, you compile the WebAssembly binary with zig build, then build the JavaScript packages with pnpm build. The repository includes a vanilla demo that can be served with any static file server, a Next.js example app, and a Zig test suite runnable with zig build test. wterm is released under the Apache 2.0 license.

Copy-paste prompts

Prompt 1
Help me build the wterm WebAssembly binary and run the vanilla demo locally.
Prompt 2
Show me how to add the wterm React component with the useTerminal hook to my app.
Prompt 3
Explain the difference between the lightweight Zig core and the libghostty backend in wterm.
Prompt 4
Walk me through connecting wterm to a WebSocket based PTY backend.

Frequently asked questions

What is wterm?

A terminal emulator for the web that renders to the DOM for native text selection and accessibility, powered by a Zig and WASM core.

What language is wterm written in?

Mainly TypeScript. The stack also includes TypeScript, Zig, WebAssembly.

What license does wterm use?

Apache 2.0: free to use, modify, and distribute, including commercially, as long as you keep the license and copyright notice.

How hard is wterm to set up?

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

Who is wterm for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.