Catalog npm
Back to packageRELEASE DETAILS

0.5.0

npm

@0xbigboss/ghostty-web

Web-based terminal emulator using Ghostty's VT100 parser via WebAssembly

ansighosttyterminalterminal-emulatorttyvt100wasmwebwebassemblyxtermvscode
Published12 Jan 2026
Direct dependencies10
Transitive dependenciesNot calculated

README

Current package documentation

ghostty-web

NPM Version NPM Downloads npm bundle size license

Ghostty for the web with xterm.js API compatibility — giving you a proper VT100 implementation in the browser.

  • Migrate from xterm by changing your import: @xterm/xterm → ghostty-web
  • WASM-compiled parser from Ghostty—the same code that runs the native app
  • Zero runtime dependencies, ~400KB WASM bundle

Originally created for Mux (a desktop app for isolated, parallel agentic development), but designed to be used anywhere.

Try It

  • Live Demo on an ephemeral VM (thank you to Greg from disco.cloud for hosting).

  • On your computer:

    npx @ghostty-web/demo@next
    

    This starts a local HTTP server with a real shell on http://localhost:8080. Works best on Linux and macOS.

ghostty

Comparison with xterm.js

xterm.js is everywhere—VS Code, Hyper, countless web terminals. But it has fundamental issues:

Issuexterm.jsghostty-web
Complex scripts (Devanagari, Arabic)Rendering issues✓ Proper grapheme handling
XTPUSHSGR/XTPOPSGRNot supported✓ Full support

xterm.js reimplements terminal emulation in JavaScript. Every escape sequence, every edge case, every Unicode quirk—all hand-coded. Ghostty's emulator is the same battle-tested code that runs the native Ghostty app.

Installation

npm install ghostty-web

Usage

ghostty-web aims to be API-compatible with the xterm.js API.

import { init, Terminal } from 'ghostty-web';

await init();

const term = new Terminal({
  fontSize: 14,
  theme: {
    background: '#1a1b26',
    foreground: '#a9b1d6',
  },
});

term.open(document.getElementById('terminal'));
term.onData((data) => websocket.send(data));
websocket.onmessage = (e) => term.write(e.data);

For a comprehensive client <-> server example, refer to the demo.

Development

ghostty-web builds from Ghostty's source with a patch to expose additional functionality.

Requires Zig and Bun.

bun run build

Mitchell Hashimoto (author of Ghostty) has been working on libghostty which makes this all possible. The patches are very minimal thanks to the work the Ghostty team has done, and we expect them to get smaller.

This library will eventually consume a native Ghostty WASM distribution once available, and will continue to provide an xterm.js compatible API.

At Coder we're big fans of Ghostty, so kudos to that team for all the amazing work.

License

MIT

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 10

Native requirements
10 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
vite
Environment
{
  "local_name": "vite",
  "alias": false,
  "peer_metadata": null
}
^4.5.0development
mitata
Environment
{
  "local_name": "mitata",
  "alias": false,
  "peer_metadata": null
}
^1.0.34development
prettier
Environment
{
  "local_name": "prettier",
  "alias": false,
  "peer_metadata": null
}
^3.6.2development
@types/bun
Environment
{
  "local_name": "@types/bun",
  "alias": false,
  "peer_metadata": null
}
^1.3.2development
typescript
Environment
{
  "local_name": "typescript",
  "alias": false,
  "peer_metadata": null
}
^5.9.3development
@xterm/xterm
Environment
{
  "local_name": "@xterm/xterm",
  "alias": false,
  "peer_metadata": null
}
^5.5.0development
@biomejs/biome
Environment
{
  "local_name": "@biomejs/biome",
  "alias": false,
  "peer_metadata": null
}
^1.9.4development
@xterm/headless
Environment
{
  "local_name": "@xterm/headless",
  "alias": false,
  "peer_metadata": null
}
^5.5.0development
vite-plugin-dts
Environment
{
  "local_name": "vite-plugin-dts",
  "alias": false,
  "peer_metadata": null
}
^4.5.4development
@happy-dom/global-registrator
Environment
{
  "local_name": "@happy-dom/global-registrator",
  "alias": false,
  "peer_metadata": null
}
^15.11.0development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "shasum": "07d9d6785e01389cf3afe8f400402e0267f3bd64",
  "tarball": "https://registry.npmjs.org/@0xbigboss/ghostty-web/-/ghostty-web-0.5.0.tgz",
  "fileCount": 9,
  "integrity": "sha512-CQWyGy+26eK/nJPkab7gGZwd1CDJ29hfz+IzAZPD4V7mCxWN8emT1oHbEEzvil+6/WLU3k29yfDeV89whS64BA==",
  "signatures": [
    {
      "sig": "MEYCIQDneqsv+GJvfleNXuq+b78EP/R6Uzlg6UrSUcS/C6orhwIhAMWW38CFou7imZFKuJ3S0r+pX/8ioV2I6p/B3nug1hC1",
      "keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"
    }
  ],
  "unpackedSize": 2259697
}

Repository

PENDING
0xbigboss/ghostty-web

Shared repository data · GitHub

License detected in repository
Not collected

Repository

PENDING
coder/ghostty-web

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 22:42 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:62fee304d053ca6c934c2f7d1bdec68b47d6b4794c11b607c64dd77f3d854e4e

Other collected versions

0.4.08 JanView all collected versions →