ghostty-org/ghostling logo

ghostty-org/ghostling

Free

A minimum viable terminal emulator built on top of the libghostty C API. Ex minimo, infinita nascuntur. 👻🐣

FreeFree tier
Type
Open Source
Company
Ghostty

About ghostty-org/ghostling

Ghostling is a demo project that showcases a minimum functional terminal emulator built on the libghostty C API in a single C file. It uses Raylib for windowing and rendering and is single-threaded, highlighting the flexibility of libghostty for embedding in various contexts. Despite being minimal, Ghostling supports a wide range of terminal features including text reflow on resize, full 24-bit color, Unicode and multi-codepoint grapheme handling, Kitty keyboard and graphics protocols, mouse tracking, and scrollbar drag-to-scroll. It inherits robust terminal emulation from Ghostty, proven by millions of daily users. Note: Ghostling is not intended as a daily-use terminal; it is a proof-of-concept and may not be fully audited for correctness.

Key Features

Single-file C implementation using libghostty C API
Resize with text reflow
Full 24-bit color and 256-color palette support
Bold, italic, and inverse text styles
Unicode and multi-codepoint grapheme handling (no shaping)
Keyboard input with modifier support (Shift, Ctrl, Alt, Super)
Kitty keyboard protocol and Kitty graphics protocol support
Mouse tracking (X10, normal, button, any-event modes) and multiple reporting formats
Scroll wheel support (viewport scrollback or forwarded to applications)
Scrollbar with mouse drag-to-scroll

Pros & Cons

Pros
  • Minimal and straightforward codebase, easy to understand and modify
  • Leverages proven libghostty library with millions of daily users
  • Supports a comprehensive set of terminal features despite being a demo
  • Single-file design simplifies integration and experimentation
Cons
  • Not intended for daily use as a full-featured terminal
  • Warning: not extensively audited for correctness (C code)
  • Uses Raylib for rendering instead of direct GPU renderer
  • Clipboard support (OSC) not yet exposed by libghostty-vt
  • Windows support untested in Ghostling (libghostty-vt supports Windows)
  • Missing GUI features like tabs, splits, session management, configuration

Best For

Educational example of embedding terminal emulation via libghosttyLightweight terminal for minimal environments or embedded systemsTesting and debugging terminal features and protocolsReference implementation for building custom terminal applications

FAQ

What is libghostty?
Libghostty is an embeddable library extracted from Ghostty core, providing a C and Zig API for correct, fast terminal emulation. It handles VT parsing, terminal state, and renderer state without rendering or windowing code.
Is Ghostling meant for daily use?
No. Ghostling is a minimal viable terminal demo intended to showcase the flexibility of libghostty. It is not a full-featured, production-grade terminal for daily use.
What terminal features does Ghostling support?
Ghostling supports resize with text reflow, full 24-bit color, bold/italic/inverse styles, Unicode and grapheme handling, keyboard input with modifiers, Kitty keyboard and graphics protocols, mouse tracking and reporting, scroll wheel, scrollbar drag-to-scroll, and focus reporting.
What features are missing or not yet implemented?
OSC clipboard support is not properly exposed by libghostty-vt yet. Windows support is untested in Ghostling. Features like tabs, splits, session management, and configuration are not part of libghostty and are not provided.