Ghostty

Fast, native, feature-rich terminal emulator with GPU acceleration and an embeddable libghostty library for building custom terminals

57.6Kstars
3Kforks
MIT License
Zig

Ghostty is a high-performance, cross-platform terminal emulator that refuses the traditional trade-off between speed, features, and native platform experiences. Built primarily in Zig with a Metal renderer on macOS and OpenGL on Linux, it delivers sub-millisecond input latency through a multi-threaded architecture — one dedicated thread per terminal for reading, writing, and rendering — paired with SIMD-optimized VT sequence parsing.

Unlike terminals that aim for a least-common-denominator cross-platform feel, Ghostty commits to native platform experiences: a full SwiftUI application on macOS with menu bars, AppIntents, AppleScript, and CoreText font rendering; a GTK4 application on Linux with deep systemd integration for cgroup isolation and single-instance window management. The result is a terminal that feels like it was built exclusively for whatever platform you run it on.

In addition to being a standalone application, Ghostty ships libghostty — a zero-dependency C and Zig library for embedding a complete terminal emulator into any third-party application. The libghostty-vt component, already available for macOS, Linux, Windows, and WebAssembly, handles terminal sequence parsing and state management with a stable, battle-tested core. This makes Ghostty both a tool and a platform for terminal innovation.

Ghostty is actively used by millions of people and machines daily, has cleared all major roadmap milestones for standards compliance, performance, windowing, and native platform experiences, and maintains an unusually high bar for contribution quality through a vouch system and strict AI usage policy.

What You Get

  • GPU-accelerated rendering - Uses Metal on macOS and OpenGL on Linux for smooth, high-frame-rate terminal output with sub-pixel text rendering and minimal input-to-display latency.
  • libghostty and libghostty-vt - A zero-dependency C/Zig library for embedding full terminal emulation in third-party apps, with libghostty-vt already stable and available for macOS, Linux, Windows, and WebAssembly.
  • True native platform UI - A full SwiftUI app on macOS (AppIntents, AppleScript, CoreText, real menu bars) and a GTK4 app on Linux with systemd cgroup isolation and single-instance window management.
  • SIMD-optimized terminal parser - CPU-specific SIMD instructions via the Highway library accelerate VT sequence scanning for dramatically faster throughput on large output streams.
  • Multi-threaded per-terminal architecture - Dedicated read, write, and render threads per terminal surface eliminate head-of-line blocking and isolate latency sources for consistently responsive input.
  • Modern protocol support - Kitty graphics protocol, Kitty image protocol, synchronized rendering, clipboard sequences, and light/dark mode notifications — more modern protocol support than nearly any other terminal.
  • Rich windowing and tabbing - Multi-window, split panes, tab renaming, color-coded tabs, and configurable keybindings for complex multi-session workflows.
  • Hundreds of built-in themes - Light and dark mode-aware color schemes with separate light/dark theme selection and a comprehensive JSON configuration system.

Common Use Cases

  • Embedding a terminal in a custom GUI application - A developer uses libghostty-vt in a C or Zig project to add a fully standards-compliant terminal pane to an IDE, cloud console, or monitoring dashboard without building a terminal emulator from scratch.
  • High-throughput CLI workflows - A DevOps engineer runs log streaming tools, build systems, or test runners in Ghostty and benefits from SIMD-accelerated parsing and GPU rendering that keeps output smooth even at hundreds of thousands of lines per second.
  • Native macOS developer experience - A macOS developer replaces iTerm2 or Terminal.app with Ghostty to get Metal rendering, CoreText font support, Apple Shortcuts integration, and a first-class SwiftUI application experience.
  • Linux desktop power user - A Linux user running GNOME or a Wayland compositor uses Ghostty’s GTK4 app for deep systemd integration, cgroup-isolated sessions, and always-on single-instance management.
  • Building terminal-based development tools - An open-source project integrates libghostty to provide a consistent, cross-platform terminal widget for Windows, Linux, and macOS users from a single implementation.
  • Standards conformance testing - A terminal application developer uses Ghostty as a reference for modern VT sequence behavior, validated against a comprehensive xterm conformance audit covering ECMA-48 and extended protocols.

Under The Hood

Architecture Ghostty is organized as a modular Zig core with a runtime dispatch layer (apprt) that bridges shared terminal logic to platform-native backends — SwiftUI on macOS and GTK4 on Linux. A compile-time ExeEntrypoint selector routes builds to the correct artifact (GUI app, C library, WebAssembly module, benchmark harness) without any runtime branching in hot paths. Terminal sessions are managed via a Surface abstraction, with each surface owning dedicated threads for reading, writing, and rendering that communicate through message queues — a design that isolates latency sources and prevents any one operation from blocking another. Allocator-aware resource management and errdefer cleanup patterns throughout the codebase ensure predictable lifecycle control and no resource leaks across subsystems.

Tech Stack The primary implementation language is Zig 0.15+ with a native build.zig + build.zig.zon toolchain for dependency pinning and cross-compilation. The renderer is dual-backend: Metal on macOS and OpenGL (via GLAD) on Linux, with WebGL for WASM targets. Text rendering uses FreeType for rasterization and HarfBuzz for Unicode shaping, with CoreText handling font discovery on macOS. The macOS application layer is built in Swift and SwiftUI, bridging to Zig via Objective-C interop. Linux uses GTK4 with optional GTK4 Layer Shell for Wayland compositors and libxev for async I/O. Terminal parser performance is boosted by SIMD acceleration via the Highway library and simdutf. Vendored C dependencies — breakpad, libpng, libxml2, oniguruma — are bundled in pkg/ alongside pre-built fonts and color schemes for self-contained deployment.

Code Quality An extensive test suite spans 288 Zig source files with embedded test blocks, dedicated fuzz testing under test/fuzz-libghostty/, and a structured Xcode test plan (Ghostty.xctestplan) for the Swift layer. Error handling is explicit at every level: Zig’s error union types and errdefer patterns ensure that errors are propagated and handled, never silently swallowed. Naming conventions are consistent and descriptive, with module names directly reflecting system boundaries (apprt, termio, renderer, font, config). CI runs on path-filtered triggers across Zig, macOS, Nix, and shell layers with fine-grained skip logic for non-code-impacting changes. Structured, scoped logging is used throughout without impacting production performance. The project enforces contributor understanding through a vouch system and explicit AI usage policy — an unusual quality gate for open-source.

What Makes It Unique Ghostty’s most technically distinctive contribution is the multi-threaded per-terminal design: dedicated read, write, and render threads per surface, compared to the single-event-loop approach used by nearly every other terminal emulator. SIMD-optimized VT sequence scanning using CPU-specific instructions for hot-path acceleration is rare in open-source terminals. The libghostty-vt library — zero-dependency, standards-compliant, and targeting four platforms from one codebase — opens terminal emulation as a composable building block for any application. Page-aligned, OS-managed memory allocation for terminal page backing (using mmap with MAP_PRIVATE | MAP_ANONYMOUS for zeroed pages) eliminates heap fragmentation in a performance-critical path. The compile-time configuration system resolves themes and OS-specific behavior at build time with no runtime reflection, keeping the binary lean and fast.

Self-Hosting

Ghostty is released under the MIT License, which is one of the most permissive open-source licenses available. You can use it commercially, modify it freely, distribute it, and incorporate it (including libghostty) into proprietary applications without any copyleft obligation. The only requirement is preserving the copyright notice and license text. There are no dual-licensing restrictions, no open-core commercial tiers, and no telemetry or license enforcement in the codebase.

Running Ghostty yourself is straightforward for personal or team use: it is a standalone desktop application with no server infrastructure, no database, and no network services to operate. The build process requires Zig 0.15+ and platform-specific toolchains (Xcode for macOS, GTK4 development headers for Linux), and the project uses a custom deps.files.ghostty.org mirror for dependency fetching rather than pulling directly from GitHub — something to account for in air-gapped or network-restricted build environments. Updates are managed by the user; there is no auto-update infrastructure, so teams must handle version management themselves. The crash reporter stores reports locally and does not send anything automatically, giving you full control over crash data.

Ghostty has no managed cloud version, no SaaS offering, and no commercial support tier — you get the community (GitHub Discussions, Discord) and the documentation at ghostty.org. For organizations that need guaranteed SLAs, enterprise support contracts, or managed update infrastructure, that does not exist for Ghostty today. Compared to managed alternatives like Warp Terminal (which offers AI features and team collaboration in a hosted product), you trade those managed-service conveniences for complete data sovereignty, no subscription cost, and the ability to embed or fork the terminal freely under MIT terms.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack

No spam. Unsubscribe anytime.

Join 750+ subscribers
No spam. Unsubscribe anytime.

Search