Repolode
coder

coder/ghostty-web

A browser terminal emulator built on Ghostty's WASM-compiled VT parser, with an xterm.js-compatible API.

Stars
2,980
Forks
186
Open issues
69
Last commit
4 days ago

What is it?

ghostty-web brings Ghostty's terminal emulator to the browser as an npm package. The parser is compiled to WebAssembly from Ghostty's own source, so it is the same VT100 implementation used by the native Ghostty app, rather than a JavaScript reimplementation.

The library aims to be API-compatible with xterm.js, so existing projects can switch by changing the import from `@xterm/xterm` to `ghostty-web`. It has no runtime dependencies and ships a WASM bundle of roughly 400KB. The README notes better handling of complex scripts such as Devanagari and Arabic, and support for XTPUSHSGR/XTPOPSGR, which xterm.js does not implement.

The project was created for Mux, a desktop app for parallel agentic development, and is designed for general use. An npx demo starts a local shell served on a loopback address, protected by a per-run token.

Key features

  • 01Parser compiled to WebAssembly from Ghostty's source code
  • 02xterm.js-compatible API for easy migration
  • 03Zero runtime dependencies and a WASM bundle of about 400KB
  • 04Proper grapheme handling for complex scripts
  • 05Supports XTPUSHSGR/XTPOPSGR escape sequences

Use cases

  • Replacing xterm.js in a web-based terminal or IDE panel
  • Building browser-based shells that connect to a server over WebSocket
  • Embedding a terminal in a desktop app built with web technologies
  • Rendering terminal output with complex non-Latin scripts

Topics

FAQ

What is ghostty-web?
A browser terminal emulator built on Ghostty's WASM-compiled VT parser, with an xterm.js-compatible API. ghostty-web brings Ghostty's terminal emulator to the browser as an npm package. The parser is compiled to WebAssembly from Ghostty's own source, so it is the same VT100 implementation used by the native Ghostty app, rather than a JavaScript reimplementation.
Is ghostty-web free to use? What license does it have?
ghostty-web is open source under the MIT license. Check the license terms before using it in commercial products.
Is ghostty-web still maintained?
Actively maintained. The last commit to ghostty-web was on Oct 15, 2026.
What can I use ghostty-web for?
Replacing xterm.js in a web-based terminal or IDE panel Building browser-based shells that connect to a server over WebSocket Embedding a terminal in a desktop app built with web technologies Rendering terminal output with complex non-Latin scripts
Where can I get ghostty-web?
The source code and installation instructions are on GitHub: https://github.com/coder/ghostty-web

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

Related projects