gespenst API - v0.1.0
    Preparing search index...

    Core Guide

    Build a fast browser terminal with the native @gespenst/core API. The guide starts with a rendered terminal, then covers PTY transport, sizing, fonts, application policy, and performance.

    Goal Start here
    Render a terminal in a web application Getting Started
    Attach a remote shell or local PTY Connecting a PTY
    Tune workers, rendering, scrollback, or accessibility Configuration
    Make fonts, sizing, and themes predictable Layout, Fonts, and Themes
    Customize colors, transparency, and ANSI palettes Theming
    Enable secure text, image, or rich-content paste Clipboard and MIME Paste
    Run Ghostty VT without a DOM Headless Runtime
    Move an xterm.js integration Migrating from xterm.js

    The native API is byte-oriented. PTY output stays as Uint8Array data until Ghostty parses it, and terminal input is exposed in the same form. This keeps transport policy outside the renderer and avoids unnecessary text conversion on the hot path.

    Use @gespenst/core for the browser terminal and @gespenst/core/headless for the DOM-free runtime. Optional packages add WebSocket transport, browser-only WASIX shells, framework bindings, search, serialization, clipboard access, fonts, links, and xterm.js compatibility.

    The package vendors a checksummed Ghostty nightly WASM artifact. Pin package versions in production so a dependency update and a Ghostty engine update happen together and can be tested together.