|
2 | 2 |
|
3 | 3 |  |
4 | 4 |
|
5 | | -`ghostty-web` is a fully-featured web terminal built on [Ghostty's](https://github.com/ghostty-org/ghostty) |
6 | | -terminal emulation core compiled to WebAssembly. By leveraging Ghostty's production-tested VT100 parser |
7 | | -and state machine, `ghostty-web` delivers fast, robust terminal emulation in the browser. For many use |
8 | | -cases it is a drop-in replacement for xterm.js. |
| 5 | +`ghostty-web` is a web terminal developed for [mux](https://github.com/coder/mux) using |
| 6 | +[mux](https://github.com/coder/mux) that leverages [Ghostty's](https://github.com/ghostty-org/ghostty) |
| 7 | +terminal emulation core via WebAssembly. Because it leans on Ghostty to handle the complexity of terminal |
| 8 | +emulation, `ghostty-web` can deliver fast, robust terminal emulation in the browser. The intent is |
| 9 | +for this project to become a drop-in replacement for xterm.js. If it's not obvious, this repo is currently |
| 10 | +under heavy development. |
9 | 11 |
|
10 | 12 | ## Live Demo |
11 | 13 |
|
12 | | -Try ghostty-web instantly with: |
| 14 | +Try ghostty-web yourself with: |
13 | 15 |
|
14 | 16 | ```bash |
15 | | -npx @ghostty-web/demo |
| 17 | +npx @ghostty-web/demo@next |
16 | 18 | ``` |
17 | 19 |
|
18 | | -This starts a local demo server with a real shell session. Works on Linux, macOS, and Windows. |
| 20 | +This starts a local demo server with a real shell session. The demo server works best when run from Linux, but you can also try |
| 21 | +it on macOS. Windows is not supported (yet). Chrome is the only supported browser at the moment. |
19 | 22 |
|
20 | 23 | <details> |
21 | 24 | <summary>Development setup (building from source)</summary> |
22 | 25 |
|
23 | | -> [!NOTE] |
24 | 26 | > Requires Zig and Bun, see [Development](#development) |
25 | 27 |
|
26 | 28 | ```bash |
27 | 29 | git clone https://github.com/coder/ghostty-web |
28 | 30 | cd ghostty-web |
29 | 31 | bun install |
30 | 32 | bun run build # Builds the WASM module and library |
31 | | - |
32 | | -# Terminal 1: Start PTY Server |
33 | | -cd demo |
34 | | -bun install |
35 | | -bun run dev |
36 | | - |
37 | | -# Terminal 2: Start web server |
38 | | -bun run dev # http://localhost:8000/demo/ |
| 33 | +bun run demo:dev # http://localhost:8000/demo/ |
39 | 34 | ``` |
40 | 35 |
|
41 | 36 | </details> |
@@ -99,12 +94,6 @@ machine, and screen buffer) to WebAssembly, providing: |
99 | 94 | - Zero runtime dependencies (just ghostty-web + bundled WASM) |
100 | 95 | - Parser/state machine from Ghostty |
101 | 96 |
|
102 | | -## Why ghostty-web? |
103 | | - |
104 | | -- **Don't reimplement VT100 parsing** – it's thousands of edge cases refined over years. Instead, leverage Ghostty's battle-tested terminal emulator that's proven by thousands of daily users. |
105 | | -- **Drop-in xterm.js replacement** – for many use cases, ghostty-web can replace xterm.js with minimal code changes |
106 | | -- **Modern & maintained** – Built on Ghostty, an actively developed modern terminal emulator, ensuring continued improvements and bug fixes. |
107 | | - |
108 | 97 | ## Usage Examples |
109 | 98 |
|
110 | 99 | ### Basic Terminal |
@@ -146,8 +135,8 @@ term.onData((data) => { |
146 | 135 |
|
147 | 136 | ### Building WASM |
148 | 137 |
|
149 | | -`ghostty-web` builds a custom WASM binary from Ghostty's source with patches to expose additional |
150 | | -browser-specific functionality |
| 138 | +`ghostty-web` builds a custom WASM binary from Ghostty's source with a patch to expose additional |
| 139 | +functionality |
151 | 140 |
|
152 | 141 | ```bash |
153 | 142 | bun run build |
|
0 commit comments