How openclaw/peekaboo works
Peekaboo is a macOS automation product with a CLI, menu-bar app, agent, and MCP interface. Its central loop is to observe a screen or app, inspect structured UI state, then perform targeted actions and report results. The graph preserves the documented capture, interaction, system-control, agent, MCP/browser, and desktop-app capabilities. Some subsystem links are dashed because their implementation was not sampled; README statements establish the user-facing capabilities, not all internal call paths.
Main entry points: CommanderRuntimeRouter.swift Command routing · StatusBarController.swift Menu-bar app · SeeCommand.swift Observe screen · Agent Agent sessions
Components 23
CLI and commands
- CLI entry point
Apps/CLI/Sources/PeekabooCLI/CLI/PeekabooEntryPoint.swift - Command routing
Apps/CLI/Sources/PeekabooCLI/CLI/CommanderRuntimeRouter.swift - Observe screen
Apps/CLI/Sources/PeekabooCLI/Commands/AI/SeeCommand.swift - Capture workflow
Apps/CLI/Sources/PeekabooCLI/Commands/Core/CaptureCommand.swift - UI interactions
Apps/CLI/Sources/PeekabooCLI/Commands/Interaction - macOS controls
Apps/CLI/Sources/PeekabooCLI/Commands/System - Configuration
Apps/CLI/Sources/PeekabooCLI/Commands/Core/ConfigCommand.swift
Agent and MCP
- Agent command
Apps/CLI/Sources/PeekabooCLI/Commands/AI/AgentCommand.swift - Agent sessions
Core/PeekabooCore/Sources/PeekabooAgentRuntime/Agent - Browser MCP
Core/PeekabooCore/Sources/PeekabooAgentRuntime/Browser/BrowserMCPSessionManager.swift - MCP interface
Apps/CLI/Sources/PeekabooCLI/Commands/MCP/MCPCommand.swift
Mac app
- Menu-bar app
Apps/Mac/Peekaboo/Features/StatusBar/StatusBarController.swift - Session UI
Apps/Mac/Peekaboo/Core/PeekabooAgent.swift - App settings
Apps/Mac/Peekaboo/Core/Settings.swift - Visual inspector
Core/PeekabooUICore/Sources/PeekabooUICore/Inspector/OverlayManager.swift - Visual overlays
Core/PeekabooVisualizer/Sources/PeekabooVisualizer/Renderer/AnimationOverlayManager.swift - Permissions
Apps/Mac/Peekaboo/Core/Permissions.swift
Shared runtime
- Snapshot management
Core/PeekabooAutomationKit/Sources/PeekabooAutomationKit/Services/Core/Protocols/SnapshotManagerProtocol.swift - Snapshot storage
Core/PeekabooAutomationKit/Sources/PeekabooAutomationKit/Services/Support/SnapshotStorageActor.swift - Window and app models
Core/PeekabooAutomationKit/Sources/PeekabooAutomationKit/Core/Models/Application.swift - Bridge client
Core/PeekabooCore/Sources/PeekabooBridge/PeekabooBridgeClient.swift - Service runtime
Core/PeekabooCore/Sources/PeekabooCore/Support
Other components
- User or client
Connections 24
- User or client → CLI entry point: invokes
README.md - CLI entry point → Command routing: routes commands
- Command routing → Observe screen: dispatches
- Command routing → Capture workflow: dispatches
- Command routing → UI interactions: dispatches
- Command routing → macOS controls: dispatches
- Command routing → Configuration: dispatches
- Observe screen → Snapshot management: stores observations
- Observe screen → Window and app models: uses window data
Apps/CLI/Sources/PeekabooCLI/Commands/AI/SeeCommand+DetectionPipeline.swift - UI interactions → Snapshot management: uses snapshots
- Snapshot management → Snapshot storage: persists leases
- User or client → Agent command: requests workflow
README.md - Agent command → Agent sessions: runs agent
- Agent sessions → Browser MCP: dispatches browser tools
- User or client → MCP interface: connects client
README.md - MCP interface → Agent sessions: exposes tools
- User or client → Menu-bar app: uses app
README.md - Menu-bar app → Session UI: opens sessions
Apps/Mac/Peekaboo/Features/StatusBar/StatusBarController.swift - Menu-bar app → Permissions: checks permissions
Apps/Mac/Peekaboo/Features/StatusBar/StatusBarController.swift - Menu-bar app → App settings: reads preferences
Apps/Mac/Peekaboo/Features/StatusBar/StatusBarController.swift - User or client → Visual inspector: inspects UI
README.md - Visual inspector → Visual overlays: renders overlays
- Command routing → Bridge client: uses runtime services
- Bridge client → Service runtime: accesses services
Core/PeekabooCore/Sources/PeekabooCore/Support/RemoteSnapshotManager.swift