If you haven’t installed OpenTUI yet, check out the installation guide first.
Prerequisites
- Bun 1.3.0 or later (recommended) or Node.js 18+
- Zig 0.15.2 (required for building from source)
Create your first app
Create a basic app
Create a new file called This creates a simple terminal UI that displays cyan-colored text.
app.ts with your first terminal UI:Run your app
Execute your application with Bun:You should see “Hello, OpenTUI!” displayed in cyan in your terminal!
Add interactivity
Let’s make it interactive by adding keyboard handling:Now your app responds to keyboard input!
Next steps
Now that you’ve built your first OpenTUI app, explore more features:Core concepts
Learn about renderers, renderables, and the component system
Components
Explore all available UI components
Styling guide
Master colors, text attributes, and styling
Build your first app
Follow a complete tutorial to build a real application
Quick examples
Try these standalone examples to see more features:- Text styling
- Flexbox layout
- Interactive list