No description
- TypeScript 100%
| .ai-chats | ||
| .cc-iterations | ||
| .perpetual-motion | ||
| ai-chats | ||
| docs | ||
| src | ||
| .gitignore | ||
| DECISIONS.md | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
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:
- Download Zig from the official website: https://ziglang.org/download/
- Choose the Windows x86_64 binary (latest stable or master)
- Extract the archive to a location (e.g.,
C:\zig) - Add Zig to your PATH:
- Open System Properties > Environment Variables
- Edit the
Pathvariable under System Variables - Add the path to your Zig folder (e.g.,
C:\zig) - Click OK to save
- 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 OpenTUItypescript- TypeScript compilertsx- 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