pre-alpha · active development

TypeScript TUI.
Native-backed and deterministic.

Rezi is a framework for building terminal interfaces on Node.js and Bun. It provides a declarative widget API, structured layouts, focusable controls, tables, overlays, charts, and a native-backed rendering pipeline through Zireael.

~/my-app

What Rezi Covers

From single-screen tools to multi-panel terminal applications. Rezi includes layout primitives, interactive controls, tables, overlays, graphics, and editor-style widgets in one framework.

canvas.tsx
  ⡠⠔⠊⠉⠉⠉⠉⠊⠒⢄
            
  ⠣⡀        ⢀⠜
    ⠈⠢⣀  ⣀⠔⠁
       ⠈⠒⠊⠁

  
  █ ▲       draw shapes
  █ █ ▲     in braille,
  █ █ █ ▲   sextant,
  ▀ ▀ ▀ ▀   or blocks

Canvas API — draw lines, shapes, and symbols with sub-cell precision

dashboard
  CPU  ▁▂▃▅▇▅▃▂▁▂▃▅▇█▇▅
  MEM  ▂▂▃▃▃▄▄▅▅▅▆▆▆▆▇▇

  Disk ████████████░░░░ 74%
  Mem  ██████████░░░░░░ 61%

  PID   NAME       CPU%
  1024  node       12.4
  1031  zireael     8.1
  1042  postgres    3.7

Data views — tables, sparklines, gauges, bar charts, and heatmaps

editor.ts
1  import { ui } from '@rezi-ui/core';
2
3  app.view((s) =>
4    ui.column({ gap: 1 }, [
5      ui.text('Hello'),
6      ui.text(s.name),
7    ]),
8  );

Editor-style widgets — code editing, diagnostics, search, and related tooling

Two Authoring Styles

Use the functional ui.* API or opt into JSX. Both paths map to the same core widget model and runtime.

Functional API
counter.ts
import { ui } from '@rezi-ui/core';
import { createNodeApp } from '@rezi-ui/node';

type State = { count: number };

const app = createNodeApp<State>({ initialState: { count: 0 } });

app.view((state) =>
  ui.page({
    p: 1,
    body: ui.panel('Counter', [
      ui.row({ gap: 1, items: 'center' }, [
        ui.text(`Count: ${state.count}`),
        ui.spacer({ flex: 1 }),
        ui.button({
          id: 'inc',
          label: '+1',
          intent: 'primary',
          onPress: () => app.update((s) => ({ count: s.count + 1 })),
        }),
      ]),
    ]),
  }),
);

app.keys({ q: () => app.stop() });
await app.run();
JSX — No React Runtime
counter.tsx
/** @jsxImportSource @rezi-ui/jsx */
import { createNodeApp } from '@rezi-ui/node';
import { Button, Page, Panel, Row, Spacer, Text } from '@rezi-ui/jsx';

type State = { count: number };

const app = createNodeApp<State>({ initialState: { count: 0 } });

app.view((state) => (
  <Page
    p={1}
    body={
      <Panel title="Counter">
        <Row gap={1} items="center">
          <Text>Count: {state.count}</Text>
          <Spacer flex={1} />
          <Button
            id="inc"
            label="+1"
            intent="primary"
            onPress={() => app.update((s) => ({ count: s.count + 1 }))}
          />
        </Row>
      </Panel>
    }
  />
));

app.keys({ q: () => app.stop() });
await app.run();

What Rezi Includes

The public surface is focused on building structured terminal applications on Node.js and Bun.

// widgets

Widgets and Layout

Layout primitives, form controls, navigation, overlays, tables, virtual lists, and editor-style widgets.

// engine

Native C Rendering

Zireael handles layout, framebuffer diffing, and terminal output on the native side while your app logic stays in TypeScript.

// syntax

JSX Option

Optional JSX support maps to the same core widget model used by the `ui.*` API, without depending on React.

// themes

Theme System

Semantic themes, scoped overrides, and consistent recipe-based styling for common controls.

// dataviz

Charts and Graphics

Canvas rendering, charts, gauges, sparklines, heatmaps, and image support for richer terminal displays.

// types

App Primitives

Focus management, keybindings, routing, controlled state updates, and a testing surface built for verification.

Quick Start

Start from the public template set and run a local app in a few commands.

terminal
$ npm create rezi my-app -- --template minimal
> Public templates: minimal, cli-tool, starship
$ cd my-app
$ npm run start
Counter
Tab to focus controls
Press q to quit

Performance

Rezi includes a benchmark suite for tracking render-path behavior across representative scenarios. Treat committed results as engineering data, not universal rankings.

Re-render
0.33ms
0.33ms
Table
0.45ms
0.45ms
Virtual List
0.64ms
0.64ms
Strict UI
0.87ms
0.87ms
Full UI
1.14ms
1.14ms
Tree (1000)
1.31ms
1.31ms

Representative Rezi timings from committed benchmark snapshots on one host. Results are directional and host-specific.

See the benchmark documentation for methodology, caveats, and committed snapshots.