@3akhp/opentui-core
v0.5.3-zv6
Published
OpenTUI is a TypeScript library on a native Zig core for building terminal user interfaces (TUIs)
Readme
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/coreBuild
bun run buildThis creates platform-specific libraries that are automatically loaded by the TypeScript layer.
Examples
bun install
cd ../examples
bun run devBenchmarks
Run native performance benchmarks:
bun run bench:nativeSee 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)Vesicle fork provenance
This package is the Prism Vesicle patch-queue fork of anomalyco/opentui,
published under the @3akhp/opentui-core scope. Lineage for 0.5.3-zv6:
- upstream base: tag
v0.5.3 - fork patch commits on top of the base:
- 3acf6579 fork(ci): make release runs land on a clean tree and a provenance-capable npm
- ec4ac002 fork(release): accept release-tag checkouts in release-context guards
- 0b05471c fork(release): full-scope solid rewriter and OIDC publish mode
- 4e5d17ec feat(core): propagate markdown selection colors to prose, markers, and code
- dd655a3f fix(core): keep fork platform packages external in the bundled runtime
- f45bf36b fork(ci): OIDC release workflow for scoped fork packages (Trusted Publishing)
- e8ca661a fork(release): report the actual core pin in solid prepare output
- 80518ce4 fork(release): rewrite solid subpath core imports and assert zero leftovers
- 583fb54d fork(release): treat registry overwrite refusal as already-published resume
- 0a34b04b fork(release): retry dependency verification while new packages propagate
- 6f7f70ac fork(release): fork-built native platform packages for six non-darwin variants
- bc6d76d1 fork(release): retry post-publish registry reads while metadata propagates
- e5695602 fork(release): fix mkdtempSync import (node:fs, not node:os)
- 373934f2 fork(release): scoped-package publish pipeline for @3akhp/opentui-core
- 8b86e375 feat(core): expose selection colors on markdown and text table renderables
- f1c5d3e5 test(core): align emoji vertical-nav expectation with grapheme-boundary snap
- 3950ee68 fix(core/editor-view): snap visual cursor columns to grapheme boundaries
- c9321e29 fix(core/text-buffer-view): fill partially wrapped lines across chunk boundaries
- 92043ace fix(core/tree-sitter): render markdown backslash escapes as the escaped character
Fork policy: VESICLE_FORK.md.
The upstream MIT license and attribution are preserved unchanged.
