How tddworks/baguette works
Baguette is a macOS CLI and local web control plane for headless iOS simulators, with a companion path for physical-device streaming. Users boot and manage devices, inject input and simulated-world state, inspect accessibility and logs, and capture or stream results. The graph groups those user-facing workflows around simulator adapters and server routes. README capabilities fill in several unsampled branches; their paths are represented by existing feature modules, while uncertain internal call wiring is omitted.
Main entry points: Server.swift HTTP and WS server · BootCommand.swift Command handlers · ServerDeviceTwinRoutes.swift Twin routes · RootCommand.swift baguette CLI
Components 25
User entry points
- baguette CLI
Sources/Baguette/App/RootCommand.swift - Command handlers
Sources/Baguette/App/Commands/BootCommand.swift
Simulator control
- Simulator lifecycle
Sources/Baguette/Domain/Simulator/Simulators.swift - CoreSimulator adapter
Sources/Baguette/Infrastructure/Simulator/CoreSimulators.swift - Input injection
Sources/Baguette/Domain/Input/Input.swift - Accessibility inspection
Sources/Baguette/Domain/Accessibility/Accessibility.swift - Device settings
Sources/Baguette/Domain/Interface/Interface.swift - Simulated world
Sources/Baguette/Domain/Location/Location.swift - Camera session
Sources/Baguette/Domain/Camera/CameraSession.swift - Motion session
Sources/Baguette/Domain/Motion/MotionSession.swift
Capture and rendering
- Video streaming
Sources/Baguette/Domain/Stream/Stream.swift - Screen recording
Sources/Baguette/Domain/Recording/ScreenRecorder.swift - 3D rendering
Sources/Baguette/Domain/Render/DeviceRenderer.swift
Web control plane
- HTTP and WS server
Sources/Baguette/Infrastructure/Server/Server.swift - Simulator web UI
Sources/Baguette/Resources/Web/baguette/simulator.js - Device farm
Sources/Baguette/Resources/Web/farm/farm-app.js - Plugin system
Sources/Baguette/Domain/Plugin/Plugins.swift - Apps and deep links
Sources/Baguette/Domain/Apps/Apps.swift
Physical device twin
- Twin routes
Sources/Baguette/Infrastructure/Server/ServerDeviceTwinRoutes.swift - Twin session
Sources/Baguette/Domain/Device/TwinSession.swift - Broadcast sender
Companion/DeviceTwin/Broadcast/Sources/SampleHandler.swift - Twin transport
Companion/DeviceTwin/Wire/Sources/TwinTransport.swift
Other components
- CLI operator
- Browser user
- Twin broadcast
Connections 31
- CLI operator → baguette CLI: runs commands
- baguette CLI → Command handlers: dispatches
- Command handlers → Simulator lifecycle: manages devices
- Simulator lifecycle → CoreSimulator adapter: uses adapter
- Command handlers → Input injection: injects gestures
- Command handlers → Accessibility inspection: reads tree
- Command handlers → Device settings: sets preferences
- Command handlers → Simulated world: sets conditions
- Command handlers → Camera session: starts capture
- Command handlers → Motion session: publishes motion
- Command handlers → Video streaming: streams frames
- Command handlers → Screen recording: records screen
- Command handlers → 3D rendering: renders device
- CLI operator → HTTP and WS server: starts service
- Browser user → Simulator web UI: controls simulator
- Browser user → Device farm: views devices
- Simulator web UI → HTTP and WS server: sends requests
- Device farm → HTTP and WS server: loads device views
- HTTP and WS server → Input injection: dispatches input
- HTTP and WS server → Accessibility inspection: serves inspection
- HTTP and WS server → Device settings: applies settings
- HTTP and WS server → Video streaming: serves streams
- HTTP and WS server → Plugin system: dispatches plugin actions
- HTTP and WS server → Apps and deep links: handles app actions
- HTTP and WS server → Twin routes: registers twin routes
- Twin broadcast → Broadcast sender: starts broadcast
- Broadcast sender → Twin transport: sends video
- Twin transport → Twin routes: connects websocket
- Twin routes → Twin session: handles protocol
- HTTP and WS server → Screen recording: captures recording
- HTTP and WS server → 3D rendering: serves 3D render