You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@opentui/core

Package Overview
Dependencies
Maintainers
3
Versions
163
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opentui/core

OpenTUI is a TypeScript library on a native Zig core for building terminal user interfaces (TUIs)

Source
npmnpm
Version
0.1.90
Version published
Weekly downloads
139K
-1.84%
Maintainers
3
Weekly downloads
 
Created
Source

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

  • Getting Started - API and usage guide
  • Development Guide - Building, testing, and contributing
  • Tree-Sitter - Syntax highlighting integration
  • Renderables vs Constructs - Understanding the component model
  • Environment Variables - Configuration options

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
bun run src/examples/index.ts

Benchmarks

Run native performance benchmarks:

bun run bench:native

See src/zig/bench.zig for available options like --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)

FAQs

Package last updated on 21 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts