Prompt.
A ground-up macOS terminal emulator I designed and engineered from scratch — VT escape-sequence engine, PTY layer, native app, and a local-AI assistant, all in Swift. 151 tests and two throughput benchmarks keep every claim honest.
Designed & Engineered by David MacMillan.
The Build
Correctness first. Then measured speed.
Prompt is a systems project end to end: the lowest layer speaks raw POSIX, the highest is a native Mac app with tabs, command blocks, selection, mouse reporting, and a built-in assistant.
An Engine, Not a Widget
TerminalCore is pure Swift with zero UI dependencies — the canonical DEC/xterm state machine, correct across arbitrary UTF-8 chunk boundaries. The app, the tests, and headless tools all drive it identically.
The Details That Run vim
Deferred wrap modelled the way vt100.net specifies. CJK and emoji occupy two cells; combining marks fuse. Mouse modes 1000/1002/1003 in both X10 and SGR encodings. These are the details that separate emulators that work from ones that almost do.
8× Faster — With a Built-In Proof
A printable-run fast path took the mixed text+SGR+motion benchmark from ~5.6 to ~44 MB/s on Apple Silicon. Because it's an opt-in hook that leaves the per-character action stream unchanged, every existing interpreter test re-runs through it as a free equivalence check: optimisation with evidence it changed nothing but speed.
Local AI, Hard Boundaries
The ⌘K assistant lives in its own module behind a provider interface — a local model via MLX and remote providers are interchangeable — with both data boundaries between terminal content and the model explicitly hardened.
151 Tests, Flood-Hardened
Parser, interpreter, grid, width handling, PTY integration, selection, blocks, and mouse — plus flood tests proving every untrusted escape-sequence input is bounded. CI ships universal binaries with version stamping.