Vibeleaderboard
Index / tool
Visit github.com
Category
Developer Tools
Rank
No. 1409Tools index
Pricing
Open Source
Type
TOOL
Interfaces
CLI
Date

About

Minimum viable terminal emulator built on libghostty's C API — reference implementation for the Ghostty engine.

What it does

Ghostling opens the user’s shell inside a graphical window, passes terminal output through Ghostty’s parsing and state engine, and draws the result with Raylib. It handles resizing, scrollback, colors, text styles, Unicode graphemes, keyboard input, mouse reporting, focus events, and Kitty protocols.

Why it's ranked here

This is a strong teaching artifact for developers embedding terminal behavior. Its small C application exposes the practical boundary between terminal state, operating-system process handling, input translation, and rendering. The candid warnings matter: this is demonstration code, not a carefully audited terminal for routine use.

What's good

The project keeps the surrounding application understandable while inheriting substantial terminal behavior from the library. It demonstrates text reflow, rich color, styles, scrollback, several mouse modes, Unicode graphemes, and graphics support. The renderer remains replaceable because the terminal engine manages render state without owning windowing or drawing.

Tradeoffs

The application is single-threaded and uses a basic 2D renderer rather than direct GPU rendering. Raylib cannot provide sufficiently rich input events for every Kitty keyboard case. There is no clipboard integration, text shaping, tabs, splits, multiple windows, session management, configuration interface, or search interface. Windows operation remains untested or unimplemented here.

How to use it well

Use Ghostling when learning the C embedding surface, prototyping a custom terminal interface, or studying how shell processes, terminal state, input, and rendering connect. Build an optimized configuration before measuring performance. Choose a full terminal application when you need workspace management, configuration, search, clipboard support, or daily-use assurance.

Technical notes+

main.c is a C11 application that starts the user’s shell through forkpty(), makes the PTY master nonblocking, feeds output into ghostty_terminal_vt_write(), translates Raylib keyboard and mouse events, and embeds JetBrains Mono in the binary. CMakeLists.txt fetches Raylib 5.5 when unavailable locally, fetches a pinned Ghostty revision, links ghostty-vt, and invokes bin2header.cmake to generate the font header. flake.nix supplies Zig, CMake, Ninja, and platform libraries. .github/workflows/test.yml performs Nix-based builds on Linux and macOS.

Observed

License
MIT License; bundled JetBrains Mono font uses SIL Open Font License 1.1
Primary language
C11
Interface
Graphical terminal executable backed by libghostty-vt’s C API
Build surface
Source build with CMake 3.19+, Ninja, a C compiler, and Zig 0.16.x
Platform support
Linux and macOS have CI build jobs; Windows support is untested or not implemented in Ghostling
Project structure
The terminal application is implemented in one C source file
Rendering
Raylib provides windowing and 2D rendering; libghostty-vt provides terminal and render state

Read from README.md, main.c, .envrc, LICENSE, AGENTS.md, flake.nix, flake.lock, CMakeLists.txt, bin2header.cmake, fonts/OFL.txt, .github/pinact.yml, .github/workflows/test.yml.

What it can do

  • Execute terminal commands

    Command line instructions → Command execution results and output text

  • Display terminal sessions

    Terminal process data → Rendered terminal interface with text and formatting

  • Process keyboard input

    Keyboard keystrokes and key combinations → Terminal commands and text input

  • Handle text rendering

    Terminal text data with escape sequences → Formatted text display with colors and styling

  • Manage terminal processes

    Process spawn requests → Running terminal process instances

Tags

terminalghosttyreferencecminimal

Tech Stack

CCMakeNixShell

Comments (0)

No comments yet

Editorially curated, with community endorsements as a secondary signal. Corrections welcome.