Логотип Gpui Kit

Gpui Kit

ОрганізаціяПопулярне
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.

Огляд

Видавецьlongbridge
Репозиторійgpui-kit
Назва навичкиgpui-kit
Зірки
14.5K
Форки
891
Файли в пакеті
26
Посилання
  • Інструкції у форматі Markdown

    Файл SKILL.md, який модель завантажує за потреби, тож токени витрачаються лише тоді, коли запит справді відповідає навичці.

  • Працює з будь-якою LLM

    Навички ШІ — це звичайний Markdown, а не код для певного постачальника, тому вони працюють із GPT, Claude, Gemini, Grok або локальною моделлю.

  • Файлів у комплекті: 26

    Скрипти, шаблони й довідкові матеріали, які модель може читати під час роботи. Файли доступні лише для читання й ніколи не виконуються.

  • Відкритий вихідний код

    Опубліковано на GitHub користувачем longbridge. Перегляньте вихідний вміст перед установленням.

Встановлення

Установіть навичку ШІ Gpui Kit у TypingMind, щоб використовувати її з будь-якою LLM, або додайте її до іншого агента, що читає SKILL.md.

1

Встановити в TypingMind

TypingMind встановлює навичку безпосередньо з її папки GitHub — читає SKILL.md, збирає файли ресурсів у пакет і зберігає результат локально.

  1. Відкрийте застосунок і перейдіть до Плагіни → Навички.
  2. Виберіть «Встановити з GitHub».
  3. Вставте наведений нижче URL папки навички та підтвердьте встановлення.
    https://github.com/longbridge/gpui-kit/tree/main/skills/gpui-kit
  4. Увімкніть навичку в кожному чаті, де хочете її використовувати.
Плагіни → Навички → Нова навичка → За URL GitHub, потім вставте URL папки й натисніть «Продовжити».
2

Встановити в іншому агенті

Будь-який агент, що підтримує формат Agent Skills, може використовувати цю навичку — скопіюйте папку до каталогу навичок цього агента.

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
Після копіювання перезапустіть Claude Code, щоб завантажити нову навичку.

Використовуйте навичку в TypingMind

Увімкніть навичку Gpui Kit в будь-якому чаті TypingMind, і далі модель усе зробить сама. Назва й опис навички містяться в системному промпті, а щойно надходить відповідний запит, модель самостійно завантажує повні інструкції — вам не потрібно викликати навичку вручну, і до фактичного використання вона не витрачає токенів.

Модель самостійно завантажує навичку Gpui Kit, щойно надходить відповідний запит.

Працює з будь-якою моделлю ШІ

Навички ШІ — це звичайні інструкції Markdown, а не код для певного постачальника, тому навичка Gpui Kit не прив’язана до моделі, для якої її створено. Установіть її один раз у TypingMind і використовуйте з GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama або локальною моделлю, яку ви запускаєте самостійно, — усе з вашими власними ключами API.

  • Завантажується лише за потреби

    Системний промпт містить лише назву й опис. Інструкції завантажуються за першого відповідного запиту, тож невикористана навичка нічого не коштує.

  • Змінюйте моделі під час чату

    Оскільки навичка — це інструкції, а не код, зміна моделі не порушує її роботу: наступна модель читає той самий файл SKILL.md.

Інструкції навички

Це вміст файлу SKILL.md, який завантажує модель. Прочитайте його перед установленням — навичка містить інструкції, яких дотримуватиметься ваша модель.

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:

Файли в пакеті

Модель читає ці файли за потреби, поки навичку завантажено. Вони доступні для читання й ніколи не виконуються.

Поширені запитання

Що робить навичка ШІ 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 norma...

Навіщо використовувати Gpui Kit у TypingMind?

Тому що ви встановлюєте її один раз і використовуєте з будь-якою моделлю. Gpui Kit — це звичайний Markdown, а не код для конкретного постачальника, тому та сама навичка працює з GPT-5, Claude, Gemini, Grok або локальною моделлю. Ви можете змінити модель навіть посеред чату, і навичка продовжить працювати. TypingMind використовує ваші власні ключі API, тож ви платите безпосередньо постачальникам замість передплати за кожне місце користувача, а ваші навички й чати залишаються у вашому сховищі.

Як встановити Gpui Kit у TypingMind?

Відкрийте в TypingMind Плагіни → Навички → Встановити з GitHub і вставте https://github.com/longbridge/gpui-kit/tree/main/skills/gpui-kit. TypingMind прочитає файл SKILL.md, додасть супровідні файли та встановить навичку, яку можна вмикати окремо для кожного чату.

Які моделі ШІ можуть використовувати Gpui Kit?

Будь-яка модель, яку ви підключите в TypingMind. Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для конкретного постачальника, тому GPT, Claude, Gemini, Grok і локальні моделі можуть завантажувати цю навичку, коли запит їй відповідає.

Зі скількома моделями ШІ можна використовувати Gpui Kit?

Зі скількома забажаєте. Якщо модель підтримує навички, ви можете використовувати з нею Gpui Kit — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama та інші — усе в TypingMind із власними ключами API.

Чи безкоштовна навичка ШІ Gpui Kit?

Навичку опубліковано на GitHub: longbridge. Умови ліцензування дивіться в репозиторії. Ви платите лише своєму постачальнику ШІ за використані токени.

Що таке навички ШІ?

Навичка ШІ — це багаторазовий набір інструкцій, який навчає модель ШІ виконувати одне конкретне завдання. Він відповідає відкритому формату Agent Skills: файл SKILL.md із назвою та описом, а також скрипти, шаблони чи довідкові файли, які можуть знадобитися моделі. Модель читає інструкції лише тоді, коли ваш запит відповідає навичці, тому встановлена навичка нічого не коштує, доки її не використано.

Чим навички ШІ відрізняються від плагінів або серверів MCP?

Плагін або сервер MCP надає моделі нові інструменти для виклику — код, який десь виконується й повертає результат. Натомість навичка ШІ надає моделі знання та порядок дій: як підійти до завдання, яких кроків дотримуватися та яким має бути якісний результат. Навички — це звичайний Markdown, тож їм не потрібні ні сервер, ні ключ API, ні середовище виконання, і вони працюють із будь-якою моделлю.

Усі

Створіть власний ШІ-простір уже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇