Skip to content

Ghostty in the browser

ghostty-webgpu combines Ghostty’s terminal core, compiled to WebAssembly, with a browser host and four renderers. Use it to display shell sessions, build output, or an interactive command line inside your app.

Build your first terminal or connect a real shell. The site demo has an in-browser shell you can try before installing.

The main entry has automatic fitting, selection, scrollback, URL detection and OSC 8 links. It chooses WebGPU, WebGL2, Canvas 2D, then DOM according to the browser’s capabilities. The worker entry runs the emulator and GPU renderer off the main thread.

Ghostty owns parsing, screen state and cell widths. The browser owns font drawing and input events. The wasm core explains that boundary.

Start with a current browser and a bundler that can serve WebAssembly assets. WebGPU needs a secure context and a usable adapter. WebGL2 and Canvas 2D widen the fallback path. Worker mode needs dedicated workers, OffscreenCanvas and a supported GPU backend. Performance results are specific to the environments in the benchmark report.

These docs describe the source checkout. npm’s latest release is currently older than this API. Check the package releases when choosing a version.

Search, image protocols and ligatures remain planned work. The root roadmap tracks delivery. Accessibility has a text mirror and live region; a screen-reader audit is still needed.