Installation
OpenTUI is available as an npm package and can be installed with any JavaScript package manager. This guide covers installation, system requirements, and verification steps.System requirements
Before installing OpenTUI, ensure you have the following prerequisites:Required
- Zig compiler - OpenTUI requires Zig to build the native core
- Bun 1.3.0+ (recommended), Node.js 18+, or another JavaScript runtime
You must have Zig installed on your system to build OpenTUI packages. Visit the Zig installation guide for platform-specific instructions.
Supported platforms
OpenTUI provides pre-built binaries for:- macOS (x64, ARM64)
- Linux (x64, ARM64)
- Windows (x64, ARM64)
Install OpenTUI
Choose your preferred package manager to install the core OpenTUI package:Framework packages
OpenTUI provides framework-specific packages for React and SolidJS:Framework packages automatically include
@opentui/core as a dependency.Verify installation
Create a simple test file to verify your installation:test.ts
Ctrl+C to exit.
Quick start with create-tui
The fastest way to get started is using the create-tui scaffolding tool:- Prompt you for project configuration
- Set up a new OpenTUI project with best practices
- Install dependencies automatically
- Provide example code to get started
Try examples without installation
You can explore OpenTUI examples without cloning the repository:Troubleshooting
Zig not found
If you see an error about Zig not being found:- Install Zig from ziglang.org/learn/getting-started/
- Ensure
zigis in your PATH - Verify installation:
zig version
Build errors
If you encounter build errors:- Ensure you have the latest version of Zig
- Clear your package manager cache
- Try reinstalling dependencies
Platform-specific binaries
OpenTUI automatically downloads platform-specific binaries. If you’re on an unsupported platform, you may need to build from source. See the Development Guide for instructions.Next steps
Quickstart tutorial
Build your first TUI application
Core concepts
Learn about renderers, renderables, and layouts