Reward
libghostty: use Ghostty's terminal engine today
Where Ghostty's terminal engine already runs and how to use it: swap xterm.js for ghostty-web in the browser, what changed in JetBrains IDEs and Neovim, and what libghostty-vt 1.0 covers if you embed it yourself.
libghostty-vt is Ghostty's terminal core (it reads escape codes and keeps track of the screen) as a stable, MIT-licensed C library. Version 1.0 came out this week. It doesn't draw anything: each app renders the screen itself.
1. In the browser: swap xterm.js for ghostty-web
ghostty-web is Coder's MIT-licensed project. It aims to be API-compatible with xterm.js, so it's nearly a drop-in: swap the import and add await init().
npm install ghostty-web- import { Terminal } from '@xterm/xterm';
+ import { init, Terminal } from 'ghostty-web';
+ await init(); // loads the Wasm engine
const term = new Terminal({ fontSize: 14 });
term.open(document.getElementById('terminal'));
term.onData((d) => socket.send(d));
socket.onmessage = (e) => term.write(e.data);Before you ship it:
0 / 5 done
2. In a JetBrains IDE: you already run it
0 / 4 done
3. In Neovim: a PR, not a release
0 / 2 done
4. Embedding it yourself: what 1.0 covers
0 / 5 done