{"_id":"@0xbigboss/ghostty-web","_rev":"3-834f20b238400a9617c0116f606b79ef","name":"@0xbigboss/ghostty-web","dist-tags":{"latest":"0.5.0"},"versions":{"0.4.0":{"name":"@0xbigboss/ghostty-web","version":"0.4.0","keywords":["terminal","terminal-emulator","ghostty","web","xterm","vt100","wasm","webassembly","ansi","tty","vscode"],"author":{"name":"0xBigBoss"},"license":"MIT","_id":"@0xbigboss/ghostty-web@0.4.0","maintainers":[{"name":"0xbigboss","email":"0xbigboss@proton.me"}],"contributors":[{"url":"https://github.com/coder","name":"Coder"}],"homepage":"https://github.com/0xBigBoss/ghostty-web#readme","bugs":{"url":"https://github.com/0xBigBoss/ghostty-web/issues"},"dist":{"shasum":"0b288fad6490c1107c43c57b07c1474653323fb3","tarball":"https://registry.npmjs.org/@0xbigboss/ghostty-web/-/ghostty-web-0.4.0.tgz","fileCount":9,"integrity":"sha512-iQYdWx1uxP5xI0qMFSGEmSQ2LxyXZTsrxtppp/+n2FaY8l+IypmcawUhcksYQ0fzmMdxV6CD+LE8HYdzmzxgzQ==","signatures":[{"sig":"MEUCIQDqwjOPvDSg1Eo3hdBEys8BL94+VoSdFNivZJGHzBDRQAIgUCfI7L5QH6su2ZPWrsLCGUihtucEILgpMS6QE7x+l/g=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":2245089},"main":"./dist/ghostty-web.umd.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/ghostty-web.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/ghostty-web.js","require":"./dist/ghostty-web.umd.cjs"},"./ghostty-vt.wasm":"./ghostty-vt.wasm"},"scripts":{"dev":"vite --port 8000","fmt":"prettier --check .","demo":"node demo/bin/demo.js","lint":"biome check .","test":"bun test","build":"bun run clean && bun run build:wasm && bun run build:lib && bun run build:wasm-copy","clean":"rm -rf dist","fmt:fix":"prettier --write --cache .","preview":"vite preview","demo:dev":"node demo/bin/demo.js --dev","lint:fix":"biome check --write .","prebuild":"bun install","build:lib":"vite build","typecheck":"tsc --noEmit","build:wasm":"./scripts/build-wasm.sh","prepublishOnly":"bun run build","build:wasm-copy":"cp ghostty-vt.wasm dist/"},"_npmUser":{"name":"0xbigboss","email":"0xbigboss@proton.me"},"repository":{"url":"git+https://github.com/0xBigBoss/ghostty-web.git","type":"git"},"_npmVersion":"9.9.2","description":"Web-based terminal emulator using Ghostty's VT100 parser via WebAssembly. Fork with enhanced selection handling.","directories":{},"_nodeVersion":"22.15.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^4.5.0","mitata":"^1.0.34","prettier":"^3.6.2","@types/bun":"^1.3.2","typescript":"^5.9.3","@xterm/xterm":"^5.5.0","@biomejs/biome":"^1.9.4","@xterm/headless":"^5.5.0","vite-plugin-dts":"^4.5.4","@happy-dom/global-registrator":"^15.11.0"},"_npmOperationalInternal":{"tmp":"tmp/ghostty-web_0.4.0_1767884379984_0.15139252876443998","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"@0xbigboss/ghostty-web","version":"0.5.0","keywords":["terminal","terminal-emulator","ghostty","web","xterm","vt100","wasm","webassembly","ansi","tty"],"author":{"name":"Coder"},"license":"MIT","_id":"@0xbigboss/ghostty-web@0.5.0","maintainers":[{"name":"0xbigboss","email":"0xbigboss@proton.me"}],"homepage":"https://github.com/coder/ghostty-web#readme","bugs":{"url":"https://github.com/coder/ghostty-web/issues"},"dist":{"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},"main":"./dist/ghostty-web.umd.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/ghostty-web.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/ghostty-web.js","require":"./dist/ghostty-web.umd.cjs"},"./ghostty-vt.wasm":"./ghostty-vt.wasm"},"scripts":{"dev":"vite --port 8000","fmt":"prettier --check .","demo":"node demo/bin/demo.js","lint":"biome check .","test":"bun test","build":"bun run clean && bun run build:wasm && bun run build:lib && bun run build:wasm-copy","clean":"rm -rf dist","fmt:fix":"prettier --write --cache .","preview":"vite preview","demo:dev":"node demo/bin/demo.js --dev","lint:fix":"biome check --write .","prebuild":"bun install","build:lib":"vite build","typecheck":"tsc --noEmit","build:wasm":"./scripts/build-wasm.sh","prepublishOnly":"bun run build","build:wasm-copy":"cp ghostty-vt.wasm dist/"},"_npmUser":{"name":"0xbigboss","email":"0xbigboss@proton.me"},"repository":{"url":"git+https://github.com/coder/ghostty-web.git","type":"git"},"_npmVersion":"9.9.2","description":"Web-based terminal emulator using Ghostty's VT100 parser via WebAssembly","directories":{},"_nodeVersion":"22.15.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^4.5.0","mitata":"^1.0.34","prettier":"^3.6.2","@types/bun":"^1.3.2","typescript":"^5.9.3","@xterm/xterm":"^5.5.0","@biomejs/biome":"^1.9.4","@xterm/headless":"^5.5.0","vite-plugin-dts":"^4.5.4","@happy-dom/global-registrator":"^15.11.0"},"_npmOperationalInternal":{"tmp":"tmp/ghostty-web_0.5.0_1768192175481_0.8964003248076073","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2026-01-08T14:59:39.920Z","modified":"2026-06-24T17:39:10.250Z","0.4.0":"2026-01-08T14:59:40.136Z","0.5.0":"2026-01-12T04:29:35.662Z"},"bugs":{"url":"https://github.com/coder/ghostty-web/issues"},"author":{"name":"Coder"},"license":"MIT","homepage":"https://github.com/coder/ghostty-web#readme","keywords":["terminal","terminal-emulator","ghostty","web","xterm","vt100","wasm","webassembly","ansi","tty"],"repository":{"url":"git+https://github.com/coder/ghostty-web.git","type":"git"},"description":"Web-based terminal emulator using Ghostty's VT100 parser via WebAssembly","maintainers":[{"email":"0xbigboss@proton.me","name":"alleneubank"}],"readme":"# ghostty-web\n\n[![NPM Version](https://img.shields.io/npm/v/ghostty-web)](https://npmjs.com/package/ghostty-web) [![NPM Downloads](https://img.shields.io/npm/dw/ghostty-web)](https://npmjs.com/package/ghostty-web) [![npm bundle size](https://img.shields.io/bundlephobia/minzip/ghostty-web)](https://npmjs.com/package/ghostty-web) [![license](https://img.shields.io/github/license/coder/ghostty-web)](./LICENSE)\n\n[Ghostty](https://github.com/ghostty-org/ghostty) for the web with [xterm.js](https://github.com/xtermjs/xterm.js) API compatibility — giving you a proper VT100 implementation in the browser.\n\n- Migrate from xterm by changing your import: `@xterm/xterm` → `ghostty-web`\n- WASM-compiled parser from Ghostty—the same code that runs the native app\n- Zero runtime dependencies, ~400KB WASM bundle\n\nOriginally created for [Mux](https://github.com/coder/mux) (a desktop app for isolated, parallel agentic development), but designed to be used anywhere.\n\n## Try It\n\n- [Live Demo](https://ghostty.ondis.co) on an ephemeral VM (thank you to Greg from [disco.cloud](https://disco.cloud) for hosting).\n\n- On your computer:\n\n  ```bash\n  npx @ghostty-web/demo@next\n  ```\n\n  This starts a local HTTP server with a real shell on `http://localhost:8080`. Works best on Linux and macOS.\n\n![ghostty](https://github.com/user-attachments/assets/aceee7eb-d57b-4d89-ac3d-ee1885d0187a)\n\n## Comparison with xterm.js\n\nxterm.js is everywhere—VS Code, Hyper, countless web terminals. But it has fundamental issues:\n\n| Issue                                    | xterm.js                                                         | ghostty-web                |\n| ---------------------------------------- | ---------------------------------------------------------------- | -------------------------- |\n| **Complex scripts** (Devanagari, Arabic) | Rendering issues                                                 | ✓ Proper grapheme handling |\n| **XTPUSHSGR/XTPOPSGR**                   | [Not supported](https://github.com/xtermjs/xterm.js/issues/2570) | ✓ Full support             |\n\nxterm.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.\n\n## Installation\n\n```bash\nnpm install ghostty-web\n```\n\n## Usage\n\nghostty-web aims to be API-compatible with the xterm.js API.\n\n```javascript\nimport { init, Terminal } from 'ghostty-web';\n\nawait init();\n\nconst term = new Terminal({\n  fontSize: 14,\n  theme: {\n    background: '#1a1b26',\n    foreground: '#a9b1d6',\n  },\n});\n\nterm.open(document.getElementById('terminal'));\nterm.onData((data) => websocket.send(data));\nwebsocket.onmessage = (e) => term.write(e.data);\n```\n\nFor a comprehensive client <-> server example, refer to the [demo](./demo/index.html#L141).\n\n## Development\n\nghostty-web builds from Ghostty's source with a [patch](./patches/ghostty-wasm-api.patch) to expose additional\nfunctionality.\n\n> Requires Zig and Bun.\n\n```bash\nbun run build\n```\n\nMitchell Hashimoto (author of Ghostty) has [been working](https://mitchellh.com/writing/libghostty-is-coming) 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.\n\nThis library will eventually consume a native Ghostty WASM distribution once available, and will continue to provide an xterm.js compatible API.\n\nAt Coder we're big fans of Ghostty, so kudos to that team for all the amazing work.\n\n## License\n\n[MIT](./LICENSE)\n","readmeFilename":"README.md"}