gmax is a macOS terminal workspace app built with SwiftUI and SwiftTerm.
The product direction is a keyboard-forward shell for managing multiple terminal workspaces, each with nested split panes, a contextual inspector, durable state, and an early settings foundation for terminal appearance.
- Overview
- Current Architecture
- Repository Layout
- Setup
- Usage
- Development
- Keyboard Commands
- Verification
- Status
- License
Today the app already has the core product shape in place:
- a three-column
NavigationSplitView - a
WindowGroup-based main shell scene - a workspace sidebar
- a center pane tree with recursive horizontal and vertical splits
- a right-side inspector for the active pane
- embedded local shell sessions backed by SwiftTerm
- explicit workspace and pane creation commands
- keyboard commands for workspace, pane, and close lifecycle actions
- a saved-workspace library with searchable reopen
- transcript-backed workspace snapshots so reopened workspaces preserve shell history
- Core Data persistence for both live workspace topology and saved workspace snapshots
- per-scene restoration for the selected workspace and inspector visibility
- a settings window for terminal appearance and workspace persistence behavior
This repository is the successor to the earlier exploration work. It is intended to keep moving toward a finished product.
The goal is to build a terminal app that feels native on macOS, is practical to extend, and has a much better long-term story for product features than heavyweight embedders or renderer-first terminal stacks.
The architectural priorities are:
- native SwiftUI shell structure with AppKit-hosted terminal surfaces where needed
- durable pane and workspace primitives that compose cleanly as features grow
- strong keyboard navigation and command-driven workflows
- room for accessibility, theming, workspace management, and sync-worthy settings later
The shell uses a split-tree model rather than a flat grid:
- each workspace owns a recursive pane tree
- leaf nodes host terminal sessions
- split nodes store axis and fraction
- the active pane drives the inspector content
- the selected workspace plus sidebar and inspector visibility restore per scene
- the frontmost shell window contributes menu command context through
focusedSceneValue - terminal appearance is driven by persisted app settings for font, size, and theme
- saved workspaces are stored as durable snapshots with pane launch context and preserved transcript text
- operator-facing diagnostics now flow through Apple's unified logging system using a stable
Loggersubsystem and category taxonomy
SwiftTerm is hosted through AppKit using NSViewRepresentable, so live terminal output stays inside the hosted terminal view instead of driving SwiftUI body churn.
Persistence is handled with Core Data using relational live-workspace records plus a parallel saved-workspace snapshot graph. That gives the app a cleaner path toward undo-friendly workspace closure, searchable reopen, richer restoration, and future sync-friendly expansion if that becomes worthwhile.
The maintainer-facing architecture note lives at docs/maintainers/swiftui-terminal-shell-architecture.md.
gmax/: app source rootgmax/App/: app entry, scene actions, commands, and AppKit window interopgmax/Models/: shell model state plus pane and workspace managementgmax/Persistence/: Core Data stack, snapshot encode and decode, and live workspace storagegmax/Terminal/: SwiftTerm hosting boundary, terminal coordinator, and session plumbinggmax/Views/Content/: recursive pane tree rendering and split behaviorgmax/Views/Detail/: active-pane inspector contentgmax/Views/Scenes/: top-level shell scene compositiongmax/Views/Settings/: settings window and section viewsgmax/Views/Sidebar/: workspace sidebar and saved-workspace library sheetgmaxTests/: unit tests grouped by shared support, pane-tree mutation, workspace lifecycle, and workspace persistence domainsgmaxUITests/: UI tests grouped by launch scaffolding, sidebar flows, and saved-workspace flowsdocs/maintainers/: architecture and maintainer notesdocs/maintainers/accessibility-and-keyboard-plan.md: release-oriented accessibility and keyboard plandocs/maintainers/logging-validation-guide.md: maintainer workflow for Console and/usr/bin/logvalidationdocs/maintainers/v0.1.0-release-checklist.md: first internal release checklistscripts/repo-maintenance/: repo validation, sync, and release helpers
- macOS
- Xcode with SwiftUI and AppKit support
Open gmax.xcodeproj in Xcode.
Build and run the gmax scheme from Xcode.
The app launches into a standard macOS WindowGroup, so the shell can present multiple main windows while still sharing one workspace library and shell model. Each frontmost shell window keeps its own selected workspace plus sidebar and inspector visibility, and its menu commands act on that window's scene-local context.
From there you can:
- open a new shell window from the File menu or
cmd-n - create a new workspace from the toolbar or
cmd-shift-n - open the saved-workspace library from the toolbar or
cmd-o - save the selected workspace into the library with
cmd-s - split the focused pane right or down from the toolbar or with keyboard commands
- close a workspace directly or close it into the saved-workspace library
- reopen a previously saved workspace with its layout and preserved shell history
- hide or show the sidebar and inspector independently
- open the settings window to adjust terminal appearance plus restore, recent-close, and auto-save workspace behavior
xcodebuild -project gmax.xcodeproj -scheme gmax -destination 'platform=macOS' buildxcodebuild -project gmax.xcodeproj -scheme gmax -destination 'platform=macOS' testBuild and run the gmax scheme from Xcode.
The app launches as a macOS window with the workspace sidebar, pane content area, and inspector rail.
For maintainer-oriented repo checks and shared sync steps, use:
scripts/repo-maintenance/validate-all.sh
scripts/repo-maintenance/sync-shared.sh
scripts/repo-maintenance/release.sh --version vX.Y.ZThe current shell exposes a command-first keyboard model across the File, Workspace, and Pane menus:
cmd-n: open a new shell windowcmd-shift-n: create a new workspace in the frontmost shell windowcmd-o: open the saved-workspace librarycmd-s: save the selected workspace to the librarycmd-shift-o: undo the most recent workspace close during the current app sessioncmd-b: hide or show the workspace sidebarcmd-shift-b: hide or show the inspectorcmd-shift-[andcmd-shift-]: move between workspacescmd-t: create a new pane in the selected workspacecmd-d: split the focused pane to the rightcmd-shift-d: split the focused pane downwardcmd-option-left/right/up/down: move focus directionallycmd-option-[andcmd-option-]: move focus in pane ordercmd-w: close the focused pane, then close the workspace if it was the last pane, then close the window if it was the last workspacecmd-option-w: close the selected workspace directlycmd-shift-w: close the current window directly
The app is already past the pure-prototype stage. The shell shape, multi-window scene model, pane model, terminal embedding, directional focus movement, saved-workspace library, transcript-backed restore path, and persistence layers are all real.
What remains is product completion work: command-surface polish, library and rename refinements, manual accessibility validation, richer terminal controls, deeper integrations, and the details that make the app feel intentional rather than merely viable.
The source tree and test surface are now grouped more intentionally by domain. Unit coverage now spans workspace lifecycle, pane-tree mutation behavior, and persistence success and failure paths. UI coverage now exercises the saved-workspace library and workspace-sidebar delete flow, while broader pane lifecycle, multi-window interaction, and release-readiness coverage are still ahead of the project.
Use the project-aware Apple workflow first when validating changes in this repo.
For code changes inside the app, prefer:
xcodebuild -project gmax.xcodeproj -scheme gmax -destination 'platform=macOS' buildFor test validation, prefer:
xcodebuild -project gmax.xcodeproj -scheme gmax -destination 'platform=macOS' testFor maintainer logging validation during manual verification, use:
/usr/bin/log show --last 10m --style compact --predicate 'subsystem == "com.gaelic-ghost.gmax"'For repo-maintenance validation after guidance syncs, use:
scripts/repo-maintenance/validate-all.shThe maintainer-facing validation notes for accessibility, diagnostics, and release readiness live under docs/maintainers/.
gmax is currently source-available under the Functional Source License 1.1,
Apache 2.0 future-license variant (FSL-1.1-ALv2).
That means this repository is available for permitted non-competing use now, including internal use, non-commercial education, and non-commercial research. Competing commercial use is outside the permitted-purpose grant during the protected window.
Each covered release converts to Apache License 2.0 on the second anniversary of the date that release was made available.
See LICENSE, NOTICE, and LICENSE-TRANSITION.md.