These docs describe the main branch, including unreleased changes. Read the 0.6.0 docs.

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 Zig library through its native interface. OpenTUI powers OpenCode in production.

Start with the quickstart#

Build your first app in the quickstart. In the quickstart, you 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. It holds these docs and the release notes. Install the skill of the latest release with npx skills:

npx skills add https://opentui.com --skill opentui

Add -g to install the skill globally for every project. OpenCode uses the same install command. npx skills update moves the skill to the newest release. For the main branch, install from https://opentui.com/docs/next instead.

A skill installed with npx skills add anomalyco/opentui follows the main branch. Run the command above to switch it to releases.

Versions#

These docs describe one release. The site header names it, and next beside it opens the docs of the main branch, which include unreleased changes. Releases lists what changed in each release, and the API reference names the release that added each export. Above its previous and next links, a page lists its changes in recent releases.