gpui-core

Manage GPUI core state, lifecycle, and observe/subscribe/emit events.

Updated Mar 6, 2026
One-click install
npx skills add https://github.com/onehr/gpui-skills --skill gpui-core
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gpui-core
Source: https://github.com/onehr/gpui-skills/tree/main/skills/gpui-core
Command: npx skills add https://github.com/onehr/gpui-skills --skill gpui-core

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides the foundational knowledge for managing state, application lifecycle, and inter-component communication within the GPUI framework, enabling developers to build robust and interactive user interfaces.

Core Features & Use Cases

  • State Management: Understand Entity<T>, Context<T>, and global state management.
  • App Lifecycle: Learn how to initialize and run a GPUI application using gpui_platform::application.
  • Event Handling: Master observe/notify for state changes and subscribe/emit for custom events.
  • Use Case: When you need to manage shared application data, update the UI reactively, or handle complex state transitions in your GPUI application.

Quick Start

Use the gpui-core skill to understand how to open a new window in a GPUI application.

Frequently Asked Questions about gpui-core

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage state in a GPUI application?

GPUI state management uses Entity<T> and Context<T> to track component data. You interact with these context types to read, update, and share application state reactively across your user interface components.

How does event handling work in GPUI?

GPUI event handling uses observe and notify for state changes, plus subscribe and emit for custom events. This pattern enables reactive UI updates and direct inter-component communication within the application.

How do I initialize and run a GPUI application lifecycle?

You initialize the GPUI app lifecycle using gpui_platform::application. This sets up the core environment, allowing you to open windows and manage the entity-component system for your interactive interface.

What is the best way to open a new window in GPUI?

Opening a new window in GPUI requires initializing the application lifecycle first. Once the app context is active, you use the window management mechanisms to create and render interactive, data-driven UI components.

Can I use GPUI for complex state transitions and shared data?

Yes, GPUI handles complex state transitions through its entity-component system. You can manage shared application data globally and update the UI reactively by observing entities and emitting events between components.

Why does my GPUI component not update when state changes?

GPUI components fail to update when state changes if observe and notify are not properly configured. You must explicitly observe the relevant Entity<T> so the context triggers reactive UI updates upon data modification.