Skip to main content
Get up and running with OpenTUI by building a simple “Hello World” terminal application. This guide walks you through installation, basic setup, and creating your first interactive TUI.
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

1

Install OpenTUI

Install the core package using your preferred package manager:
2

Create a basic app

Create a new file called app.ts with your first terminal UI:
This creates a simple terminal UI that displays cyan-colored text.
3

Run your app

Execute your application with Bun:
You should see “Hello, OpenTUI!” displayed in cyan in your terminal!
4

Add interactivity

Let’s make it interactive by adding keyboard handling:
Now your app responds to keyboard input!
5

Add layout and styling

Create a more complex layout with multiple components:
This creates a styled header and an input field with focus management.

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:

Resources