---
slug: "opentui"
source_type: "readme"
source_url: "https://cdn.jsdelivr.net/gh/anomalyco/opentui@main/README.md"
repo: "https://github.com/anomalyco/opentui"
source_file: "README.md"
branch: "main"
---
# OpenTUI

<div align="center">
    <a href="https://www.npmjs.com/package/@opentui/core"><img alt="npm" src="https://img.shields.io/npm/v/@opentui/core?style=flat-square" /></a>
    <a href="https://github.com/anomalyco/opentui/actions/workflows/build-core.yml"><img alt="Build status" src="https://img.shields.io/github/actions/workflow/status/anomalyco/opentui/build-core.yml?style=flat-square&branch=main" /></a>
    <a href="https://github.com/msmps/awesome-opentui"><img alt="awesome opentui list" src="https://awesome.re/badge-flat.svg" /></a>
</div>

OpenTUI is a native terminal UI core written in Zig with TypeScript bindings. The native core exposes a C ABI and can be used from any language. OpenTUI powers [OpenCode](https://opencode.ai) in production today and will also power [terminal.shop](https://terminal.shop). It is an extensible core with a focus on correctness, stability, and high performance. It provides a component-based architecture with flexible layout capabilities, allowing you to create complex terminal applications.

Docs: https://opentui.com/docs/getting-started

Quick start with [bun](https://bun.sh) and [create-tui](https://github.com/msmps/create-tui):

```bash
bun create tui
```

This monorepo contains the following packages:

- [`@opentui/core`](https://github.com/anomalyco/opentui/tree/HEAD/packages/core) - TypeScript bindings for OpenTUI's native Zig core, with an imperative API and all primitives.
- [`@opentui/three`](https://github.com/anomalyco/opentui/tree/HEAD/packages/three) - Three.js WebGPU renderer for OpenTUI.
- [`@opentui/solid`](https://github.com/anomalyco/opentui/tree/HEAD/packages/solid) - The SolidJS reconciler for OpenTUI.
- [`@opentui/react`](https://github.com/anomalyco/opentui/tree/HEAD/packages/react) - The React reconciler for OpenTUI.
- [`@opentui/examples`](https://github.com/anomalyco/opentui/tree/HEAD/packages/examples) - Example browser and standalone examples executable build.

## Install

NOTE: You must have [Zig](https://ziglang.org/learn/getting-started/) installed on your system to build the packages.

### TypeScript/JavaScript

```bash
bun install @opentui/core
```

## AI Agent Skill

Teach your AI coding assistant OpenTUI's APIs and patterns.

**Universal skill install with [`npx skills`](https://skills.sh):**

```bash
npx skills add anomalyco/opentui --skill opentui
```

Install globally for every project:

```bash
npx skills add anomalyco/opentui --skill opentui -g
```

OpenCode uses the same install command. No separate installer is needed.

## Try Examples

You can quickly try out OpenTUI examples without cloning the repository:

**For macOS, Linux, WSL, Git Bash:**

```bash
curl -fsSL https://raw.githubusercontent.com/anomalyco/opentui/main/packages/examples/install.sh | sh
```

**For Windows (PowerShell/CMD):**

Download the latest release directly from [GitHub Releases](https://github.com/anomalyco/opentui/releases/latest)

## Running Examples (from the repo root)

### TypeScript Examples

```bash
bun install
cd packages/examples
bun run dev
```

## Development

See the [Development Guide](https://github.com/anomalyco/opentui/blob/HEAD/packages/core/docs/development.md) for building, testing, debugging, and local development linking.

### Documentation

- [Website docs](https://opentui.com/docs/getting-started) - Guides and API references
- [Development Guide](https://github.com/anomalyco/opentui/blob/HEAD/packages/core/docs/development.md) - Building, testing, and local dev linking
- [Getting Started](https://github.com/anomalyco/opentui/blob/HEAD/packages/core/docs/getting-started.md) - API and usage guide
- [Environment Variables](https://github.com/anomalyco/opentui/blob/HEAD/packages/core/docs/env-vars.md) - Configuration options

## Showcase

Consider showcasing your work on the [awesome-opentui](https://github.com/msmps/awesome-opentui) list. A curated list of awesome resources and terminal user interfaces built with OpenTUI.
