Skip to content

sst/opentui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenTUI

OpenTUI is a TypeScript library for building terminal user interfaces (TUIs). It is currently in development and is not ready for production use. It will be the foundational TUI framework for both opencode and terminaldotshop.

Build

bun build:prod

This creates platform-specific libraries in src/zig/lib/ that are automatically loaded by the TypeScript layer.

Examples

bun run src/examples/index.ts

CLI Renderer

Renderables

Renderables are hierarchical objects that can be positioned and rendered to buffers:

import { Renderable } from "@opentui/core"

class MyRenderable extends Renderable {
  protected renderSelf(buffer: OptimizedBuffer): void {
    buffer.drawText("Custom content", this.x, this.y, RGBA.fromValues(1, 1, 1, 1))
  }
}

const obj = new MyRenderable("my-obj", { x: 10, y: 5, zIndex: 1 })

renderer.root.add(obj)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •