โฌก void
Void โ grid-first terminal ยท Ghostty hard fork ยท NรM tiling as a core surface ยท beta: grid mode only
grid-mode ยท tiling-surface ยท terminal ยท pty ยท tool-call-stream ยท perf-first ยท zig ยท swift ยท gtk ยท metal ยท opengl
Void is a hard fork of Ghostty where an NรM pane grid is a first-class rendering surface โ not a window-manager bolt-on, not a tmux-style multiplexer process. When cell count N changes the layout auto-rebalances (cols = โโNโ, rows = โN/colsโ, cols โฅ rows), each cell carries its own cwd/env, and input can broadcast to all cells. It inherits Ghostty's engine (SIMD parser, Metal/OpenGL, per-terminal threads) unchanged. Zig shared core, native Swift on macOS, GTK on Linux.
Beta status โ grid mode is the only implemented direction. Two further directions are planned, not yet built: a structured agent I/O channel alongside PTY (roadmap P3) and a per-PR perf budget vs the Ghostty baseline (roadmap P4). They are described below as roadmap, not as shipped features.
[!NOTE] Part of the dancinlab n = 6 family โ hexagonal icon, sibling to NEXUS, Anima, N6, and HEXA-LANG. Void is a UX divergence from Ghostty, not a drop-in replacement; upstream syncs are selective cherry-picks only and full Ghostty history/credit is preserved.
At a glance
spawn a pane with cmd+ctrl+1..9 โ the grid auto-rebalances
N = 2 N = 4 N = 6 N = 9
โโโโโโฌโโโโโ โโโโโโฌโโโโโ โโโโโฌโโโโฌโโโโ โโโโโฌโโโโฌโโโโ
โ 1 โ 2 โ โ 1 โ 2 โ โ 1 โ 2 โ 3 โ โ 1 โ 2 โ 3 โ
โ~/p โ~/w โ โโโโโโผโโโโโค โโโโโผโโโโผโโโโค โโโโโผโโโโผโโโโค
โโโโโโดโโโโโ โ 3 โ 4 โ โ 4 โ 5 โ 6 โ โ 4 โ 5 โ 6 โ
โ~/l โ~/r โ โ~/rโ~/sโ~/tโ โโโโโผโโโโผโโโโค
2 ร 1 โโโโโโดโโโโโ โโโโโดโโโโดโโโโ โ 7 โ 8 โ 9 โ
2 ร 2 3 ร 2 โโโโโดโโโโดโโโโ
3 ร 3
cols = โโNโ rows = โN/colsโ cols โฅ rows ยท per-cell cwd ยท no manual resize handles ยท no tmux
void # launch terminal
cmd+g # toggle grid mode <-> tab mode
cmd+ctrl+1..9 # spawn a tab in grid slot 1..9 (auto-rebalances)
cmd+ctrl+shift+1..9 # cycle tabs within a grid slot
cmd+ctrl+0 # broadcast input to all cellsWhy void
Three things upstream Ghostty treats as explicit non-goals โ Void forks to take exactly these bets.
1. Grid mode โ a first-class tiling surface
cells = N on add / remove the whole grid
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ re-balances to equal splits:
N = 2 โ 2 ร 1 cols = โโNโ
N = 4 โ 2 ร 2 rows = โN/colsโ
N = 6 โ 3 ร 2 cols โฅ rows (wider before taller)
N = 9 โ 3 ร 3 (no manual resize handles)
The NรM grid is a new renderer path, not a patch on the single-surface renderer and not a multiplexer process. Per-cell cwd / env, shared input routing, broadcast. No tmux, no prefix key, no config DSL to learn. This is the headline โ the other two directions sit on top of it.
2. Ghostty hard fork โ performance inherited, not rebuilt
Void did not rebuild a terminal. It hard-forks a fast one and changes three things. The SIMD parser, Metal (macOS) / OpenGL (Linux) renderers, and per-terminal render/read/write threads come straight from Ghostty. 4698 files were renamed Ghostty โ Void at commit 964c9e32e; upstream history and contributor credit are preserved (cherry-pick only, no clean merges).
3. AI-native I/O and a perf budget (roadmap โ not yet implemented)
shell process โโโโโ PTY โโโโโโโโโถ traditional byte stream
โ โ
โผ โโโโโ AGENT โโโโโโโถ structured tool-call events
libvoid layer โโโโโค token stream w/ boundaries
โฒ โโโโโ META โโโโโโโโถ cwd, exit-code, span marks
โ
agent process (no wrapper process required)
Neither of these is built yet โ the beta is grid-only. The plan: a structured agent channel alongside PTY (tool-call events and token-stream boundaries as a data model, not heuristic-parsed from stdout) โ roadmap P3, deliberately not the headline since Void is grid-first, not an "AI overlay" terminal. And a perf budget where every PR reports a delta against the Ghostty baseline with a โฅ 2 % regression blocking merge โ roadmap P4, the harness is not wired yet. Both are described here as intent, not as shipped behaviour.
Highlights
| โฆ | Grid mode (implemented) โ NรM pane grid as a core surface, auto-layout (cols = โโNโ, rows = โN/colsโ), per-cell cwd, broadcast |
| โฌก | Ghostty-grade performance (inherited) โ SIMD parser, per-terminal render/read/write threads, Metal on macOS, OpenGL on Linux |
| โ | Native UI (inherited) โ SwiftUI on macOS (AppIntents, Shortcuts), GTK on Linux (systemd, cgroup isolation) |
| โก | Perf budget (roadmap P4 โ not built) โ plan: every PR reports ฮ against the Ghostty baseline; โฅ 2 % regression blocks merge |
| โ | AI-native I/O (roadmap P3 โ not built) โ plan: agent protocol alongside PTY; structured tool-call / token-stream channels, no wrapper |
| โป | Session restore (implemented) โ per-pane mmap'd ring of raw PTY bytes; auto-replay on void/macOS crash restores scrollback + colors + cursor (no upstream Ghostty equivalent) |
| โฌข | dancinlab branding โ hexagonal icon, n = 6 family (NEXUS ยท Anima ยท N6 ยท HEXA ยท Void) |
Architecture
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ macOS App (Swift) โ
โ SwiftUI ยท AppIntents ยท CoreText โ
โ Metal renderer ยท native menu โ
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ libvoid (Zig) โ core โ
โ parser ยท terminal state ยท renderer โ
โ grid engine (agent I/O: roadmap) โ
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Linux App (GTK) โ
โ systemd ยท OpenGL ยท FreeType โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Zig-based shared core with platform-native shells. Core is C-ABI-compatible so it can be embedded in third-party projects (Ghostty's libghostty pattern โ renamed to libvoid in this fork).
Install
# 1. Install hexa-lang (gives you `hexa` + `hx` package manager)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/dancinlab/hexa-lang/main/install.sh)"
# 2. Install void
hx install voidOr build from source โ see HACKING.md. Default branch on the fork is void/main, not main.
Run
void # launch terminal
void +show-config # print active config
void +list-keybinds # list keybindings
void +crash-report # list crash reportsKeybindings (default)
| Keys | Action |
|---|---|
cmd+g | toggle grid mode โ tab mode |
cmd+ctrl+1..9 | spawn new tab in grid slot 1..9 (stacks โ repeated presses add tabs to the same slot) |
cmd+ctrl+shift+1..9 | cycle tabs within grid slot |
cmd+ctrl+0 | broadcast input to all cells |
cmd+opt+return | find next (relocated from cmd+g) |
cmd+shift+opt+return | find previous (relocated from cmd+shift+g) |
cmd+t / cmd+n | new tab / new window |
cmd+d / cmd+shift+d | split pane right / down |
cmd+, | open settings |
All keys are rebindable via config โ nothing is hardcoded.
Fork status
| Upstream | ghostty-org/ghostty โ cherry-picks only, no merges |
| Fork date | 2026-04-21 (from upstream commit c3c8572f7) |
| Default branch | void/main |
| L3 rename | complete โ 4698 files renamed Ghostty โ Void at commit 964c9e32e |
| CI | .github/workflows/build-fork.yml on GitHub-hosted macos-15 runners (ad-hoc codesign) |
| Icon | hexagonal, dancinlab n = 6 family |
See VOID_FORK.md for the full fork rationale, non-goals, and upstream policy.
Roadmap
Checkpoints (done):
| # | Milestone | Date |
|---|---|---|
| C0 | project-init โ hexa scaffold | 2026-04-21 |
| C1 | fork-base โ Ghostty โ Void rebrand | 2026-04-21 |
Phases:
| # | Phase | ETA | Status |
|---|---|---|---|
| P1 | Grid mode + new-tab keybinding โ auto-grid, slot-spawn, mode toggle | 2026-05-18 | โ |
| P2 | Stack analysis โ map void renderer/apprt/terminal/font internals | 2026-05-05 | โฌ |
| P3 | AI-native I/O protocol โ structured agent channel alongside PTY | โ | โฌ |
| P4 | Perf baseline โ capture benches, set void regression budgets | โ | โฌ |
| P5 | Diverge / upstream strategy โ decide what feeds back vs stays void | โ | โฌ |
P1 (grid mode) is complete: surface rendering, NรM auto-layout (cols = โโNโ), cmd+ctrl+1..9 slot-spawn, broadcast, and per-cell cwd all landed. P4 (perf baseline) is next โ capturing the Ghostty-baseline benches before further divergence accumulates.
Non-goals
- Not a drop-in Ghostty replacement โ Void will diverge in UX.
- Not a shell โ Void drives shells, it does not replace them.
- Not an "AI terminal" โ grid mode is the headline and the only thing built; agent I/O is an unimplemented roadmap direction, never an overlay.
Crash reports
Void inherits Ghostty's crash reporter. Reports are saved to $XDG_STATE_HOME/void/crash (default ~/.local/state/void/crash) and are not sent off your machine. Use void +crash-report to list. Reports use the Sentry envelope format with extension .voidcrash.
[!WARNING] Crash reports contain full stack memory per thread at the time of the crash and can include sensitive data.
Session restore โ survive abnormal termination
When void or macOS dies abnormally, void re-opens with the previous terminal contents (scrollback, colors, cursor) restored โ not just the window layout. The mechanism is fork-only (no upstream Ghostty equivalent); see docs/design/sighup-resistant-session.md for the full design.
Two failure modes, one experience
| Scenario | Event | What survives |
|---|---|---|
| A: void only dies | segfault, OOM, jetsam SIGKILL | grid + per-pane terminal content |
| B: macOS dies | kernel panic, hard shutdown, power loss | same (bounded โค 1s loss) |
How it works
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ macOS NSWindowRestoration (existing) โ โ grid topology + per-surface UUID
โ TerminalRestorable.swift โ survive force-quit / crash
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ uuid round-trips via Codable
โโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ PersistRing (mmap, 4 MB / pane) โ โ raw PTY byte stream โ disk
โ ~/.void/sessions/by-uuid/<uuid>.ring โ memcpy + msync(MS_ASYNC) every 1s
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ on relaunch
โโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Termio.init replay โ processOutput โ โ bytes (ANSI + colors + cursor)
โ BEFORE io read thread starts โ fed back through SIMD parser
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- Write side โ
Termio.processOutputappends every PTY byte to an mmap'd ring (memcpy, ~0ยตs, lock-free per pane).msync(MS_ASYNC)fires every 1s โ kernel page cache + dirty-page flush bound Scenario B loss to โค 1 second. Scenario A loses nothing because mmapMAP_SHAREDpage cache survives process death. - Read side โ at surface init, if a ring exists at the UUID-keyed path,
PersistRing.replay()extracts up to 4 MB of most-recent bytes, andTermio.processOutputLockedfeeds them through the parser before the io read thread spawns. The new shell still starts fresh underneath; the visual scrollback is reconstructed via ANSI replay.
Enable
# void config
window-save-state = always # macOS NSWindowRestoration (already documented)
persist-bytes-mmap = true # opt-in: enable per-pane ring bufferWhat's restored / what isn't
| โ Restored | โ Not restored |
|---|---|
| scrollback text | running processes (PTY child is fresh) |
| colors + text attributes (via ANSI escapes in byte stream) | live cursor position from a long-running TUI |
grid topology + per-pane cwd (via existing TerminalRestorable) | environment variables that diverged at runtime |
| focused pane, tab color, title overrides | sub-process state (vim buffers, REPL history, etc.) |
Apple Terminal.app's "Tab Contents v2" mechanism is plain-text-only (no colors); void's ring is raw bytes including ANSI sequences, so attributes round-trip.
Manual recovery
If auto-replay doesn't trigger (e.g. UUID lost, ring schema changed), the byte stream is still on disk:
tool/void-session-replay.sh --list # enumerate ring files
tool/void-session-replay.sh --latest # dump most recent ring to stdout
tool/void-session-replay.sh --all # dump every ring
tool/void-session-replay.sh <path-to-ring> # dump a specific ringPipe to less -R, cat, or save to a file.
Storage layout
~/.void/sessions/by-uuid/
<uuid>.ring # 4 MB mmap'd ring buffer per pane
...
Ring files are not garbage-collected automatically โ rm -rf ~/.void/sessions/by-uuid is safe between sessions when you want to start fresh.
Status
- Beta โ grid mode is the only implemented direction. P1 (grid mode + new-tab keybinding) complete (2026-05-18): surface rendering, NรM auto-layout, slot-spawn, broadcast, per-cell cwd
- Inherited from Ghostty (not Void-built): SIMD parser, Metal/OpenGL renderers, per-terminal threads, native Swift/GTK shells, crash reporter
- Void-only support infra (shipped, not a "direction"): session-restore via per-pane mmap byte ring โ see Session restore
- Not yet implemented: AI-native I/O (roadmap P3) ยท perf-budget harness (roadmap P4) โ described in this README as intent, not shipped behaviour
- Fork date: 2026-04-21 (from upstream commit
c3c8572f7); default branchvoid/main(notmain) - L3 rename complete โ 4698 files renamed Ghostty โ Void at commit
964c9e32e - Next: P4 perf baseline (capture Ghostty-baseline benches), then Show HN / r/commandline launch
- CI:
.github/workflows/build-fork.ymlon GitHub-hostedmacos-15runners (ad-hoc codesign)
Repo layout
void/
โโโ README.md
โโโ AGENTS.md / AGENTS.tape project ops manual + machine-readable companion
โโโ VOID_FORK.md fork rationale + non-goals + upstream policy
โโโ HACKING.md / CONTRIBUTING.md dev + contribution guides
โโโ LICENSE MIT
โโโ build.zig / build.zig.zon Zig build entry + manifest
โโโ src/ libvoid (Zig core) โ parser ยท terminal state ยท renderer ยท grid (agent I/O: roadmap)
โโโ macos/ Swift app (SwiftUI ยท AppIntents ยท Metal ยท CoreText)
โโโ linux/ + gtk/ GTK app (systemd ยท OpenGL ยท FreeType)
โโโ pkg/ vendored package wrappers
โโโ include/ C-ABI headers for libvoid embedders
โโโ images/ icon + brand assets (hexagon n=6 family)
โโโ docs/ reference docs + logo.svg
โโโ conformance/ terminal protocol conformance tests
โโโ bench/ perf budget harness โ roadmap P4 (ฮ vs Ghostty baseline)
โโโ nix/ + flake.nix Nix build entry
โโโ .github/workflows/ CI (build-fork.yml on macos-15 runners)
Contributing
- Contributing to Void โ CONTRIBUTING.md
- Developing Void โ HACKING.md
- Fork rationale & upstream policy โ VOID_FORK.md
Credits
Void is a hard fork of Ghostty by Mitchell Hashimoto and the Ghostty team. All Ghostty contributors are credited in upstream history, which is preserved in this repo. Divergent work โ grid mode (implemented), plus the planned AI-native I/O and perf-harness directions โ is Void-only.
License
MIT โ same license as upstream Ghostty. All Ghostty contributors are credited in upstream history (preserved in this repo); divergent work (grid mode implemented; AI-native I/O and perf-harness planned) is Void-only.
โฌก Terminal as substrate. Grid as primitive. ยท Based on Ghostty ยท dancinlab