Skip to content

Latest commit

 

History

History
131 lines (95 loc) · 4.93 KB

File metadata and controls

131 lines (95 loc) · 4.93 KB

Rezi

Status: pre-alpha. Rezi is under active development. Public APIs, native ABI details, and behavior may change between releases. It is not yet recommended for production workloads.

Rezi is a TypeScript framework for building serious terminal applications on Node.js and Bun. It gives you structured layout, focus and input handling, routing, widgets, testing tools, and a native-backed rendering pipeline powered by the Zireael engine written in C.

Links: Website · Docs · Quickstart · Widgets · Benchmarks

Rezi command console demo

What Rezi Is For

Rezi is aimed at dashboards, control planes, internal tools, log viewers, and developer workflows that need more than line-oriented output: multi-panel layouts, routed screens, focusable controls, forms, tables, overlays, testing support, and predictable behavior under keyboard and mouse input.

Why Rezi

  • Structured app model for real TUI workflows
  • Declarative widget API without requiring React
  • Native-backed framebuffer diffing and terminal output through Zireael
  • First-party widgets for forms, tables, overlays, routing, charts, and command flows
  • Reproducible rendering and input contracts for behavior-first tests

What Rezi Includes

  • Layout primitives for rows, columns, grids, panels, spacing, and layered screens
  • Interactive widgets such as buttons, inputs, selects, checkboxes, radios, sliders, tabs, tables, virtual lists, trees, dialogs, dropdowns, and toasts
  • Graphics and data-display widgets including canvas, charts, gauges, sparklines, heatmaps, and image support
  • Application primitives for focus management, keybindings, routing, theming, and controlled state updates
  • Testing utilities for render assertions, routing and focus behavior, and replayable input workflows
  • A native-backed rendering path through Zireael for layout, framebuffer diffing, and terminal output

Example

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,
    gap: 1,
    header: ui.header({ title: "Counter" }),
    body: ui.panel("Count", [
      ui.row({ gap: 1, items: "center" }, [
        ui.text(String(state.count), { variant: "heading" }),
        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();

Install:

npm install @rezi-ui/core @rezi-ui/node

Quick Start

npm create rezi my-app
cd my-app
npm run start

With Bun:

bun create rezi my-app
cd my-app
bun run start

Public Templates

  • minimal - small single-screen starter for focused utilities
  • cli-tool - routed multi-screen starter for product-style terminal tools
  • starship - larger command-console showcase with routing, charts, canvas, forms, and overlays

Starship Demo

Use the template when you want a larger example of Rezi's app architecture:

npm create rezi my-console -- --template starship

The demo intentionally shows the broad surface area. For new applications, start with minimal or cli-tool unless you specifically want the full showcase.

Feature Maturity

Rezi is still pre-alpha, but not every feature has the same risk profile. Core layout, input, routing, tables, virtual lists, command palette, and file-picker workflows are the current hardening focus. Richer surfaces such as advanced graphics, charts, code/editor-style widgets, and specialized dialogs should be treated as beta or experimental while the public API settles.

Packages

Package Purpose
@rezi-ui/core Widget API, layout, routing, focus, forms, themes, testing hooks
@rezi-ui/node Node/Bun backend, terminal I/O, scheduling, native integration
@rezi-ui/native N-API binding to the Zireael engine
@rezi-ui/jsx Optional JSX runtime over the core API
@rezi-ui/testkit Testing utilities
create-rezi Project scaffolding CLI

Performance

Rezi is designed to stay fast on structured terminal workloads. Benchmark methodology, caveats, and committed result snapshots are documented in BENCHMARKS.md and docs/benchmarks.md.

Documentation