An owned, deliberately small macOS embedding package for Ghostty's terminal core. It is built for Vibe Forge and exposes a stable Swift API while keeping the patched C and Zig interfaces internal.
- macOS 14 or newer
- Apple Silicon (
arm64) only - Swift 6
The package intentionally does not include Ghostty's window management, tabs, splits, inspector, custom shaders, configuration-file UI, theme browser, opacity effects, mobile targets, or AI integrations.
GhosttyTerminalViewowns the AppKit/Metal surface and native input/IME.GhosttyHostSessionaccepts ordered PTY output and reports input and resize events.GhosttyTerminalAppearanceselects one of four owned themes plus font and size.GhosttyTerminalViewDelegatereports metadata, focus, bell, and renderer health.GhosttyGridSizedescribes the terminal grid and pixel dimensions.
import VibeForgeGhostty
let session = GhosttyHostSession(
onInput: { bytes in /* write bytes to the PTY */ },
onResize: { size in /* apply TIOCSWINSZ */ }
)
let terminal = try GhosttyTerminalView(
hostSession: session,
appearance: GhosttyTerminalAppearance(
theme: .forgeDark,
fontFamily: "JetBrains Mono",
fontSize: 14
)
)
session.receive(ptyOutput)
session.finish(.exited(code: 0), runtimeMilliseconds: elapsed)The host owns process and PTY lifecycle. This package never launches a shell or agent process by itself.
Release 1.0.0 pins:
- Ghostty commit
35e1a0160c4f6797e1bb1ef8e7a2b8c6b114ab58 - Zig
0.15.2 - macOS deployment target
14.0 ReleaseFast,arm64-macos
With Zig 0.15.2 and Apple's Metal toolchain installed:
./build.sh --source /path/to/clean/ghostty-checkoutThe build applies the patches in Patches/ghostty, creates a static arm64
XCFramework, tests it through SwiftPM, and writes
build/GhosttyKit.xcframework.zip. See BUILD_MANIFEST.md for the release
artifact digest and exact build inputs.
This package was bootstrapped from Lakr233/libghostty-spm 1.2.11 and embeds a
patched build of Ghostty. All three projects are MIT licensed. Theme palettes are
derived from the MIT-licensed iTerm2-Color-Schemes collection. See
THIRD_PARTY_NOTICES.md and LICENSES/ for attribution and license texts.