$ show insidegui/VirtualBuddy
VirtualBuddy is a macOS-native virtual machine manager built on Apple's Virtualization framework. It allows developers to create, configure, run, and manage macOS and Linux virtual machines on Apple Silicon hardware, primarily for testing applications across different macOS versions. The system provides a full SwiftUI/AppKit GUI, a command-line tool (vctool), an XPC service for device restoration, and a guest application that runs inside VMs for clipboard sharing, file transfers, and configuration import. It manages the complete VM lifecycle: provisioning from IPSW restore images or Linux ISOs, hardware configuration (CPU, memory, storage, network, USB passthrough), boot/pause/resume, saved session save/restore with atomic file operations, and enterprise managed preferences via MDM. The architecture is modular with separate frameworks (VirtualCore, VirtualUI, VirtualWormhole, DeepLinkSecurity, VirtualInstallation) and a clear separation between UI, logic, and communication layers. External dependencies include Sparkle for updates, VMBridge for guest-host communication, and Apple's private MobileDevice framework for device restoration. The codebase exhibits high craftsmanship with well-structured concurrency (async/await, actors, Combine), extensive use of SwiftUI patterns, and robust state machines for session lifecycle and installation. However, heavy reliance on private Apple APIs and version-conditional compilation introduces medium technical drift risk, and the overall complexity is significant.
The LLM identified 4 files worth highlighting for reuse:
A lightweight, thread-safe weak reference wrapper for use in collections like arrays and dictionaries. Implements Equatable, Hashable, and Encodable with the underlying object's identity. Self-contained and extractableβsolves a common problem when storing weak objects without reference counting side effects.
A property wrapper that transparently persists values to the macOS keychain using a Codable backend. Supports all property wrapper semantics (get, set, projectedValue), handles encryption/decryption, and includes error handling. Self-contained, extractable for any macOS app requiring secure credential storage.
A configurable manager for macOS status bar items that provides SwiftUI content in a popover panel. Supports custom button labels, NSViewController-based content, occlusion detection, and animation. Highly decoupledβcan be extracted and reused in any macOS app needing a status bar menu with rich SwiftUI content.
A self-contained utility to resize GPT-formatted disk images by manipulating the GPT header, partition entries, and partition tables. Supports growing partitions, recalculating CRC32 checksums, and maintaining partition UUIDs. Built on Foundation and CommonCrypto only, it can be extracted for any macOS or iOS app requiring disk image manipulation.