npx skills add ...
npx skills add msmps/opentui-skill --skill opentui
OpenTUI skill for building terminal user interfaces with the Core, React, or Solid APIs. Use for any TUI task including components, layout, keyboard and keymap handling, animations, and testing.
npx skills add msmps/opentui-skill --skill opentui
Consolidated skill for building terminal user interfaces with OpenTUI. Use decision trees below to find the right framework and components, then load detailed references.
Follow these rules in all OpenTUI code:
create-tui for new projects. See framework REFERENCE.md quick starts.create-tui options must come before arguments. bunx create-tui -t react my-app works, bunx create-tui my-app -t react does NOT.process.exit() directly. Use renderer.destroy() (see core/gotchas.md).components/text-display.md).Framework references follow a 5-file pattern. Cross-cutting concepts are single-file guides.
Each framework in ./references/<framework>/ contains:
| File | Purpose | When to Read |
|---|---|---|
REFERENCE.md | Overview, when to use, quick start | Always read first |
api.md | Runtime API, components, hooks | Writing code |
configuration.md | Setup, tsconfig, bundling | Configuring a project |
patterns.md | Common patterns, best practices | Implementation guidance |
gotchas.md | Pitfalls, limitations, debugging | Troubleshooting |
Cross-cutting concepts in ./references/<concept>/ have REFERENCE.md as the entry point.
REFERENCE.md for your chosen frameworkapi.md + components/<category>.mdconfiguration.mdlayout/REFERENCE.mdkeyboard/REFERENCE.mdkeymap/REFERENCE.mdanimation/REFERENCE.mdgotchas.md + testing/REFERENCE.mdOpenTUI runs on Bun and uses Zig for native builds. Read ./references/core/gotchas.md for runtime requirements and build guidance.
core/gotchas.mdcomponents/text-display.mdkeyboard/REFERENCE.mdlayout/REFERENCE.mdtesting/REFERENCE.mdFor component naming differences and text modifiers, see components/REFERENCE.md.
| Framework | Entry File | Description |
|---|---|---|
| Core | ./references/core/REFERENCE.md | Imperative API, all primitives |
| React | ./references/react/REFERENCE.md | React reconciler for declarative TUI |
| Solid | ./references/solid/REFERENCE.md | SolidJS reconciler for declarative TUI |
| Concept | Entry File | Description |
|---|---|---|
| Layout | ./references/layout/REFERENCE.md | Yoga/Flexbox layout system |
| Components | ./references/components/REFERENCE.md | Component reference by category |
| Keyboard | ./references/keyboard/REFERENCE.md | Low-level keyboard input handling |
| Keymap | ./references/keymap/REFERENCE.md | Declarative layered keybindings (@opentui/keymap) |
| Animation | ./references/animation/REFERENCE.md | Timeline-based animations |
| Testing | ./references/testing/REFERENCE.md | Test renderer and snapshots |
| Category | Entry File | Components |
|---|---|---|
| Text & Display | ./references/components/text-display.md | text, ascii-font, image, time-to-first-draw, styled text, qr-code |
| Containers | ./references/components/containers.md | box, scrollbox, scrollbar, embedded-terminal, borders |
| Inputs | ./references/components/inputs.md | input, textarea, select, tab-select, slider |
| Code & Diff | ./references/components/code-diff.md | code, line-number, diff, markdown, text-table |
| Package | Description | Docs |
|---|---|---|
@opentui/keymap | Layered keybinding/command engine (Bun or Node, no FFI) | ./references/keymap/REFERENCE.md |
@opentui/qrcode | QR code component | ./references/components/text-display.md |
@opentui/ssh | Serve a TUI over SSH | ./references/core/REFERENCE.md |
@opentui/three | Three.js WebGPU renderer (formerly core/src/3d) | upstream packages/three |
@opentui/examples | Runnable examples (formerly core/src/examples) | upstream packages/examples |
Core also ships loaded/streaming/captured Audio, native images, host and terminal clipboard services, and OSC desktop notifications.
Repository: https://github.com/anomalyco/opentui Core Docs: https://github.com/anomalyco/opentui/tree/main/packages/core/docs Examples: https://github.com/anomalyco/opentui/tree/main/packages/examples/src Awesome List: https://github.com/msmps/awesome-opentui