You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> **Status: Alpha** — under active development. APIs may change between releases.
23
34
24
-
Rezi is a TypeScript terminal UI framework for Node.js and Bun. You write declarative widget trees in TypeScript; Rezi computes layout, emits binary drawlists, and delegates framebuffer diffing and terminal output to [Zireael](https://github.com/RtlZeroMemory/Zireael), a purpose-built C rendering engine.
35
+
---
25
36
26
-
The result: TypeScript ergonomics with rendering performance in the same class as native TUIs.
37
+
## Showcase — EdgeOps Control Plane
27
38
28
-
Dashboard demo
39
+
A production-style terminal control console built entirely with Rezi.
29
40
30
-

41
+

42
+
43
+
---
44
+
45
+
## What is Rezi?
46
+
47
+
Rezi is a high-performance terminal UI framework for **TypeScript**.
48
+
49
+
You write declarative widget trees in TypeScript.
50
+
Rezi computes layout and emits a compact binary drawlist (ZRDL).
51
+
A native C engine — [Zireael](https://github.com/RtlZeroMemory/Zireael) — diffs framebuffers and writes only changed cells to the terminal.
52
+
53
+
The result:
54
+
55
+
- TypeScript ergonomics
56
+
- Deterministic rendering
57
+
- Near-native performance
58
+
- No React runtime
59
+
- No virtual DOM overhead
60
+
61
+
---
62
+
63
+
## Why Rezi?
64
+
65
+
Most JavaScript terminal frameworks generate ANSI escape sequences in userland on every update. Rendering cost scales with tree size and update frequency.
66
+
67
+
Rezi moves the hot path out of JavaScript.
68
+
69
+
1.**Application code** builds a declarative widget tree.
70
+
2.**@rezi-ui/core** computes layout and encodes a compact binary drawlist.
71
+
3.**Zireael (C engine)** diffs framebuffer state and writes only changed cells.
72
+
73
+
Rendering remains ergonomic at the top — and native-speed at the bottom.
74
+
75
+
In PTY-mode benchmarks (120×40 viewport), Rezi operates within ~2×–5× of a native Rust baseline (ratatui) and significantly outperforms React-based terminal frameworks:
Most JavaScript terminal frameworks generate ANSI escape sequences in userland on every update. This works, but rendering cost scales with tree size and update frequency.
1.**Your code** builds a declarative widget tree in TypeScript.
122
-
2.**Rezi** computes layout and encodes a compact binary drawlist (ZRDL).
123
-
3.**Zireael** (native C engine) diffs framebuffer state and writes only changed cells to the terminal.
196
+
### Focus & Input
197
+
- Automatic tab navigation
198
+
- Focus traps for modals
199
+
- Global keybindings
200
+
- Vim-style and chord sequences
201
+
- Mouse support (click, scroll, drag)
124
202
125
-
This keeps authoring ergonomic while moving the hot rendering path to native code. In our PTY-mode benchmark suite (`120x40` viewport), Rezi is ~2x–5x from a native Rust baseline (ratatui) and 30x–50x ahead of Ink:
**Focus management** — automatic Tab/Shift+Tab navigation, focus zones, focus traps for modals, and mouse click-to-focus.
213
+
### Deterministic Rendering
214
+
- Same state + same events = same frames
215
+
- Versioned binary protocol
216
+
- Pinned Unicode version
217
+
- Strict update semantics
142
218
143
-
**Keybindings** — global shortcuts, modal modes (Vim-style `g g`, Emacs-style `C-x C-s`), and chord sequences.
219
+
### Record & Replay
220
+
Capture input sessions as deterministic bundles for debugging and testing.
144
221
145
-
**Theming** — six built-in themes (dark, light, dimmed, high-contrast, nord, dracula) with semantic color tokens. Switch at runtime with `app.setTheme()`.
222
+
---
146
223
147
-
**Mouse support** — click to focus, scroll wheel for lists and editors, drag to resize split panes. Detected automatically.
Data flows down as drawlists (ZRDL). Input events flow up as event batches (ZREV). Both are versioned, little-endian binary formats validated at the boundary.
260
+
Data flows down as drawlists (ZRDL).
261
+
Input events flow up as event batches (ZREV).
262
+
Both are versioned binary formats validated at the boundary.
263
+
264
+
---
178
265
179
266
## Packages
180
267
181
268
| Package | Description |
182
269
|---|---|
183
-
|[`@rezi-ui/core`](https://www.npmjs.com/package/@rezi-ui/core)|Widgets, layout, themes, keybindings, forms. Runtime-agnostic — no Node.js APIs.|
184
-
|[`@rezi-ui/node`](https://www.npmjs.com/package/@rezi-ui/node)| Node.js/Bun backend with worker and inline execution modes.|
185
-
|[`@rezi-ui/native`](https://www.npmjs.com/package/@rezi-ui/native)| N-API addon binding to the Zireael C rendering engine.|
186
-
|[`@rezi-ui/jsx`](https://www.npmjs.com/package/@rezi-ui/jsx)| JSX runtime mapping to Rezi VNodes. No React.|
187
-
|[`@rezi-ui/testkit`](https://www.npmjs.com/package/@rezi-ui/testkit)|Test utilities, fixtures, and golden test helpers.|
-**Runtime**: Node.js 18+ (18.18+ recommended) or Bun 1.3+
193
-
-**Platforms**: Linux x64/arm64, macOS x64/arm64, Windows x64
194
-
-**Terminal**: 256-color or true-color support recommended
279
+
## Requirements
195
280
196
-
Prebuilt native binaries are published for all supported platforms. If a prebuilt binary is unavailable, the package falls back to compiling from source (requires a C toolchain).
281
+
-**Node.js 18+** (18.18+ recommended) or **Bun 1.3+**
282
+
- Linux x64/arm64
283
+
- macOS x64/arm64
284
+
- Windows x64
285
+
- 256-color or true-color terminal recommended
197
286
198
-
## Documentation
287
+
Prebuilt native binaries are published for supported platforms.
288
+
If unavailable, the package compiles from source (requires a C toolchain).
199
289
200
-
| Resource | Link |
201
-
|---|---|
202
-
| Docs home |[rtlzeromemory.github.io/Rezi](https://rtlzeromemory.github.io/Rezi/)|
203
-
| Getting started |[Install](https://rtlzeromemory.github.io/Rezi/getting-started/install/) · [Quickstart](https://rtlzeromemory.github.io/Rezi/getting-started/quickstart/) · [JSX](https://rtlzeromemory.github.io/Rezi/getting-started/jsx/)|
0 commit comments