JSPM

@opentui/core

0.1.65
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 104678
  • Score
    100M100P100Q156815F
  • License MIT

OpenTUI is a TypeScript library for building terminal user interfaces (TUIs)

Package Exports

  • @opentui/core
  • @opentui/core/3d
  • @opentui/core/parser.worker
  • @opentui/core/testing

Readme

OpenTUI Core

OpenTUI Core is a TypeScript library for building terminal user interfaces (TUIs). It is currently in development and is not ready for production use.

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
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.

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)