privacycommand is Swift: a SwiftUI app over a pure-Swift analyzer library, plus a privileged helper, a CLI, and an agent that runs inside a VM.

The layout

The split is deliberate: a change to the analyzer can be tested with swift test in seconds rather than by launching a GUI. The whole analysis half of Core has no UI dependency at all. Three files under Monitoring/ do import AppKit behind #if canImport(AppKit)DynamicMonitor launches the inspected bundle via NSWorkspace, LiveProbeMonitor polls NSPasteboard.general.changeCount, and VMHostDetection drives the VM front-ends. Those are on the dynamic path and can’t do their jobs without it. If you’re adding a detector under Analysis/, keep it free of both.
There is a second, stale copy of the helper sources under Sources/privacycommandHelper/. The Xcode project builds the top-level privacycommandHelper directory — that’s the one that ships. Check which you are editing.

Where to start

Tests

Run this before opening a PR. The Xcode project also carries an XCTest bundle for the app target (⌘U).