No description
  • TypeScript 100%
Find a file
2026-05-12 01:41:18 -04:00
.ai-chats Sync: bulk checkpoint 2026-05-12 (pre-Arch-reformat) 2026-05-12 01:41:18 -04:00
.cc-iterations Sync: bulk checkpoint 2026-05-12 (pre-Arch-reformat) 2026-05-12 01:41:18 -04:00
.perpetual-motion Sync: bulk checkpoint 2026-05-12 (pre-Arch-reformat) 2026-05-12 01:41:18 -04:00
ai-chats feat: Initialize TUI Playground with OpenTUI and SolidJS 2025-12-08 21:17:00 -05:00
docs Sync: bulk checkpoint 2026-05-12 (pre-Arch-reformat) 2026-05-12 01:41:18 -04:00
src feat: Initialize TUI Playground with OpenTUI and SolidJS 2025-12-08 21:17:00 -05:00
.gitignore feat: Initialize TUI Playground with OpenTUI and SolidJS 2025-12-08 21:17:00 -05:00
DECISIONS.md feat: Initialize TUI Playground with OpenTUI and SolidJS 2025-12-08 21:17:00 -05:00
package-lock.json feat: Initialize TUI Playground with OpenTUI and SolidJS 2025-12-08 21:17:00 -05:00
package.json feat: Initialize TUI Playground with OpenTUI and SolidJS 2025-12-08 21:17:00 -05:00
README.md feat: Initialize TUI Playground with OpenTUI and SolidJS 2025-12-08 21:17:00 -05:00
tsconfig.json feat: Initialize TUI Playground with OpenTUI and SolidJS 2025-12-08 21:17:00 -05:00

OpenTUI Playground

A playground project for experimenting with OpenTUI - a TypeScript library for building terminal user interfaces.

Prerequisites

Zig Installation Required

OpenTUI requires Zig to be installed on your system.

Windows Installation Instructions:

  1. Download Zig from the official website: https://ziglang.org/download/
  2. Choose the Windows x86_64 binary (latest stable or master)
  3. Extract the archive to a location (e.g., C:\zig)
  4. Add Zig to your PATH:
    • Open System Properties > Environment Variables
    • Edit the Path variable under System Variables
    • Add the path to your Zig folder (e.g., C:\zig)
    • Click OK to save
  5. Verify installation by opening a new terminal and running:
    zig version
    

Alternatively, you can use package managers:

Using Chocolatey:

choco install zig

Using Scoop:

scoop install zig

Node.js

Node.js 24.11.1 is installed and ready.

Installation

After installing Zig, install project dependencies:

npm install

Running the Examples

Basic Core Example

npm run dev

This runs src/index.ts which uses @opentui/core directly.

React Example

npx tsx src/react-example.tsx

This demonstrates using OpenTUI with React components.

Project Structure

tui-playground/
├── src/
│   ├── index.ts          # Basic OpenTUI core example
│   └── react-example.tsx # React-based TUI example
├── package.json
├── tsconfig.json
└── README.md

Installed Packages

  • @opentui/core@^0.1.59 - Core OpenTUI library
  • @opentui/react@^0.1.59 - React reconciler for OpenTUI
  • typescript - TypeScript compiler
  • tsx - TypeScript execution engine
  • @types/node - Node.js type definitions
  • @types/react - React type definitions

Features

OpenTUI provides:

  • Terminal capabilities detection
  • Unicode and emoji support
  • Syntax highlighting
  • Mouse and keyboard input handling
  • Flexbox layout via Yoga
  • 2D and optional 3D graphics
  • React, SolidJS, and Vue support

Resources

Notes

  • OpenTUI is currently in development and not ready for production use
  • The library combines TypeScript with performance-critical Zig native code
  • Both imperative (core) and declarative (React/Solid/Vue) APIs are available