sst/opentui
OpenTUI
OpenTUI is a TypeScript library for building terminal user interfaces (TUIs). It is currently in development and is not ready for production use. It will be the foundational TUI framework for both opencode and terminaldotshop.
Quick start with bun and create-tui:
|
|
This monorepo contains the following packages:
@opentui/core- The core library works completely standalone, providing an imperative API and all the primitives.@opentui/solid- The SolidJS reconciler for OpenTUI.@opentui/react- The React reconciler for OpenTUI.@opentui/vue- The Vue reconciler (unmaintained)@opentui/go- Go bindings (unmaintained)
Install
NOTE: You must have Zig installed on your system to build the packages.
TypeScript/JavaScript
|
|
Running Examples (from the repo root)
TypeScript Examples
|
|
Development
Local Development Linking
When developing OpenTUI, you may want to test your changes in another project without publishing. The link-opentui-dev.sh script makes this easy by creating symlinks (or copies) from your OpenTUI workspace to another project’s node_modules.
Basic usage:
|
|
This will link @opentui/core to your target project.
Options:
--react- Also link@opentui/react--solid- Also link@opentui/solidandsolid-js--dist- Link the builtdistdirectories instead of source packages--copy- Copy the dist directories instead of symlinking (requires--dist)
Examples:
|
|
Notes:
- The target project must have already run
bun install(ornpm install) to have anode_modulesdirectory - By default, the script links to the source packages, allowing hot-reloading of changes
- Use
--distwhen you need to test the built artifacts - Use
--copymode when working in environments that don’t support symlinks well (e.g., Docker containers, Windows)
Showcase
Consider showcasing your work on the awesome-opentui list. A curated list of awesome resources and terminal user interfaces built with OpenTUI.