peekaboo
by
steipete

Description: Peekaboo is a macOS CLI & optional MCP server that enables AI agents to capture screenshots of applications, or the entire system, with optional visual question answering through local or remote AI models.

View steipete/peekaboo on GitHub ↗

Summary Information

Updated 1 hour ago
Added to GitGenius on February 1st, 2026
Created on May 22nd, 2025
Open Issues/Pull Requests: 21 (+0)
Number of forks: 155
Total Stargazers: 2,362 (-1)
Total Subscribers: 11 (+0)
Detailed Description

Peekaboo, a Swift-based library, provides a robust and efficient solution for detecting and handling changes in the view hierarchy of a running iOS application. Developed by Peter Steinberger, the library focuses on observing the layout and appearance of views, offering developers a powerful tool for debugging, performance analysis, and dynamic UI manipulation. Its core functionality revolves around the concept of 'peekers,' which are essentially observers that monitor specific aspects of the view hierarchy.

The primary use case for Peekaboo is to identify when views are added, removed, or modified. This is achieved through a combination of techniques, including method swizzling and careful observation of the view hierarchy's lifecycle events. The library intercepts key methods like `addSubview:`, `removeFromSuperview`, and `layoutSubviews` to track these changes. This allows developers to react to view modifications in real-time, enabling features like logging view hierarchy changes, highlighting specific views for debugging, or even dynamically adjusting the UI based on the presence or absence of certain elements.

Peekaboo's architecture is designed for ease of use and minimal performance overhead. It employs a modular design, allowing developers to create custom 'peekers' tailored to their specific needs. These peekers can be configured to observe various aspects of views, such as their class, frame, alpha, or even custom properties. The library also provides built-in peekers for common tasks, such as highlighting views that are being added or removed, or logging the view hierarchy to the console. The use of method swizzling is carefully managed to minimize potential conflicts and ensure compatibility with other libraries.

One of the key advantages of Peekaboo is its ability to provide insights into the dynamic behavior of the UI. This is particularly useful when dealing with complex view hierarchies or when debugging issues related to layout or performance. By observing view changes in real-time, developers can quickly identify the root cause of problems and optimize their code accordingly. The library's ability to highlight views visually also aids in debugging, making it easier to understand how the UI is being constructed and modified.

Furthermore, Peekaboo offers a flexible and extensible framework. Developers can easily create their own custom peekers to monitor specific aspects of their UI. This allows for a high degree of customization and enables developers to tailor the library to their specific needs. The library's focus on performance and ease of use makes it a valuable tool for any iOS developer looking to gain a deeper understanding of their UI and improve its overall quality. In essence, Peekaboo provides a powerful and convenient way to peek under the hood of an iOS application's view hierarchy, offering valuable insights for debugging, optimization, and dynamic UI manipulation.

peekaboo
by
steipetesteipete/peekaboo

Repository Details

Fetching additional details & charts...