whatisgithub

What is restty?

wiedymi/restty — explained in plain English

Analysis updated 2026-05-18

349TypeScriptAudience · developer

In one sentence

A fast, GPU-accelerated terminal emulator you can embed inside a web page, built on the same engine that powers the Ghostty terminal app.

Mindmap

mindmap
  root((Restty))
    What it does
      Browser terminal emulator
      GPU accelerated rendering
      Split panes
      Custom themes
    Tech stack
      TypeScript
      WebGPU
      WebAssembly
      WGSL GLSL
    Use cases
      Embed in web apps
      Migrate from xterm.js
      Shader effects
    Audience
      Web developers
      Tool builders

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 real, fast command-line terminal inside a web application.

USE CASE 2

Migrate an existing xterm.js based terminal UI to a GPU-accelerated renderer.

USE CASE 3

Add split terminal panes and custom color themes to a browser-based dev tool.

USE CASE 4

Apply custom shader effects like a CRT vignette to a web terminal.

What is it built with?

TypeScriptWebGPUWebGL2WebAssemblyWGSLGLSL

So what is it?

Restty is an open-source terminal emulator that runs inside a web browser, built for developers who want to embed a real command-line terminal in a web app. Unlike older browser terminal libraries, it uses WebGPU (a modern graphics API) with a WebGL2 fallback for rendering, and pulls its terminal logic from libghostty-vt (the core of the Ghostty terminal app) compiled to WebAssembly. The result is a fast, visually accurate terminal that supports advanced features like programming ligatures (where certain character combinations merge into single glyphs), proper text shaping, and split panes. The API is straightforward: you drop a div on the page, create a Restty instance pointing at it, and connect it to a WebSocket endpoint that provides a shell session. From there you can split the terminal into multiple panes horizontally or vertically, apply color themes (including custom Ghostty theme files), swap fonts at runtime, send input programmatically, and extend behavior with a plugin system. For visual effects, it exposes a shader stage API where you write WGSL or GLSL graphics code that runs on the GPU after each frame renders, enabling effects like CRT-style vignette or monochrome overlays. There's also an xterm.js compatibility layer for teams migrating from that older library. It installs as an npm package with a single command.

Copy-paste prompts

Prompt 1
Show me how to embed a Restty terminal instance in a div and connect it to a WebSocket shell.
Prompt 2
Explain the difference between Restty's WebGPU rendering and older browser terminal libraries.
Prompt 3
Help me write a WGSL shader stage for Restty that adds a CRT vignette effect.
Prompt 4
Walk me through migrating an xterm.js based terminal to Restty using its compatibility layer.

Frequently asked questions

What is restty?

A fast, GPU-accelerated terminal emulator you can embed inside a web page, built on the same engine that powers the Ghostty terminal app.

What language is restty written in?

Mainly TypeScript. The stack also includes TypeScript, WebGPU, WebGL2.

Who is restty for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.