ReferencePackages
@mwillbanks/tuil-ghostty-web
Browser adapter that runs existing TUIL Ink applications inside Ghostty Web.
Overview
Browser adapter that runs existing TUIL Ink applications inside Ghostty Web.
@mwillbanks/tuil-ghostty-web is independently installable and also participates in the
umbrella @mwillbanks/tuil runtime where applicable.
Installation
npm install @mwillbanks/tuil-ghostty-webHow it operates
The optional browser adapter connects the existing Ink runtime to Ghostty Web through bounded TTY streams, ordered output, input forwarding, resize events, and a semantic DOM companion.
API
| API | Signature | Description |
|---|---|---|
createTuilGhosttyDocumentApp | export createTuilGhosttyDocumentApp | Public export createTuilGhosttyDocumentApp. |
createTuilGhosttyDocumentSession | export createTuilGhosttyDocumentSession | Public export createTuilGhosttyDocumentSession. |
createTuilGhosttyFeasibilityApp | export createTuilGhosttyFeasibilityApp | Public export createTuilGhosttyFeasibilityApp. |
createTuilGhosttyStoryApp | function createTuilGhosttyStoryApp | Public function createTuilGhosttyStoryApp. |
generatePlaygroundTsx | export generatePlaygroundTsx | Public export generatePlaygroundTsx. |
initializeTuilGhostty | function initializeTuilGhostty | Public function initializeTuilGhostty. |
mountTuilGhostty | function mountTuilGhostty | Public function mountTuilGhostty. |
playgroundComponentCatalog | export playgroundComponentCatalog | Public export playgroundComponentCatalog. |
PlaygroundDocumentV1 | export PlaygroundDocumentV1 | Public export PlaygroundDocumentV1. |
PlaygroundNodeV1 | export PlaygroundNodeV1 | Public export PlaygroundNodeV1. |
TuilGhosttyAccessibilityOptions | interface TuilGhosttyAccessibilityOptions | Public interface TuilGhosttyAccessibilityOptions. |
TuilGhosttyInstance | interface TuilGhosttyInstance | Public interface TuilGhosttyInstance. |
TuilGhosttyMountOptions | interface TuilGhosttyMountOptions | Public interface TuilGhosttyMountOptions. |
TuilGhosttyStoryOptions | interface TuilGhosttyStoryOptions | Public interface TuilGhosttyStoryOptions. |
TuilGhosttyTerminalOptions | interface TuilGhosttyTerminalOptions | Public interface TuilGhosttyTerminalOptions. |
validatePlaygroundDocument | export validatePlaygroundDocument | Public export validatePlaygroundDocument. |
Events and lifecycle
Ghostty input enters the existing Ink input pipeline. Output and lifecycle failures reach the owning TUIL error boundary.
All subscriptions and registrations return a disposer or belong to an owning runtime that disposes them in reverse order.
Example
import { mountTuilGhostty } from "@mwillbanks/tuil-ghostty-web";
const terminal = await mountTuilGhostty({ app, element });
await terminal.unmount();