Skip to content
Skillpedia
Websites & UI (frontend)71k Β· #3107

opentui

What it does

This skill covers building terminal user interfaces with the OpenTUI framework, in plain code or with React or Solid. It is for developers making full-screen apps that run in a terminal.

When to use it

  • βœ“When someone wants to build a terminal app with a visual layout.
  • βœ“When a terminal interface needs keyboard handling, components or animations.
  • βœ“When a terminal interface has a bug that needs troubleshooting.

Skill link

https://github.com/cline/cline/blob/main/.agents/skills/opentui/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/cline/cline/blob/main/.agents/skills/opentui/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute β†’

Example of what to ask your AI

β€œI want to build a terminal dashboard with boxes and keyboard shortcuts. How do I start with OpenTUI?”

5 new skills a week. 1 minute to read.

How it works

The agent reads the right framework guide and follows its setup, component and layout rules. It also checks common pitfalls, such as exiting the app safely.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

OpenTUI Platform Skill

Consolidated skill for building terminal user interfaces with OpenTUI. Use decision trees below to find the right framework and components, then load detailed references.

Critical Rules

Follow these rules in all OpenTUI code:

  1. Use create-tui for new projects. See framework REFERENCE.md quick starts.
  2. create-tui options must come before arguments. bunx create-tui -t react my-app works, bunx create-tui my-app -t react does NOT.
  3. Never call process.exit() directly. Use renderer.destroy() (see core/gotchas.md).
  4. Text styling requires nested tags in React/Solid. Use modifier elements, not props (see components/text-display.md).

How to Use This Skill

Reference File Structure

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.

Reading Order

  1. Start with REFERENCE.md for your chosen framework
  2. Then read additional files relevant to your task:
    • Building components -> api.md + components/<category>.md
    • Setting up project -> configuration.md
    • Layout/positioning -> layout/REFERENCE.md
    • Keyboard/input handling -> keyboard/REFERENCE.md
    • Animations -> animation/REFERENCE.md
    • Troubleshooting -> gotchas.md + testing/REFERENCE.md

Example Paths

./references/react/REFERENCE.md           # Start here for React
./references/react/api.md              # React components and hooks
./references/solid/configuration.md    # Solid project setup
./references/components/inputs.md      # Input, Textarea, Select docs
./references/core/gotchas.md           # Core debugging tips

Runtime Notes

OpenTUI runs on Bun and uses Zig for native builds. Read ./references/core/gotchas.md for runtime requirements and build guidance.

Quick Decision Trees

"Which framework should I use?"

Which framework?
β”œβ”€ I want full control, maximum performance, no framework overhead
β”‚  └─ core/ (imperative API)
β”œβ”€ I know React, want familiar component patterns
β”‚  └─ react/ (React reconciler)
β”œβ”€ I want fine-grained reactivity, optimal re-renders
β”‚  └─ solid/ (Solid reconciler)
└─ I'm building a library/framework on top of OpenTUI
   └─ core/ (imperative API)

"I need to display content"

Display content?
β”œβ”€ Plain or styled text -> components/text-display.md
β”œβ”€ Container with borders/background -> components/containers.md
β”œβ”€ Scrollable content area -> components/containers.md (scrollbox)
β”œβ”€ ASCII art banner/title -> components/text-display.md (ascii-font)
β”œβ”€ Data table with borders/wrapping -> components/code-diff.md (TextTable)
β”œβ”€ Code with syntax highlighting -> components/code-diff.md
β”œβ”€ Diff viewer (unified/split) -> components/code-diff.md
β”œβ”€ Line numbers with diagnostics -> components/code-diff.md
└─ Markdown content (streaming) -> components/code-diff.md (markdown)

"I need user input"

User input?
β”œβ”€ Single-line text field -> components/inputs.md (input)
β”œβ”€ Multi-line text editor -> components/inputs.md (textarea)
β”œβ”€ Select from a list (vertical) -> components/inputs.md (select)
β”œβ”€ Tab-based selection (horizontal) -> components/inputs.md (tab-select)
└─ Custom keyboard shortcuts -> keyboard/REFERENCE.md

"I need layout/positioning"

Layout?
β”œβ”€ Flexbox-style layouts (row, column, wrap) -> layout/REFERENCE.md
β”œβ”€ Absolute positioning -> layout/patterns.md
β”œβ”€ Responsive to terminal size -> layout/patterns.md
β”œβ”€ Centering content -> layout/patterns.md
└─ Complex nested layouts -> layout/patterns.md

"I need animations"

Animations?
β”œβ”€ Timeline-based animations -> animation/REFERENCE.md
β”œβ”€ Easing functions -> animation/REFERENCE.md
β”œβ”€ Property transitions -> animation/REFERENCE.md
└─ Looping animations -> animation/REFERENCE.md

"I need to handle input"

Input handling?
β”œβ”€ Keyboard events (keypress, release) -> keyboard/REFERENCE.md
β”œβ”€ 
FAQ

Which frameworks does it cover?

The skill covers the core imperative API, the React reconciler and the Solid reconciler.

How do I start a new project?

The skill recommends the create-tui tool, with its options placed before the project name.

Can I exit the app with process.exit?

The skill says not to call process.exit directly, and to use renderer.destroy instead.

Details

Original description by the author

Comprehensive OpenTUI skill for building terminal user interfaces. Covers the core imperative API, React reconciler, and Solid reconciler. Use for any TUI development task including components, layout, keyboard handling, animations, and testing.

repo: cline/cline

Popularity

GitHub stars
71k
Ranking position
#3107
License
Apache-2.0
Updated
11/2/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills