Files
anomalyco__opentui/packages/core
Simon Klee e3937cf0dd core: fix portable boolean FFI calls (#1409)
Model native flags as numeric bytes so Bun and Node share one FFI
contract. Keep split-footer commits within Darwin ARM64's eight argument
registers to prevent stack marshalling from losing frame-finalization
state.
2026-08-23 06:56:08 +02:00
..
2026-07-27 23:55:19 +02:00
2026-08-20 23:06:41 +02:00

OpenTUI Core

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 in production today and will also power 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.

Documentation

Install

bun install @opentui/core

Build

bun run build

This creates platform-specific libraries that are automatically loaded by the TypeScript layer.

Examples

bun install
cd ../examples
bun run dev

Benchmarks

Run native performance benchmarks:

bun run bench:native

See the native benchmark runner for options such as --filter and --mem.

NativeSpanFeed TypeScript benchmarks:

CLI Renderer

Renderables

Renderables are hierarchical objects that can be positioned, nested, styled and rendered to the terminal:

import { createCliRenderer, TextRenderable } from "@opentui/core"

const renderer = await createCliRenderer()

const obj = new TextRenderable(renderer, { id: "my-obj", content: "Hello, world!" })

renderer.root.add(obj)