Getting started

OpenTUI is a native terminal UI core written in Zig with TypeScript bindings.

It renders a component tree, lays it out with Flexbox, handles terminal input, and updates the cells that changed. OpenTUI’s TypeScript packages call the native Zig library through an internal ABI. OpenTUI powers OpenCode in production.

Start with the quickstart#

Build your first app in the quickstart. You will create a project from an empty directory, compose a small interface, handle keyboard input, and run it in your terminal.

The quickstart uses @opentui/core directly to teach the renderer, component tree, input, and layout model once. You do not need to choose a framework before you complete it.

Check Runtime and platform support before you use Node.js, cross-compile, or deploy to another target.

Choose a framework#

If you use Core, read Renderables after the quickstart.

Find a topic#

Explore the examples#

Run the OpenTUI example browser without cloning the repository. Release executables support macOS x64 and arm64, Linux x64, and Windows x64. On those targets, including x64 WSL and Git Bash:

curl -fsSL https://raw.githubusercontent.com/anomalyco/opentui/main/packages/examples/install.sh | sh

On Windows, download the latest release from GitHub Releases.

Give an agent the docs#

OpenTUI includes a skill that teaches AI coding assistants its APIs and patterns. Install it with npx skills:

npx skills add anomalyco/opentui --skill opentui

Add -g to install the skill globally for every project. OpenCode uses the same install command.