For development and debugging scenarios, the following efficient use methods are recommended:
1. Precise positioning of UI elements::
combining peekaboo list windows --app 'Xcode' To view the window ID, use the --window-id parameter to capture a specific area. For dynamic interfaces, you can use the --question 'highlight all error messages' Let the AI mark the problem elements.
2. Automated regression testing::
Write a script that periodically captures key pages and asks questions such as "Does the login button exist? Is the color #FF5733?", by parsing the returned JSON to achieve visual assertions. With GitHub Actions and other CI tools, you can build a fully automated UI test flow.
3. Enhanced misdiagnosis::
Automatically executed when the app crashes with predefined hooks peekaboo capture app --output crash_${timestamp}.png --question 'What error is shown?', append the screenshots and AI analysis results to the log file.
Advanced Tips: Adjustments --quality 80 parameter to balance image size and recognition accuracy; calling local LLaVA models to avoid sensitive code outflow; using the --format base64 Direct access to image data stream embedding reports.
This answer comes from the articlePeekaboo: macOS screen capture and visual quiz toolThe































