👻 Ghostty is a fast, feature-rich, and cross-platform terminal emulator that uses platform-native UI and GPU acceleration.
This report presents the forensic synthetic code analysis of ghostty-org/ghostty, a Zig project with 58,138 GitHub stars. SynthScan v2.0 examined 90,471 lines of code across 432 source files, recording 213 pattern matches distributed across 14 syntactic categories. The overall adjusted score of 2.9 places this repository in the Likely human-written band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 213 distinct pattern matches across 14 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | CMakeLists.txt | 1 | # CMake wrapper for libghostty-vt | COMMENT |
| LOW | CMakeLists.txt | 21 | # | COMMENT |
| LOW | CMakeLists.txt | 41 | # Option 2 — find_package (after installing to a prefix): | COMMENT |
| LOW | CMakeLists.txt | 61 | # | COMMENT |
| LOW | CMakeLists.txt | 261 | # Zig target triple. For native builds, use the IMPORTED targets above | COMMENT |
| LOW | macos/GhosttyUITests/GhosttyCustomConfigCase.swift | 1 | // | COMMENT |
| LOW | macos/Tests/NSPasteboardTests.swift | 21 | /// Test text/html MIME type converts to .html | COMMENT |
| LOW | macos/Tests/BenchmarkTests.swift | 1 | // | COMMENT |
| LOW | macos/Tests/Terminal/TerminalRestorableTests.swift | 41 | @MainActor | COMMENT |
| LOW | macos/Tests/Terminal/TerminalRestorableTests.swift | 61 | #expect(v5.surfaceTree.contains(where: { $0.id.uuidString == "926F3F2A-824C-40C9-87CA-2CDCA4E11049" })) | COMMENT |
| LOW | macos/Tests/Terminal/TerminalRestorableTests.swift | 81 | #expect(v7.effectiveFullscreenMode == .native) | COMMENT |
| LOW | macos/Sources/App/macOS/ghostty-bridging-header.h | 1 | // C imports here are exposed to Swift. | COMMENT |
| LOW | macos/Sources/App/macOS/AppDelegate.swift | 181 | if | COMMENT |
| LOW | macos/Sources/App/macOS/AppDelegate.swift | 381 | } | COMMENT |
| LOW | macos/Sources/App/macOS/AppDelegate.swift | 421 | // more selective and only remove surface-targeted notifications. | COMMENT |
| LOW | macos/Sources/App/macOS/AppDelegate.swift | 461 | var config = Ghostty.SurfaceConfiguration() | COMMENT |
| LOW | macos/Sources/Features/AppleScript/ScriptTerminal.swift | 1 | import AppKit | COMMENT |
| LOW | macos/Sources/Features/AppleScript/ScriptTab.swift | 1 | import AppKit | COMMENT |
| LOW | macos/Sources/Features/AppleScript/ScriptWindow.swift | 1 | import AppKit | COMMENT |
| LOW | macos/Sources/Features/AppleScript/ScriptWindow.swift | 21 | /// Canonical representative for this scripting window's tab group. | COMMENT |
| LOW | …ces/Features/AppleScript/AppDelegate+AppleScript.swift | 1 | import AppKit | COMMENT |
| LOW | …ces/Features/AppleScript/AppDelegate+AppleScript.swift | 21 | /// Backing collection for `application.windows`. | COMMENT |
| LOW | …cos/Sources/Features/Terminal/TerminalController.swift | 441 | // If our parent tab group already has this window, macOS added it and | COMMENT |
| LOW | …cos/Sources/Features/Terminal/TerminalController.swift | 1101 | } | COMMENT |
| LOW | …Sources/Features/Terminal/BaseTerminalController.swift | 1 | import Cocoa | COMMENT |
| LOW | …Sources/Features/Terminal/BaseTerminalController.swift | 1021 | COMMENT | |
| LOW | …al/Window Styles/TitlebarTabsTahoeTerminalWindow.swift | 141 | /// is removed from the view hierarchy. | COMMENT |
| LOW | …os/Sources/Features/App Intents/IntentPermission.swift | 1 | import AppKit | COMMENT |
| LOW | macos/Sources/Features/Splits/SplitView.swift | 1 | import SwiftUI | COMMENT |
| LOW | macos/Sources/Features/Splits/SplitTree.swift | 241 | COMMENT | |
| LOW | macos/Sources/Features/Splits/SplitTree.swift | 501 | /// | COMMENT |
| LOW | macos/Sources/Features/Splits/SplitTree.swift | 821 | /// to 2D coordinate space. The coordinate system uses (0,0) as the top-left corner with | COMMENT |
| LOW | macos/Sources/Features/Splits/SplitTree.swift | 841 | /// // | COMMENT |
| LOW | macos/Sources/Features/Splits/SplitTree.swift | 861 | height = Double(h) | COMMENT |
| LOW | macos/Sources/Features/Splits/SplitTree.swift | 881 | /// - **Vertical splits**: Width = max of children widths, Height = sum of children heights | COMMENT |
| LOW | macos/Sources/Features/Splits/SplitTree.swift | 921 | /// This method recursively traverses the split tree and calculates the precise bounds | COMMENT |
| LOW | macos/Sources/Features/Splits/SplitTree.swift | 1001 | COMMENT | |
| LOW | macos/Sources/Features/Splits/SplitTree.swift | 1361 | /// - The tree's hierarchical structure (splits and their directions) | COMMENT |
| LOW | macos/Sources/Helpers/ExpiringUndoManager.swift | 1 | /// An UndoManager subclass that supports registering undo operations that automatically expire after a specified durati | COMMENT |
| LOW | macos/Sources/Helpers/ExpiringUndoManager.swift | 81 | // but we want to make sure it happens right now. | COMMENT |
| LOW | macos/Sources/Helpers/NonDraggableHostingView.swift | 1 | import SwiftUI | COMMENT |
| LOW | macos/Sources/Helpers/Extensions/NSMenu+Extension.swift | 1 | import AppKit | COMMENT |
| LOW | macos/Sources/Ghostty/Ghostty.App.swift | 681 | COMMENT | |
| LOW | …/Sources/Ghostty/Surface View/SurfaceView_AppKit.swift | 841 | } | COMMENT |
| LOW | …/Sources/Ghostty/Surface View/SurfaceView_AppKit.swift | 1161 | return | COMMENT |
| LOW | …/Sources/Ghostty/Surface View/SurfaceView_AppKit.swift | 1261 | /// event dispatch system and use this timestamp as an identity to know to actually send it to keyDown. | COMMENT |
| LOW | …/Sources/Ghostty/Surface View/SurfaceView_AppKit.swift | 1941 | // selection range or contains it but a lot of macOS system behaviors request | COMMENT |
| LOW | …/Sources/Ghostty/Surface View/SurfaceView_AppKit.swift | 2121 | extension Ghostty.SurfaceView: NSServicesMenuRequestor { | COMMENT |
| LOW | …s/Sources/Ghostty/Surface View/SurfaceScrollView.swift | 1 | import SwiftUI | COMMENT |
| LOW | …s/Sources/Ghostty/Surface View/SurfaceScrollView.swift | 281 | guard row != lastSentRow else { return } | COMMENT |
| LOW | …s/Sources/Ghostty/Surface View/SurfaceScrollView.swift | 301 | return | COMMENT |
| LOW | …s/Sources/Ghostty/Surface View/SurfaceScrollView.swift | 321 | /// | COMMENT |
| LOW | macos/Sources/Ghostty/Surface View/SurfaceView.swift | 581 | } | COMMENT |
| LOW | nix/build-support/check-zig-cache.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | include/ghostty.h | 1 | // Ghostty embedding API. The documentation for the embedding API is | COMMENT |
| LOW | include/ghostty.h | 21 | typedef SSIZE_T ssize_t; | COMMENT |
| LOW | include/ghostty.h | 41 | #ifdef GHOSTTY_BUILD_SHARED | COMMENT |
| LOW | include/ghostty/vt.h | 121 | * PNG decoder callback and send a Kitty Graphics Protocol image. | COMMENT |
| LOW | include/ghostty/vt.h | 141 | #include <ghostty/vt/grid_ref.h> | COMMENT |
| LOW | include/ghostty/vt/device.h | 21 | #define GHOSTTY_DA_CONFORMANCE_VT220 62 | COMMENT |
| 119 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | include/ghostty/vt/terminal.h | 98 | * ### Defining a write_pty callback | COMMENT |
| MEDIUM⚡ | include/ghostty/vt/terminal.h | 101 | * ### Defining a bell callback | COMMENT |
| MEDIUM⚡ | include/ghostty/vt/terminal.h | 104 | * ### Defining a title_changed callback | COMMENT |
| MEDIUM⚡ | include/ghostty/vt/terminal.h | 107 | * ### Defining a clipboard_write callback | COMMENT |
| MEDIUM | include/ghostty/vt/sys.h | 33 | * ### Defining a PNG decode callback | COMMENT |
| MEDIUM | src/shell-integration/bash/bash-preexec.sh | 135 | # This function is installed as part of the PROMPT_COMMAND; | COMMENT |
| MEDIUM | src/shell-integration/bash/bash-preexec.sh | 143 | # This function is installed as part of the PROMPT_COMMAND. | COMMENT |
| MEDIUM | src/shell-integration/bash/bash-preexec.sh | 203 | # This function is installed as the DEBUG trap. It is invoked before each | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | …cos/Sources/Features/Terminal/TerminalController.swift | 1703 | // Initial size as requested by the configuration (e.g. `window-width`) | COMMENT |
| HIGH | …os/Sources/Helpers/Extensions/NSScreen+Extension.swift | 57 | /// - Returns: CGPoint suitable for setFrameOrigin that positions the window as requested | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | CMakeLists.txt | 12 | # --------------------------------- | COMMENT |
| MEDIUM | CMakeLists.txt | 23 | # --------------------------------------------- | COMMENT |
| MEDIUM | CMakeLists.txt | 48 | # ------------------- | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | CONTRIBUTING.md | 132 | ### I've implemented a feature | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | …cos/Sources/Features/Terminal/TerminalController.swift | 493 | // is used in the tab bar. This fixes that. If we can find a more robust | COMMENT |
| MEDIUM | macos/Sources/Features/Splits/SplitTree.swift | 617 | // be robust against it. | COMMENT |
| LOW | nix/build-support/fetch-zig-cache.sh | 8 | # at all and packagers can just use `zig build --fetch`. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | macos/GhosttyUITests/GhosttyMouseStateTests.swift | 16 | let lines = (1...200).map { "Line \($0): The quick brown fox jumps over the lazy dog. Lorem ipsum dolor sit amet | CODE |
| LOW | macos/GhosttyUITests/GhosttyMouseStateTests.swift | 16 | let lines = (1...200).map { "Line \($0): The quick brown fox jumps over the lazy dog. Lorem ipsum dolor sit amet | CODE |
| LOW | src/cli/lorem_ipsum.txt | 1 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras hendrerit aliquet | CODE |
| LOW | src/cli/lorem_ipsum.txt | 1 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras hendrerit aliquet | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/font/nerd_font_codegen.py | 304 | CODE | |
| LOW | src/font/nerd_font_codegen.py | 414 | CODE | |
| LOW | src/font/nerd_font_codegen.py | 95 | CODE | |
| LOW | src/font/nerd_font_codegen.py | 156 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | macos/Sources/Features/Splits/SplitTree.swift | 1369 | /// Example usage: | COMMENT |
| LOW | macos/Sources/Helpers/ExpiringUndoManager.swift | 6 | /// Example usage: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | include/ghostty/vt/wasm.h | 33 | * Here's a simple example of using the Wasm utilities with the key encoder: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/shell-integration/bash/ghostty.bash | 99 | # Check if argument is '-e' or '--edit' (sudoedit flags) | COMMENT |
| LOW | src/shell-integration/bash/ghostty.bash | 104 | # Check if argument is neither an option nor a key-value pair | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | src/font/nerd_font_codegen.py | 576 | f.write("\n else => null,\n };\n}\n") | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/font/nerd_font_codegen.py | 203 | def coalesce_codepoints_to_ranges(codepoints: list[int]) -> list[tuple[int, int]]: | CODE |
| LOW | src/font/nerd_font_codegen.py | 304 | def generate_codepoint_tables( | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/shell-integration/bash/bash-preexec.sh | 56 | # WARNING: This variable is no longer used and should not be relied upon. | COMMENT |