Developer Michael Liv has reverse-engineered Claude.ai's generative UI capabilities and rebuilt them as a macOS extension for pi, an extensible coding agent. The system enables creation of interactive HTML and SVG widgets that render in native macOS windows, using 72KB of production guidelines extracted from Claude.ai to match Anthropic's design quality.
Interactive Widgets Render Progressively as LLM Generates HTML
The pi-generative-ui extension allows users to request visualizations of complex concepts—such as compound interest calculations or transformer architectures—and receive live, interactive applications. As the language model produces tokens, elements appear progressively in a native window with full browser capabilities. The system employs DOM diffing to update only changed elements, enabling smooth animations and seamless execution of visualization libraries including Chart.js, D3, and Three.js.
Built on macOS WKWebView via the Glimpse framework, the extension eliminates Electron overhead while providing native performance. The TypeScript-based implementation supports bidirectional communication, allowing interactive widgets to send data back to the agent for further processing.
72KB of Production Guidelines Extracted From Claude.ai
Liv extracted 72KB of production guidelines verbatim from Claude.ai to ensure generated UIs match Anthropic's design standards. This reverse-engineering effort represents significant work to understand and replicate Claude's generative UI system outside of its original environment. The extraction process captured design patterns, styling conventions, and interaction models that give Claude.ai its distinctive interface quality.
The project has attracted community interest with 369 stars and 15 forks on GitHub as of March 2026. Developer Dan Bachelder contributed to the project alongside Liv.
Supports Standard Web Visualization Libraries
The extension works with standard web visualization libraries, making it compatible with existing developer workflows. Use cases span data visualization, interactive diagrams, transformer architecture visualizations, compound interest calculators, and any visual concept benefiting from interactivity. The live streaming capability means widgets begin rendering immediately as the LLM generates HTML, providing responsive feedback during the generation process.
Key Takeaways
- Michael Liv reverse-engineered Claude.ai's generative UI system and rebuilt it as a macOS extension for the pi coding agent
- The system uses 72KB of production guidelines extracted from Claude.ai to match Anthropic's design quality
- Interactive HTML and SVG widgets render progressively in native macOS windows using WKWebView, eliminating Electron overhead
- The extension supports bidirectional communication and works with visualization libraries including Chart.js, D3, and Three.js
- The project has gained 369 stars on GitHub as of March 2026, indicating strong community interest