Gpui Kit logo

Gpui Kit

OrganizationPopular
longbridge
gpui-kit

How to build desktop applications with GPUI Kit, the Rust framework published as the gpui-kit crate (GPUI plus gpui_kit::component, gpui_kit::base, gpui_kit::assets). Use when setting up a gpui-kit app, choosing or using a component (Button, Input, Select, Dialog, Sheet, Tabs, Sidebar, List, DataTable, Tree, Chart, etc.), handling component state, theming, or window overlays, and for GPUI mechanics: actions and keybindings, async tasks, contexts, custom elements, entities, events, focus, global state, layout and styling, ElementId, and tests including UI integration testing. Holds the normative Coding Guides: read them before any architecture, state-ownership, public API, naming, or testing decision. Pairs with the gpui-kit-design-guides skill for the Design Guides.

Overview

Publisherlongbridge
Repositorygpui-kit
Skill namegpui-kit
Stars
14.5K
Forks
891
Bundled files
26
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 26 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by longbridge on GitHub. Read the source before you install it.

Installation

Install the Gpui Kit AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/longbridge/gpui-kit.git /tmp/gpui-kit
mkdir -p .claude/skills
cp -r /tmp/gpui-kit/skills/gpui-kit .claude/skills/gpui-kit
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Gpui Kit in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Gpui Kit on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Gpui Kit is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

GPUI Kit

Applications depend on one crate, gpui-kit. GPUI is use gpui_kit::*;, and each layer is reachable by name: gpui_kit::component (styled components), gpui_kit::base (unstyled behavior), gpui_kit::assets (default icons), gpui_kit::platform.

Start with component-family conventions to choose the constructor, state owner, event, and layout contract for the task. Learn the family once, then verify the specific component supports the capability.

For a complete compiled view with retained state, subscriptions, and overlay layers, read the tested application recipe.

Read the Guides First

Two guides hold the rules this skill assumes. They are requirements, not inspiration. Read the guide file itself; do not answer from this page, from a similar file in the codebase, or from training data.

GuideRead before
Design Guides, skill gpui-kit-design-guidesChoosing components, layout, spacing, hierarchy, color, density, interaction states, overlays, motion, interface copy
Coding GuidesCrate layering, RenderOnce vs Entity<T>, state ownership, ElementId, events, focus, async, public API, naming, testing

Read the Design Guides first when the change has a visible surface: code structure preserves product intent, it does not replace it. If the design skill is not installed, fetch https://gpui-kit.com/docs/design-guides.md. The coding guide is a verbatim copy of https://gpui-kit.com/docs/coding-guides.md, so its links to ./design-guides.md and ./getting-started.md mean the design skill and https://gpui-kit.com/docs/getting-started.md.

Coding Guides section map

Read the whole guide for a new crate, module, or feature. For a narrow change, read "Architecture at a glance" and "Rules for coding agents" first, then the section for the change (grep -n '^## ' references/coding-guides.md).

SectionRead when
Architecture at a glanceAlways; crate layering, ownership boundary
Bootstrap and root ownershipmain, init, Root, window creation, app-level state
Understand GPUI's phases and contextsAnything touching App, Window, Context<T>, render vs update
Choose the right unitDeciding RenderOnce vs Entity<T> vs custom Element
State ownershipWhere a piece of state lives, who mutates it, Entity<State> handles
Stable identityElementId, lists, repeated elements, keyed state
Rendering and compositionrender, builder chains, when/map, child composition
Behavior and presentation boundarygpui-base vs gpui-component vs application code
Theme and stylingcx.theme(), tokens, Styled, sizes, variants
Events, actions, and focuscx.emit, subscribe, actions!, keybindings, FocusHandle
Async work and side effectscx.spawn, background_spawn, Task, I/O, timers
Layout, measurement, and scrollingFlex layout, sizing, overflow, scroll handles, measuring
Lists, tables, and large dataVirtualList, List, DataTable, delegates, large collections
Public API designAnything pub: builders, private fields, setter and reader naming
Platform and capability boundariesmacOS/Windows/Linux/wasm differences, feature gates
File and naming conventionsNew files, modules, type and method names, Kind suffix, Context
Testing strategyWhat to test, #[gpui_kit::test], TestAppContext
Performance rulesRender cost, allocation, re-render triggers
Common failure modesBefore finishing; invented APIs, state in render, index ids
Rules for coding agentsAlways when an agent writes code
Implementation checklistBefore finishing; run every item against the work

Non-negotiables

A floor, not a substitute for the guides.

  • Never invent an API. Search the current source for the real signature. Do not translate a React, CSS, or older-GPUI example by analogy; a plausible-looking method that does not exist is the most common failure.
  • One dependency. Applications depend on gpui-kit alone. GPUI is use gpui_kit::*;; the layers are gpui_kit::component, gpui_kit::base, gpui_kit::assets, gpui_kit::platform.
  • Framework owns behavior, application owns presentation. Do not put colors, sizing, or layout in gpui-base; do not put interaction behavior in application styling code.
  • Stable identity. Repeated elements need domain-derived ElementIds, not list indexes.
  • No pub fields across the seam. Public data types use builders and reader methods.
  • Spell Context out. cx is GPUI's; name anything else after what it holds.

Documentation

  • Find a task/component page: use https://gpui-kit.com/llms.txt, then load its Markdown page.
  • Full reference: https://gpui-kit.com/llms-full.txt is available when broad reference is actually needed
  • Per-component API: fetch https://gpui-kit.com/component/{name}.md, e.g. button.md, input.md, select.md, dialog.md, data-table.md
  • Any site page can be fetched as Markdown by appending .md to the URL

Quick Reference

Setup and examples: references/usage.md.

rust
use gpui_kit::*;
use gpui_kit::component::Root;

gpui_kit::application()
    .with_assets(gpui_kit::assets::Assets)
    .run(|cx| {
        gpui_kit::init(cx);                       // first, before anything else
        // ... open_window(..., |window, cx| cx.new(|cx| Root::new(view, window, cx)))
    });
  • Stateless (RenderOnce): build in render: Button::new("save").primary().label("Save").on_click(|_, _, _| {})
  • Stateful: hold Entity<State> in the view, pass a reference in render: let input = cx.new(|cx| InputState::new(window, cx)); then Input::new(&self.input)
  • Sizes: .xsmall() .small() .medium() (default) .large()
  • Theme: cx.theme().primary · .background · .foreground · .border · .muted
  • Overlays: window.open_dialog(...), open_sheet(...), push_notification(...) via gpui_kit::component::WindowExt

Component Catalog

Import paths are relative to gpui_kit::component::, so input::{Input, InputState} means use gpui_kit::component::input::{Input, InputState};. For the full API fetch the component's .md doc.

Input & Form

ComponentImportNotes
Inputinput::{Input, InputState}Stateful. Text, password, mask, validation
Textareainput::{Textarea, TextareaState}Stateful. Multi-line text
Editorinput::{Editor, EditorState}Stateful. Code editor, tree-sitter feature
NumberInputinput::{NumberInput, NumberInputEvent}Stateful. Numeric with step
OtpInputinput::OtpInputStateful. One-time password
Selectselect::{Select, SelectState}Stateful. Dropdown picker
Comboboxcombobox::{Combobox, ComboboxState}Stateful. Searchable select
Checkboxcheckbox::CheckboxStateless. on_click receives &bool
Switchswitch::SwitchStateless. Toggle
Radioradio::{Radio, RadioGroup}Stateless.
Sliderslider::{Slider, SliderState}Stateful.
Togglebutton::ToggleStateless.
Ratingrating::RatingStateless.
Stepperstepper::StepperStateless. Multi-step progress
ColorPickercolor_picker::{ColorPicker, ColorPickerState}Stateful.
DatePickerdate_picker::{DatePicker, DatePickerState}Stateful.
Calendarcalendar::{Calendar, CalendarState}Stateful. Inline month view
Formform::{v_form, h_form, field}Layout container for form fields

Display & Feedback

ComponentImportNotes
Buttonbutton::{Button, ButtonGroup}Stateless. Primary UI action
Icon{Icon, IconName}Stateless. Lucide icons
Badgebadge::BadgeStateless.
Tagtag::TagStateless. Closable tags
Avataravatar::AvatarStateless.
Labellabel::LabelStateless. Form label
Kbdkbd::KbdStateless. Keyboard key display
Alertalert::AlertStateless. Info/success/warning/error
Spinnerspinner::SpinnerStateless. Loading indicator
Skeletonskeleton::SkeletonStateless. Loading placeholder
Shimmershimmer::{ShimmerText, ShimmerStyle}Stateless. Streaming-text shimmer
Markermarker::{Marker, MarkerVariant}Stateless. Inline status marker
Progressprogress::{Progress, ProgressCircle}Stateless.
Tooltiptooltip::TooltipVia .tooltip() on elements
HoverCardhover_card::{HoverCard, HoverCardState}Stateful.
Clipboardclipboard::ClipboardStateless. Copy button
TextViewtext::TextViewTextView::markdown(id, text), HTML too
Imagegpui_kit::{img, ImageSource, ObjectFit}GPUI's img() element

Overlay & Popups

ComponentImportNotes
Dialogdialog::Dialog + WindowExtVia window.open_dialog(...)
AlertDialogWindowExtVia window.open_alert_dialog(...)
Sheetsheet::Sheet + WindowExtSide panel, via window.open_sheet(...)
Notificationnotification::Notification + WindowExtVia window.push_notification(...)
Popoverpopover::PopoverFloating overlay
Menumenu::{PopupMenu, DropdownMenu}Context menus
DropdownButtonbutton::DropdownButtonButton with dropdown menu
Commandcommand::{Command, CommandState, CommandGroup}Stateful. Command palette
Focus trapFocusTrapElement.focus_trap(id, &handle) on a container; Dialog and Sheet have it built in

Navigation & Layout

ComponentImportNotes
Tabs / TabBartab::{Tab, TabBar}Tabbed interface
Sidebarsidebar::{Sidebar, SidebarMenu, ...}App navigation panel
TitleBarTitleBarWindow title bar
StatusBarstatus_bar::StatusBarWindow status bar
Breadcrumbbreadcrumb::BreadcrumbNavigation breadcrumb
Paginationpagination::PaginationPage navigation
Accordionaccordion::AccordionCollapsible sections
Collapsiblecollapsible::CollapsibleSingle collapsible
GroupBoxgroup_box::GroupBoxLabeled container
Resizableresizable::{h_resizable, v_resizable, resizable_panel, ResizableState}Draggable split panes
Scrollbarscroll::ScrollbarCustom scrollbar

Data Display

ComponentImportNotes
DataTabletable::{DataTable, TableState, TableDelegate}Stateful. Full-featured table
Tabletable::{Table, ...}Simpler table
VirtualList{v_virtual_list, h_virtual_list}High-perf large lists
Listlist::{List, ListState, ListDelegate}Stateful. Searchable list
Treetree::{Tree, TreeState, TreeItem, TreeEntry}Stateful. Hierarchy
DescriptionListdescription_list::DescriptionListKey-value pairs
Settingssetting::SettingsSettings panel

Chat & Messaging

ComponentImportNotes
Messagemessage::{Message, MessageContent, MessageAlignment}Stateless. Chat message row
Bubblebubble::{Bubble, BubbleContent, BubbleVariant}Stateless. Message bubble
Attachmentattachment::{Attachment, AttachmentContent, ...}Stateless. File/media attachment card
MessageScrollermessage_scroller::{MessageScroller, MessageScrollerState}Stateful. Auto-scrolling message list

Charts

ComponentImportNotes
Chartchart::{AreaChart, BarChart, LineChart, PieChart, RadarChart}Bar, line, area, pie charts
Plotplot::Plot#[derive(IntoPlot)] for data

Testing

UI integration testing means rendering real components in headless windows, simulating input, and checking state, focus, layout and owner callbacks. Use #[gpui_kit::test] to run tests and gpui_kit::test to operate and inspect the UI. When asked to add component interaction coverage, describe it as UI integration testing.

For unit tests, GPUI context tests or UI integration tests, read Testing. It includes dependency setup, a complete runnable UI flow, scoped native interactions, frame/async handling and the limits of accessibility and geometry assertions. Use the production view and verify the action's outcome through normal Rust assertions.

GPUI References

Load the file for the mechanism the task touches. Each file starts with a contents line.

TopicFileLoad when
Actions & keybindingsaction.mdactions!, bind_keys, on_action, key_context
Async & background tasksasync.mdcx.spawn, background_spawn, Task, async I/O
Context managementcontext.mdApp, Window, Context<T>, AsyncApp
Custom elements (low-level)element.mdElement trait, request_layout, prepaint, paint
Entity stateentity.mdEntity<T>, WeakEntity, state management
Events & subscriptionsevent.mdcx.emit, cx.subscribe, cx.observe
Focus & keyboard navfocus-handle.mdFocusHandle, track_focus, Tab navigation
Global stateglobal.mdGlobal trait, cx.set_global, app-wide config
Layout & stylinglayout-style.mddiv(), h_flex(), v_flex(), flexbox, overflow, positioning
ElementIdelement-id.mdElementId, .id(), uniqueness rules, stateful elements
Testingtest.md#[gpui_kit::test], TestAppContext, VisualTestContext

Deep dives, for when the topic file is not enough:

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Gpui Kit AI skill do?

How to build desktop applications with GPUI Kit, the Rust framework published as the gpui-kit crate (GPUI plus gpui_kit::component, gpui_kit::base, gpui_kit::assets). Use when setting up a gpui-kit app, choosing or using a component (Button, Input, Select, Dialog, Sheet, Tabs, Sidebar, List, DataTable, Tree, Chart, etc.), handling component state, theming, or window overlays, and for GPUI mechanics: actions and keybindings, async tasks, contexts, custom elements, entities, events, focus, global state, layout and styling, ElementId, and tests including UI integration testing. Holds the norma...

Why use Gpui Kit on TypingMind?

Because you install it once and use it with any model. Gpui Kit is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Gpui Kit in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/longbridge/gpui-kit/tree/main/skills/gpui-kit. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Gpui Kit?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Gpui Kit?

As many as you like. As long as a model supports skills, you can use Gpui Kit with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Gpui Kit AI skill free?

It is published on GitHub by longbridge. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇