Ghostty

GPU-Accelerated Terminal Emulator by Mitchell Hashimoto — Deep Study

Terminal Zig GPU-Accelerated Native UI macOS / Linux Open Source

What is Ghostty?

Ghostty is a fast, feature-rich, cross-platform terminal emulator written in Zig by Mitchell Hashimoto (creator of Vagrant, Packer, Terraform, and HashiCorp). It went open-source in late 2024 and quickly became one of the most talked-about terminals due to its combination of native platform integration, GPU-accelerated rendering, and deep configurability.

Fast

GPU-accelerated rendering via Metal (macOS) and OpenGL/Vulkan (Linux)

🖥️

Native

Swift/AppKit on macOS, GTK4 on Linux — feels like a first-class OS citizen

⚙️

Configurable

Single plain-text config file with hundreds of options, no YAML bloat

🦆

Compatible

Full xterm compatibility + modern protocols (Kitty keyboard, graphics, sixel)

🔗

Shell-aware

Deep shell integration for bash, zsh, fish — semantic zones, CWD tracking

📦

Open Source

MIT licensed, written in Zig for predictable performance and memory safety

Why choose Ghostty over alternatives?

🎨

Beautiful & Native

Real OS integration

Uses the actual macOS window system (not Electron), so you get proper transparency, window shadows, and system font rendering — not a web app pretending to be a terminal.

🚀

Startup Speed

Near-instant launch

Ghostty starts in under 50ms on modern hardware. No JVM warmup, no Electron bootstrap, no Objective-C runtime overhead — compiled Zig binary.

📝

Simple Config

Key = value, no TOML/YAML hell

One config file, plain key = value format. No nested structures, no arrays of tables — just readable, human-friendly settings.

🧩

Protocol-first

Kitty, Sixel, OSC52

Implements modern terminal protocols: Kitty keyboard protocol, Kitty graphics protocol (images in terminal), Sixel graphics, and OSC 52 clipboard.

Installation

macOS

Homebrew (recommended)

# Add the tap brew tap ghostty-org/ghostty # Install brew install ghostty # Or with cask (pre-built .app) brew install --cask ghostty

Direct Download

# Download DMG from official site # https://ghostty.org/download # Or via curl + install script curl -sSL https://ghostty.org/install.sh | sh # Verify installation ghostty --version
macOS build uses Swift + AppKit for the window/UI layer and Metal for GPU rendering. Requires macOS 13 (Ventura) or later.

Linux

Package Managers

# Arch Linux (AUR) yay -S ghostty # or paru -S ghostty # NixOS / nix-env nix-env -iA nixpkgs.ghostty # Flatpak flatpak install flathub org.ghostty.Ghostty

Build from Source

# Prerequisites: Zig 0.13+, GTK4, libadwaita sudo apt install libgtk-4-dev libadwaita-1-dev # Clone and build git clone https://github.com/ghostty-org/ghostty cd ghostty zig build -p $HOME/.local -Doptimize=ReleaseFast # Run ~/.local/bin/ghostty
Linux build uses GTK4 + libadwaita for UI and OpenGL/EGL for GPU rendering. Wayland is the primary target; X11 (XWayland) is supported.

Configuration

Config File Location

# Primary config (XDG standard) ~/.config/ghostty/config # macOS also checks ~/Library/Application Support/com.mitchellh.ghostty/config # Reload config without restart Ctrl+Shift+, # reload config # Check for config errors ghostty +validate-config
Config changes reload live — no restart required. Use ghostty +list-themes and ghostty +list-fonts to explore built-in options.

Font Configuration

# Font family (use exact name from system) font-family = JetBrains Mono font-family-bold = JetBrains Mono Bold font-family-italic = JetBrains Mono Italic # Font size in points font-size = 14 # Enable ligatures font-feature = calt # contextual alternates (ligatures) font-feature = ss01 # stylistic set 1 (font-specific) # Disable a feature font-feature = -calt # disable contextual alternates # Cell size adjustment font-thicken = true # macOS: thicker font rendering adjust-cell-width = 1 # add 1px per cell (spacing) # List available fonts # ghostty +list-fonts

Appearance & Window

# Theme (built-in or custom) theme = Catppuccin Mocha theme = dark:Catppuccin Mocha,light:Catppuccin Latte # auto dark/light # Background background = #1e1e2e background-opacity = 0.95 # 0.0 = transparent, 1.0 = opaque background-blur-radius = 20 # macOS backdrop blur # Foreground / cursor foreground = #cdd6f4 cursor-color = #f5e0dc cursor-style = block # block | bar | underline cursor-style-blink = false # Window decorations window-decoration = true # show title bar window-theme = ghostty # ghostty | system | auto macos-titlebar-style = tabs # tabs | native | hidden # Padding window-padding-x = 8 window-padding-y = 8 window-padding-balance = true # Startup size window-width = 220 # columns window-height = 50 # rows

Custom Keybindings

# Format: keybind = [modifiers+]key=action # Modifiers: ctrl, shift, alt/opt, super/cmd # New tab / window / split keybind = cmd+t=new_tab keybind = cmd+n=new_window keybind = cmd+d=new_split:right keybind = cmd+shift+d=new_split:down # Navigate splits keybind = cmd+alt+left=goto_split:left keybind = cmd+alt+right=goto_split:right keybind = cmd+alt+up=goto_split:top keybind = cmd+alt+down=goto_split:bottom # Font size keybind = cmd+equal=increase_font_size:1 keybind = cmd+minus=decrease_font_size:1 keybind = cmd+zero=reset_font_size # Scrollback keybind = shift+page_up=scroll_page_up keybind = shift+page_down=scroll_page_down # Clear screen + scrollback keybind = cmd+k=clear_screen # Toggle fullscreen keybind = cmd+ctrl+f=toggle_fullscreen # Send raw sequences to shell keybind = ctrl+h=send_key:ctrl+backspace
Use ghostty +list-actions to see all bindable actions. Use ghostty +show-config to see the full resolved config including defaults.

Complete Config Reference (Key Options)

OptionDefaultDescription
font-familymonospacePrimary font family name
font-size12Font size in points
theme(none)Built-in theme name or path to custom theme
background#282c34Background color (hex)
foreground#ffffffDefault foreground (text) color
background-opacity1.0Window opacity (0.0–1.0)
background-blur-radius0macOS blur radius for vibrancy effect
cursor-styleblockblock | bar | underline
cursor-style-blinktrueWhether the cursor blinks
shell-integrationdetectdetect | none | bash | zsh | fish
shell-integration-featurescursor,sudo,titleWhich integration features to enable
scrollback-limit10000Number of scrollback lines (0 = unlimited)
clipboard-readaskallow | ask | deny — OSC 52 clipboard reads
clipboard-writeallowallow | ask | deny — OSC 52 clipboard writes
mouse-hide-while-typingfalseHide cursor while typing
link-urltrueMake URLs clickable
confirm-close-surfacetrueConfirm before closing split/tab with running process
macos-option-as-altfalseUse Option key as Alt (useful for CLI tools)
window-vsynctrueSync rendering to display refresh rate
gtk-single-instancedesktopLinux: reuse existing instance

Keyboard Shortcuts

Default shortcuts — many are configurable via keybind in config.

Windows & Tabs

New window
N
New tab
T
Close tab/window
W
Next tab
Shift]
Previous tab
Shift[
Go to tab 1–9
1–9

Splits (Panes)

Split right
D
Split down
ShiftD
Focus split left
Focus split right
Focus split up
Focus split down

Font & Display

Increase font size
+
Decrease font size
-
Reset font size
0
Toggle fullscreen
F
Zoom split
Shift

Scrollback & Clipboard

Scroll up (page)
ShiftPgUp
Scroll down (page)
ShiftPgDn
Scroll to top
ShiftHome
Scroll to bottom
ShiftEnd
Copy
C
Paste
V

Other

Clear screen
K
Reload config
Shift,
Open config file
,
Find (scroll search)
F
Toggle inspector
I

Linux (GTK)

New window
CtrlShiftN
New tab
CtrlShiftT
Close tab
CtrlShiftW
Copy
CtrlShiftC
Paste
CtrlShiftV
Reload config
CtrlShift,

Shell Integration

Ghostty provides deep shell integration that enables semantic features — the terminal understands prompt boundaries, working directories, and command status.

Shell integration is auto-detected for bash, zsh, and fish. Set shell-integration = detect (default) in config. You can also set it explicitly: shell-integration = zsh.

How It Works

Shell ────────────── Ghostty │ │ ├─ Sources integration script │ │ /usr/share/ghostty/shell-integration/ │ │ │ ├─ Emits OSC sequences: │ │ OSC 133 A prompt start ──► Track prompt zone │ OSC 133 B command start ──► Track input zone │ OSC 133 C command executed ──► Record start of output │ OSC 133 D command finished ──► Record exit code │ OSC 7 current directory ──► Update window title / new tabs │ OSC 9;9 current directory (alt)──► Same as above (compatibility) │ │ └─ Result: Ghostty knows which ───────────┘ lines are prompts, commands, output

Features Enabled by Shell Integration

🧭

Semantic Navigation

  • Jump to previous/next prompt with ↑/↓
  • Select output of previous command
  • Visual distinction between prompts and output
📂

CWD Tracking

  • New tabs/splits open in current directory
  • Window title shows current path
  • Works across cd, z, autojump

Exit Code Marking

  • Failed commands visually marked in scrollback
  • Jump to last failed command
  • Useful for long build outputs
🔐

sudo Integration

  • Ghostty injects itself into sudo sessions
  • Shell integration continues to work inside sudo
  • CWD tracking preserved across privilege escalation

Manual Setup (if auto-detect fails)

zsh — add to ~/.zshrc

# Ghostty injects automatically, but # if needed source manually: if [[ "$TERM" == "xterm-ghostty" ]]; then source "/usr/share/ghostty/shell-integration/zsh/ghostty-integration" fi

bash — add to ~/.bashrc

if [[ "$TERM" == "xterm-ghostty" ]]; then source "/usr/share/ghostty/shell-integration/bash/ghostty-integration" fi # fish: add to ~/.config/fish/config.fish if test "$TERM" = "xterm-ghostty" source "/usr/share/ghostty/shell-integration/fish/vendor_conf.d/ghostty-shell-integration.fish" end

Shell Integration Config Options

# In ~/.config/ghostty/config # Which shell to integrate (detect = auto) shell-integration = detect # Features to enable (comma-separated) shell-integration-features = cursor,sudo,title,no-cursor # Available features: # cursor — change cursor shape in different modes (insert vs normal) # sudo — preserve integration across sudo # title — set window title to current command # no-cursor — hide cursor in vi normal mode (for vim users) # Disable entirely shell-integration = none

Themes

Ghostty ships with 200+ built-in themes. You can also create custom themes or use community themes.

# List all built-in themes ghostty +list-themes # Use a theme in config theme = Catppuccin Mocha # Auto light/dark mode (syncs with OS) theme = dark:Catppuccin Mocha,light:Catppuccin Latte # Apply custom theme file theme = /path/to/my-theme

Popular Built-in Themes

Catppuccin Mocha

Soothing pastel dark theme. Most popular choice.

Tokyo Night

Inspired by Tokyo at night. Clean & sharp.

Dracula

Classic dark purple palette. Timeless.

Nord

Arctic-inspired, cool blue tones.

Gruvbox Dark

Retro warm palette. Great contrast.

One Dark

Atom-inspired dark theme. Editor-familiar.

Custom Theme File

Place in ~/.config/ghostty/themes/my-theme

# ~/.config/ghostty/themes/my-theme # 16-color ANSI palette + foreground/background palette = 0=#1e1e2e # black palette = 1=#f38ba8 # red palette = 2=#a6e3a1 # green palette = 3=#f9e2af # yellow palette = 4=#89b4fa # blue palette = 5=#cba6f7 # magenta palette = 6=#89dceb # cyan palette = 7=#a6adc8 # white # 8–15: bright variants (same pattern) palette = 8=#585b70 palette = 9=#f38ba8 palette = 10=#a6e3a1 palette = 11=#f9e2af palette = 12=#89b4fa palette = 13=#cba6f7 palette = 14=#89dceb palette = 15=#b4befe background = #1e1e2e foreground = #cdd6f4 cursor-color = #f5e0dc selection-background = #45475a selection-foreground = #cdd6f4

Splits & Tabs

📑

Tabs

Each tab runs an independent shell session. Tabs appear in the title bar (macOS) or a tab bar (Linux).

  • New tab: ⌘T
  • Close tab: ⌘W
  • Switch tabs: ⌘1–9

Splits (Panes)

Split the current tab into multiple panes, each running independently. Panes can be nested arbitrarily.

  • Split right: ⌘D
  • Split down: ⌘⇧D
  • Navigate: ⌘⌥↑↓←→
🔍

Zoom

Zoom a split to fill the entire tab temporarily — great for focusing on one pane without closing others.

  • Toggle zoom: ⌘⇧↵
  • Zoomed pane still receives input
  • Un-zoom restores split layout
📏

Resize Splits

Resize splits by dragging the divider or via keybindings.

  • Resize in config: resize_split:right:10
  • Bind to keys via keybind config
  • Equal split: equalize_splits action

Config for Splits Behavior

# In ~/.config/ghostty/config # New splits/tabs inherit CWD (needs shell-integration) window-inherit-working-directory = true # Inherit font size from the focused split window-inherit-font-size = true # Custom split resize keybinds keybind = ctrl+shift+right=resize_split:right:10 keybind = ctrl+shift+left=resize_split:left:10 keybind = ctrl+shift+up=resize_split:up:5 keybind = ctrl+shift+down=resize_split:down:5 keybind = cmd+shift+enter=toggle_split_zoom # Confirm before closing a split with a running process confirm-close-surface = true

Terminal Protocols

Ghostty implements modern terminal protocols that enable richer features beyond what traditional xterm supports.

⌨️

Kitty Keyboard Protocol

Enhanced key input

Disambiguates key events that xterm conflates — separate keydown/keyup events, modifier-only keys, key repeats. Enables tools like Neovim to bind Ctrl+Shift+F, Alt+Enter, etc.

Enable in Neovim: vim.o.kitty_keyboard = true (via terminfo). Ghostty ships with correct terminfo.
🖼️

Kitty Graphics Protocol

Images in terminal

Display full raster images (PNG, JPEG, WebP, GIF, AVIF) directly in the terminal at pixel resolution. Used by tools like ranger, yazi, wezterm img, and inline image viewers.

Test with: kitten icat image.png or viu image.jpg
📺

Sixel Graphics

Legacy image protocol

Older pixel graphics standard supported for compatibility with tools like gnuplot, chafa, and timg.

📋

OSC 52 Clipboard

Clipboard over SSH

Applications inside SSH sessions can copy to your local clipboard via OSC 52 sequences. Works across tmux, nested SSH sessions, etc.

clipboard-read = allow clipboard-write = allow
🔗

Hyperlinks (OSC 8)

Clickable URLs

Terminals can mark text as hyperlinks with custom URLs. Ghostty renders them as clickable links that open in your browser. Tools like ls --hyperlink, GitHub CLI, and modern compilers emit these.

🎨

True Color (24-bit)

16M colors

Full 24-bit RGB color support. Required by modern color schemes in Neovim, tmux, and other TUI applications.

# Verify true color support: printf '\x1b[38;2;255;100;0mTRUECOLOR\x1b[0m\n'

Ghostty vs Other Terminals

Feature Ghostty iTerm2 WezTerm Kitty Alacritty
Language Zig ObjC/Swift Rust/Lua C/Python Rust
GPU Rendering Metal / OpenGL Metal OpenGL/Metal OpenGL OpenGL/Metal
Platform UI Native (Swift/GTK4) Native macOS only Custom (WGPU) Custom Custom (winit)
Config format Simple key=value GUI prefs Lua Python/conf TOML
Splits/Tabs Yes Yes Yes Yes No
Kitty Graphics Yes No Yes Yes (invented it) No
Kitty Keyboard Yes No Yes Yes (invented it) No
Shell Integration Deep (auto) Deep Yes Yes None
Sixel Graphics Yes Yes Yes Partial No
macOS support First-class First-class Yes Community port Yes
Linux support First-class (GTK4) No Yes First-class Yes
Startup time ~50ms ~500ms+ ~100ms ~100ms ~30ms
Background opacity Yes + blur Yes + blur Yes Platform-dependent Yes
Scrollback search Yes Yes Yes Yes vi-mode only
Bottom line: Ghostty hits the sweet spot between iTerm2's feature richness and Alacritty's raw speed. It's the best option if you want a native-feeling, GPU-fast terminal that "just works" with modern tooling.

Tips & Tricks

1

Use Option as Alt for CLI tools

On macOS, Option generates special characters by default. Set macos-option-as-alt = true to make Option act as Alt — essential for Emacs (Alt+x), tmux (Alt+arrows), and other tools.

2

Enable background blur for vibrancy

Set background-opacity = 0.9 and background-blur-radius = 20 for a macOS-native blurred background effect. Looks beautiful with dark themes.

3

Jump between prompts with Cmd+Up/Down

With shell integration enabled, ⌘↑ and ⌘↓ jump directly to previous/next command prompts in the scrollback. Much faster than scrolling manually.

4

Use ghostty +show-config to debug

Run ghostty +show-config in your terminal to see the full resolved configuration including all defaults. Helpful for troubleshooting why a setting isn't taking effect.

5

Set up a minimal Neovim-friendly config

Ghostty ships with correct terminfo and the Kitty keyboard protocol enabled. Set term = xterm-ghostty in your environment (auto-set) and Neovim will automatically detect advanced capabilities.

6

Config inheritance with config-file

Use config-file = ~/dotfiles/ghostty/base to import a shared base config. Layer multiple files — useful for maintaining a shared dotfiles config with machine-specific overrides.

7

Use the terminal inspector

Open the debug inspector with ⌘⌥I to see raw bytes sent/received, terminfo capabilities, and rendering details. Invaluable for debugging escape sequence issues.

8

Ghostty as default terminal in macOS

Set Ghostty as the default terminal app via System Settings → Default Apps → Terminal. Then open -a Ghostty, clicking terminal links, and mate/code terminal integrations all open in Ghostty.

Useful CLI Commands

# List all available themes ghostty +list-themes # List all available fonts (system-wide) ghostty +list-fonts # Show resolved config (with defaults) ghostty +show-config # Validate your config for errors ghostty +validate-config # List all bindable actions ghostty +list-actions # Print current Ghostty version ghostty --version # Open Ghostty with a specific config file ghostty --config-file=/path/to/config # Diagnose terminfo installation infocmp xterm-ghostty

Recommended Starter Config

# ~/.config/ghostty/config # A solid starting point — tweak to taste # Font font-family = JetBrains Mono font-size = 14 font-feature = calt font-thicken = true # Theme & Appearance theme = dark:Catppuccin Mocha,light:Catppuccin Latte background-opacity = 0.95 background-blur-radius = 15 cursor-style = bar cursor-style-blink = false # Window window-padding-x = 8 window-padding-y = 8 window-padding-balance = true macos-titlebar-style = tabs macos-option-as-alt = true # Shell Integration shell-integration = detect shell-integration-features = cursor,sudo,title # Behavior confirm-close-surface = true mouse-hide-while-typing = true scrollback-limit = 10000 clipboard-read = allow clipboard-write = allow # Custom keybinds keybind = cmd+d=new_split:right keybind = cmd+shift+d=new_split:down keybind = cmd+alt+left=goto_split:left keybind = cmd+alt+right=goto_split:right keybind = cmd+alt+up=goto_split:top keybind = cmd+alt+down=goto_split:bottom keybind = cmd+k=clear_screen