aradotso avatar

Ghostling Libghostty Terminal

If you want to embed a real terminal in your app without pulling in all of Ghostty, this shows you how to wire up libghostty-vt's C API. It's a single-file example using Raylib for rendering, and the skill walks through the actual patterns: writing PTY data into the terminal state, encoding keyboard input to escape sequences, iterating the render state API to draw only dirty cells, and handling resize with reflow. The render state iterator is the interesting part, it tells you exactly which cells changed and hands you RGB colors and Unicode codepoints ready to draw. You still own PTY setup and windowing, but you get SIMD VT parsing and proper terminal state management. Good reference if you're building a custom UI that needs a terminal widget.

skills.sh installs
1.1K
GitHub stars
61
last updated
Jul 14, 2026

Install

$ npx -y skills add aradotso/trending-skills --skill ghostling-libghostty-terminal --agent claude-code

Installs into .claude/skills of the current project.

Files

Ghostling — libghostty Terminal Emulator

Skill by ara.so — Daily 2026 Skills collection.

Ghostling is a minimal viable terminal emulator built on libghostty-vt, the embeddable C library extracted from Ghostty. It uses Raylib for windowing/rendering and lives in a single C file. The project demonstrates how to wire libghostty-vt's VT parsing, terminal state, and render-state API to any 2D or GPU renderer.

What libghostty-vt Provides

  • VT sequence parsing (SIMD-optimized)
  • Terminal state: cursor, styles, text reflow, scrollback
  • Render state management (what cells changed and how to draw them)
  • Unicode / multi-codepoint grapheme handling
  • Kitty keyboard protocol, mouse tracking, focus reporting
  • Zero dependencies (not even libc) — WASM-compatible

libghostty-vt does NOT provide: windowing, rendering, PTY management, tabs, splits, or configuration.

Requirements

ToolVersion
CMake3.19+
Ninjaany
C compilerclang/gcc
Zig0.15.x (on PATH)
macOSXcode CLT or Xcode

Build & Run

# Clone
git clone https://github.com/ghostty-org/ghostling.git
cd ghostling

Sponsors

Details

Repository
github.com/aradotso/trending-skills
Category
CLI & Terminal
First seen
Apr 16, 2026

More from aradotso/trending-skills

All 251
1jetbrains avatarteamcity-clijetbrains/teamcity-cliUse when working with TeamCity CI/CD or when a user provides a TeamCity build URL — drives the `teamcity` CLI for builds, logs, jobs, queues, agents, pools, pro1.1Kskills.sh installs
2daymade avatarcapture-screendaymade/claude-code-skillsProgrammatic screenshot capture on macOS. Find window IDs with Swift CGWindowListCopyWindowInfo, control application windows via AppleScript (zoom, scroll, sele1.1Kskills.sh installs
3riba2534 avatarfeishu-cli-toolkitriba2534/feishu-cli飞书轻量工具箱与分诊入口。仅在没有更专用 skill 时使用,主要覆盖普通电子表格、 日历/日程、任务/任务清单、基础文件/素材/评论、知识库、用户和部门查询、审批查询。 文档读写导入导出、云盘增强、多维表格、画板、消息/群聊、邮箱、搜索、权限、OAuth、 视频会议/妙记均优先使用对应 feishu-cli-* 专用1.1Kskills.sh installs
4netlify avatarnetlify-cli-and-deploynetlify/context-and-toolsGuide for using the Netlify CLI and deploying sites. Use when installing the CLI, linking sites, deploying (Git-based or manual), managing environment variables1Kskills.sh installs
5sbroenne avatarexcel-clisbroenne/mcp-server-excelExcel CLI automation skill for Windows workbooks. Use when a coding agent needs token-efficient, scriptable, or unattended Excel automation via excelcli command1Kskills.sh installs
6oimiragieo avatargcloud-clioimiragieo/agent-studiogcloud cli999skills.sh installs