Ghostty — ANSI escape code support
Ghostty is a cross-platform terminal emulator from Mitchell Hashimoto (founder of HashiCorp), written in Zig and first released publicly in December 2024 after a 3-year private beta. Its thesis: a terminal that feels native on each OS — AppKit on macOS, GTK4 on Linux — without compromising on modern terminal features. No Electron, no Web stack, no Rust-vs-Zig wars baked into the user-facing experience.
Ghostty implements an aggressive subset of modern terminal protocols out of the box: full xterm-ctlseqs SGR, full OSC 8 hyperlinks, full SGR 4:1–4:5 styled underlines, the kitty graphics protocol, the kitty keyboard protocol (CSI > 1 u), and DECSET ?2026 synchronized output. Sixel is supported via libsixel. Config is a flat INI-like file at `~/.config/ghostty/config` — one key per line, no nesting.
Last updated
Feature support
How this terminal scores against the 15 features tracked in the site-wide support matrix. Click any feature name to see the full row across every terminal.
- 8 basic colors (30–37 / 40–47)SGR 30–37 foreground, 40–47 background.yes
- Bright (aixterm) colors (90–97 / 100–107)aixterm SGR extension.yes
- 256-color palette (38;5;n / 48;5;n)xterm 256-color extension.yes
- 24-bit truecolor (38;2;r;g;b)16.7M direct RGB. Set $COLORTERM=truecolor.yes
- Italic (SGR 3)Italic text attribute.yes
- Styled underlines (4:1–4:5)Curly/dotted/dashed underline styles.yes
- Strikethrough (SGR 9)Horizontal line through text.yes
- OSC 8 hyperlinksInline clickable URIs.yes
- Alt screen (?1049h)Full-screen app buffer.yes
- Mouse tracking (SGR ?1006)Mouse click/drag events.yes
- Bracketed paste (?2004)Pasted text wrapped in ESC[200~/ESC[201~.yes
- Focus events (?1004)ESC[I on focus in, ESC[O on focus out.yes
- Sixel graphicsDEC sixel inline raster images.yes
- Kitty graphics protocolPNG/RGB inline images, animations.yes
- Synchronized output (?2026)Atomic frame updates to avoid tearing.yes
Sequences that work here
Canonical reference pages for the escape sequences this terminal handles cleanly. Each links to a full page with byte forms, citations, and per-language examples.
- SGR 38;2;R;G;B — 24-bit truecolor foreground
\x1b[38;2;R;G;BmPick any of 16,777,216 foreground RGB colors directly.
- OSC 8 — Inline hyperlink
\x1b]8;;URI\x07TEXT\x1b]8;;\x07Render clickable hyperlinks in terminal output (gnome-terminal 3.26+, iTerm2, Windows Terminal, kitty, ...).
- DECSET 1049 — Alternate screen buffer
\x1b[?1049h (enter) \x1b[?1049l (leave)Switch to a separate screen buffer (like vim/less do on launch).
- DECSET ?2004 — Bracketed paste mode
\x1b[?2004h (enable) \x1b[?2004l (disable)Wrap pasted text in distinct escape markers so apps can tell paste from typing.
- DECSET ?2026 — Synchronized update mode
\x1b[?2026h (begin frame) \x1b[?2026l (end frame)Buffer screen updates until you signal end-of-frame — eliminates flicker on full repaints.
Quirks & version notes
Per-terminal caveats you'll want to know before relying on a sequence in production.
- Linux GTK4 build trails macOS by 1-2 minor versions
- Ghostty's macOS app is built first; Linux GTK4 builds (Fedora COPR, AUR, Flathub) catch up afterwards. Feature parity for ANSI escape sequences is identical, but window-chrome details (transparency, vibrancy, tab bar style) and shell-integration polish (cursor positioning during prompt redraw) land on macOS first. For CI / dev-container use cases, the Linux build is fine; for matching screenshots in docs, check both.
- Flat INI-like config — one key per line, no nesting
- `~/.config/ghostty/config` is a list of `key = value` lines (e.g. `font-family = JetBrains Mono`, `theme = catppuccin-mocha`). No TOML tables, no Lua, no JSON. Lists are expressed by repeating the key — `keybind = ctrl+a>z=close_window` then `keybind = ctrl+a>x=new_tab`. `+macos`-prefixed keys apply only on macOS; `+linux`-prefixed only on Linux. Run `ghostty +show-config --default` to see every documented key with its default value.
- kitty keyboard + graphics protocols enabled by default
- Ghostty ships kitty's progressive keyboard enhancement (CSI > 1 u opt-in, CSI < u opt-out) AND the kitty graphics protocol (APC G ... ST) on by default. neovim 0.10+, helix, and zellij detect them via DA3 / DA1 + the kitty graphics query and immediately upgrade — meaning Ctrl-Shift-letter combinations, accurate modifier reporting, and inline image previews work without configuration. Apps that DON'T speak kitty protocols see no regression (Ghostty replies with sane xterm-compatible defaults).
- Synchronized output (?2026) + libsixel-based Sixel
- DECSET ?2026h / ?2026l atomic-frame mode is supported on every platform — no config flag. Sixel rendering uses the system libsixel: on macOS install via `brew install libsixel` (Ghostty links it dynamically); on Linux distros that package libsixel (Debian / Fedora) it's a transitive dependency. Without libsixel present, Sixel sequences print as garbage — feature-detect via DA1 (`CSI c` reply contains `4`) rather than assuming presence.