Same authoring surface
@State, @Binding, @FocusState, @Observable, environment values, Layout protocol, Scene declarations. The types you already know.
import TerminalUI
SwiftUI's authoring model — body-only views, recursive layout, identity-keyed state, focus routing — applied to terminal apps. Built on a strict 7-phase rendering pipeline.
01 / What ships
Layout primitives, controls, presentations, focus routing, an ActionScope-based command surface, charts, and image presentation across PNG, JPEG, and GIF. The pipeline is the same on terminal, WASI, native macOS/iOS, and the browser.
02 / Syntax
Views have bodies. State is identity-keyed. Layout is recursive — parents propose, children choose. Commands attach to scopes, not to a global hotkey table.
import TerminalUI
import TerminalUICLI
@main
struct DeployApp: App {
var body: some Scene {
WindowGroup("Deploys") {
DeployList()
}
}
}
struct DeployList: View {
@State private var deploys = Deploy.recent()
@State private var selection: Deploy.ID?
@State private var showDetail = false
@FocusState private var search: Bool
var body: some View {
VStack(alignment: .leading, spacing: 1) {
TextField("filter", text: .constant(""))
.focused($search)
List(deploys, selection: $selection) { deploy in
LabeledContent(deploy.environment, value: deploy.status)
}
}
.keyCommand("Open", key: .return) { showDetail = true }
.sheet(isPresented: $showDetail) {
DeployDetail(id: selection)
}
}
} 03 / Platforms
Same rendering pipeline, different host chrome. The terminal runtime, SwiftUI host, and Bun-based web host all ship in the repo.
Alternate-screen, raw-mode, capability-aware output. The native runtime.
Read more →The same surface, with touch input, natively for iOS.
Read more →WASI build mounted in the browser via the Web TUIGUI host.
Read more →The SwiftUI TUIGUI embedded in macOS chrome.
Read more →04 / SwiftUI parity
Recursive layout. Structural environment propagation. Identity-based state. Scene ownership. Explicit lifecycle boundaries.
@State, @Binding, @FocusState, @Observable, environment values, Layout protocol, Scene declarations. The types you already know.
Parents propose, children choose. Modifier order matters. Measurement and placement are recursive — no terminal shortcuts.
State keyed by tree identity plus source location. View-local state survives rerenders. Lifecycle is identity-driven.
Input parsing, focus routing, alternate-screen ownership, lifecycle staging, commit planning, and incremental presentation.
05 / Technically well-founded
The project's design discipline lives in the docs, not in the marketing. Each claim below links to the design essay that proves it.
Computed pipeline frames are not dropped. The frame-tail worker renders off the main actor, but commit ordering is invariant.
Open the proof →@State is keyed by identity-path plus source location, not by ordinal. View-local state survives rerenders, scrolls, and reorders.
Open the proof →When SwiftUI and terminal-native practice disagree, reinterpret toward the terminal. Restraint is a feature.
Open the proof →It feels at home next to tmux, Zellij, WezTerm,
Neovim, Yazi, and Lazygit.
— Terminal-Native Doctrine, success criterion #1