{"id":44439598,"url":"https://github.com/rtlzeromemory/rezi","last_synced_at":"2026-03-14T08:18:25.554Z","repository":{"id":337651337,"uuid":"1154535341","full_name":"RtlZeroMemory/Rezi","owner":"RtlZeroMemory","description":"React-style terminal UI framework powered by a native C rendering engine. Ink-compatible. Minimal redraws. Much lower overhead.","archived":false,"fork":false,"pushed_at":"2026-02-13T18:06:58.000Z","size":2230,"stargazers_count":46,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-15T21:51:08.634Z","etag":null,"topics":["c","cli","devtools","ffi","ink","nodejs","opensource","react","terminal-ui","tui","typescript"],"latest_commit_sha":null,"homepage":"https://rtlzeromemory.github.io/Rezi/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RtlZeroMemory.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":"SECURITY.md","support":"SUPPORT.md","governance":"GOVERNANCE.md","roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":"docs/maintainers.md","copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-10T13:55:02.000Z","updated_at":"2026-02-15T14:01:25.000Z","dependencies_parsed_at":"2026-02-13T16:07:04.889Z","dependency_job_id":null,"html_url":"https://github.com/RtlZeroMemory/Rezi","commit_stats":null,"previous_names":["rtlzeromemory/rezi"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/RtlZeroMemory/Rezi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RtlZeroMemory%2FRezi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RtlZeroMemory%2FRezi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RtlZeroMemory%2FRezi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RtlZeroMemory%2FRezi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RtlZeroMemory","download_url":"https://codeload.github.com/RtlZeroMemory/Rezi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RtlZeroMemory%2FRezi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29514583,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T17:46:34.542Z","status":"ssl_error","status_checked_at":"2026-02-16T17:46:30.907Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","cli","devtools","ffi","ink","nodejs","opensource","react","terminal-ui","tui","typescript"],"created_at":"2026-02-12T14:36:33.095Z","updated_at":"2026-03-05T04:05:58.968Z","avatar_url":"https://github.com/RtlZeroMemory.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eRezi\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eTypeScript TUI, Near-Native Performance.\u003c/strong\u003e\u003cbr/\u003e\n  High-level developer experience powered by a deterministic C rendering engine.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@rezi-ui/core\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/v/@rezi-ui/core.svg\" alt=\"npm version\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/RtlZeroMemory/Rezi/actions/workflows/ci.yml\"\u003e\n    \u003cimg src=\"https://github.com/RtlZeroMemory/Rezi/actions/workflows/ci.yml/badge.svg\" alt=\"CI\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://rezitui.dev/docs\"\u003e\n    \u003cimg src=\"https://github.com/RtlZeroMemory/Rezi/actions/workflows/docs.yml/badge.svg\" alt=\"docs\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/license-Apache--2.0-blue.svg\" alt=\"License\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://rezitui.dev\"\u003eWebsite\u003c/a\u003e ·\n  \u003ca href=\"https://rezitui.dev/docs\"\u003eDocs\u003c/a\u003e ·\n  \u003ca href=\"https://rezitui.dev/docs/getting-started/quickstart/\"\u003eQuickstart\u003c/a\u003e ·\n  \u003ca href=\"https://rezitui.dev/docs/widgets/\"\u003eWidgets\u003c/a\u003e ·\n  \u003ca href=\"https://rezitui.dev/docs/api/\"\u003eAPI\u003c/a\u003e ·\n  \u003ca href=\"BENCHMARKS.md\"\u003eBenchmarks\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n\u003e **Status: Pre-alpha** — under active development and changing rapidly. Public APIs, ABI expectations, and behavior may change between releases, and Rezi is not yet recommended for production workloads.\n\n---\n\n## What Rezi Can Do\n\nRezi is a high-performance terminal UI framework for TypeScript. You write declarative widget trees — a native C engine handles layout diffing and rendering.\n\n- **56 built-in widgets** — layout primitives, form controls, data tables, virtual lists, navigation, overlays, a code editor, diff viewer, and more\n- **Canvas drawing** — sub-character resolution via braille (2×4), sextant (2×3), quadrant (2×2), and halfblock (1×2) blitters; draw lines, shapes, and gradients within a single terminal cell grid\n- **Charts \u0026 visualization** — line charts, scatter plots, heatmaps, sparklines, bar charts, gauges, and mini charts — all rendered at sub-character resolution\n- **Inline image rendering** — display PNG, JPEG, and raw RGBA buffers using Kitty, Sixel, or iTerm2 graphics protocols, with automatic blitter fallback\n- **Terminal auto-detection** — identifies Kitty, WezTerm, iTerm2, Ghostty, Windows Terminal, and tmux; enables the best graphics protocol automatically, with env-var overrides for any capability\n- **Performance-focused architecture** — binary drawlists + native C framebuffer diffing; benchmark details and caveats are documented in the Benchmarks section\n- **Ink compatibility layer** — run existing Ink CLIs on Rezi with minimal changes (import swap or dependency aliasing), plus deterministic parity diagnostics; details: [Porting guide](docs/migration/ink-to-ink-compat.md) · [Ink Compat architecture](docs/architecture/ink-compat.md)\n- **JSX without React** — optional `@rezi-ui/jsx` maps JSX directly to Rezi VNodes with zero React runtime overhead\n- **Deterministic rendering** — same state + same events = same frames; versioned binary protocol, pinned Unicode tables\n- **Hot state-preserving reload** — swap widget views or route tables in-process during development without losing app state or focus context\n- **Syntax tokenizer utilities** — shared lexical highlighters for TypeScript/JS/JSON/Go/Rust/C/C++/C#/Java/Python/Bash with custom-tokenizer hooks\n- **Advanced deterministic layout** — intrinsic sizing, `flexShrink`/`flexBasis`, `alignSelf`, wrapped text layout, grid spans/explicit placement, absolute positioning, and stability-signature relayout skipping\n- **6 built-in themes** — dark, light, dimmed, high-contrast, nord, dracula; switch at runtime with one call\n- **Declarative animation APIs** — numeric hooks (`useTransition`, `useSpring`, `useSequence`, `useStagger`) and `ui.box` transition props for position/size/opacity motion\n- **Record \u0026 replay** — capture input sessions as deterministic bundles for debugging and automated testing\n\n---\n\n## Showcase\n\n### EdgeOps Control Plane\n\nA production-style terminal control console built entirely with Rezi.\n\n![Rezi EdgeOps demo](Assets/REZICONSOLE3.gif)\n\n### Visual Stress Test\n\n![Rezi benchmark demo](Assets/REZIBENCHMARK.gif)\n\n### Image Rendering\n\n![Rezi benchmark demo](Assets/RENDERING.png)\n\n---\n\n## How It Works\n\nYou write declarative widget trees in TypeScript.\nRezi computes layout and emits a compact binary drawlist (ZRDL).\nA native C engine — [Zireael](https://github.com/RtlZeroMemory/Zireael) — diffs framebuffers and writes only changed cells to the terminal.\n\nMost JavaScript TUI frameworks generate ANSI escape sequences in userland on every frame. Rezi moves the hot path out of JavaScript — rendering stays ergonomic at the top and fast on real workloads.\n\n---\n\n## Benchmarks\n\n22 scenarios across primitive workloads (tree construction, rerender, layout), terminal-level rendering (full PTY write path), and full-app UI composition. All 8 frameworks run in PTY mode.\n\n### Representative numbers\n\nNumbers from a single-replicate full run on Apple M4 Pro (macOS arm64, PTY mode). Directional, not publication-grade.\n\n| Scenario | Rezi | Ink | OpenTUI Core | Ratatui | blessed |\n|---|---:|---:|---:|---:|---:|\n| rerender | 330µs | 19.22ms | 1.26ms | 70µs | 39µs |\n| tree-construction (100 items) | 153µs | 24.16ms | 1.51ms | 913µs | 1.70ms |\n| tree-construction (1000 items) | 1.31ms | 79.60ms | 17.35ms | 2.33ms | 19.14ms |\n| terminal-full-ui | 1.14ms | 22.34ms | 1.32ms | 258µs | 314µs |\n| terminal-strict-ui | 873µs | 22.14ms | 1.27ms | 183µs | 302µs |\n| terminal-virtual-list (100K) | 644µs | 22.32ms | 1.28ms | 121µs | 124µs |\n| scroll-stress (2000 items) | 6.99ms | 182ms | 32.58ms | — | — |\n\nRezi is the fastest TypeScript/JavaScript framework across all measured scenarios. terminal-kit, blessed, and Ratatui are lower-level libraries (no layout engine or no widget system); they are faster on primitive output scenarios, and slower or absent on workloads requiring structured layout and widget composition.\n\n### Memory at terminal-full-ui (peak RSS)\n\n| Framework | Peak RSS |\n|---|---|\n| Ratatui | 2.9 MB |\n| Rezi | 129 MB |\n| OpenTUI (Core) | 131 MB |\n| blessed | 260 MB |\n| Ink | 301 MB |\n| OpenTUI (React) | 1,010 MB |\n\n### Running benchmarks\n\n```bash\n# Prerequisites: build Rezi, then ensure bun/cargo are in PATH\nnpm ci \u0026\u0026 npm run build \u0026\u0026 npm run build:native \u0026\u0026 npx tsc -b packages/bench\n\n# Quick run — all 8 frameworks\nPATH=\"$HOME/.cargo/bin:$HOME/.bun/bin:$PATH\" \\\nREZI_BUN_BIN=\"$HOME/.bun/bin/bun\" \\\nnode --expose-gc packages/bench/dist/run.js \\\n  --suite all --io pty --quick --output-dir benchmarks/local-all\n```\n\nSee [BENCHMARKS.md](BENCHMARKS.md) for full results, all scenarios, scenario definitions, methodology caveats, and advanced run options.\n\n---\n\n## Quick Start\n\nGet running in under a minute:\n\n```bash\nnpm create rezi my-app\ncd my-app\nnpm start\n```\n\nOr with Bun:\n\n```bash\nbun create rezi my-app\ncd my-app\nbun start\n```\n\nStarter templates: **dashboard**, **stress-test**, **cli-tool**, **animation-lab**, **minimal**, and **starship** (command console).\n\n---\n\n## Example\n\n### `ui.*` API\n\n```ts\nimport { ui } from \"@rezi-ui/core\";\nimport { createNodeApp } from \"@rezi-ui/node\";\n\nconst app = createNodeApp\u003c{ count: number }\u003e({\n  initialState: { count: 0 },\n});\n\napp.view((s) =\u003e\n  ui.page({\n    p: 1,\n    gap: 1,\n    header: ui.header({ title: \"Counter\", subtitle: \"Beautiful defaults\" }),\n    body: ui.panel(\"Count\", [\n      ui.row({ gap: 1, items: \"center\" }, [\n        ui.text(String(s.count), { variant: \"heading\" }),\n        ui.spacer({ flex: 1 }),\n        ui.button({\n          id: \"inc\",\n          label: \"+1\",\n          intent: \"primary\",\n          onPress: () =\u003e app.update((prev) =\u003e ({ count: prev.count + 1 })),\n        }),\n      ]),\n    ]),\n  }),\n);\n\napp.keys({ q: () =\u003e app.stop() });\nawait app.start();\n```\n\n## Beautiful Defaults\n\nWhen the active theme provides semantic color tokens, Rezi uses design system recipes by default for:\n`ui.button`, `ui.input`/`ui.textarea`, `ui.select`, `ui.checkbox`, `ui.progress`, and `ui.callout`.\n\n- Use `intent` on buttons for common “primary/danger/link” patterns.\n- Use `preset` on `ui.box` (or `ui.card`/`ui.panel`) for consistent container defaults.\n- Use manual `style` props to override specific attributes (they do not disable recipes).\n\nDocs: [Design System](docs/design-system.md) · [Migration: Beautiful Defaults](docs/migration/beautiful-defaults.md)\n\nInstall:\n\n```bash\nnpm install @rezi-ui/core @rezi-ui/node\n```\n\n---\n\n### JSX (No React Runtime)\n\n`@rezi-ui/jsx` maps JSX directly to Rezi VNodes.\n\n```tsx\n/** @jsxImportSource @rezi-ui/jsx */\nimport { createNodeApp } from \"@rezi-ui/node\";\nimport { Column, Row, Spacer, Text, Button } from \"@rezi-ui/jsx\";\n\nconst app = createNodeApp\u003c{ count: number }\u003e({\n  initialState: { count: 0 },\n});\n\napp.view((s) =\u003e (\n  \u003cColumn p={1} gap={1}\u003e\n    \u003cText variant=\"heading\"\u003eCounter\u003c/Text\u003e\n    \u003cRow gap={1} items=\"center\"\u003e\n      \u003cText variant=\"heading\"\u003e{String(s.count)}\u003c/Text\u003e\n      \u003cSpacer flex={1} /\u003e\n      \u003cButton\n        id=\"inc\"\n        label=\"+1\"\n        intent=\"primary\"\n        onPress={() =\u003e app.update((prev) =\u003e ({ count: prev.count + 1 }))}\n      /\u003e\n    \u003c/Row\u003e\n  \u003c/Column\u003e\n));\n\napp.keys({ q: () =\u003e app.stop() });\nawait app.start();\n```\n\n```bash\nnpm install @rezi-ui/jsx @rezi-ui/core @rezi-ui/node\n```\n\n---\n\n## Features\n\n**56 built-in widgets** — primitives (box, row, column, text, grid), form inputs (input, button, checkbox, select, slider), data display (table, virtual list, tree), navigation (tabs, accordion, breadcrumb, pagination), overlays (modal, dropdown, toast, command palette), advanced (code editor with built-in/custom syntax tokenization, diff viewer, file picker, logs console), and visualization (canvas, image, line chart, scatter, heatmap, sparkline, bar chart, gauge, mini chart).\n\n### Graphics \u0026 Visualization\n\n| Widget | Description |\n|---|---|\n| `ui.canvas` | Programmable drawing surface with braille, sextant, quadrant, halfblock, or ASCII blitters |\n| `ui.image` | Inline images via Kitty, Sixel, iTerm2, or blitter fallback |\n| `ui.lineChart` | Multi-series line charts at sub-character resolution |\n| `ui.scatter` | Scatter plots with configurable point styles |\n| `ui.heatmap` | Heatmap grids with automatic color scaling |\n| `ui.sparkline` | Inline sparklines (text mode or high-res canvas mode) |\n| `ui.barChart` | Horizontal bar charts |\n| `ui.gauge` | Progress and percentage gauges |\n| `ui.miniChart` | Compact inline charts |\n\n### Terminal Graphics Protocol Support\n\nRezi auto-detects your terminal emulator and enables the best available graphics protocol:\n\n| Terminal | Graphics Protocol | Hyperlinks (OSC 8) |\n|---|---|---|\n| Kitty | Kitty graphics | Yes |\n| WezTerm | Sixel | Yes |\n| iTerm2 | iTerm2 inline images | Yes |\n| Ghostty | Kitty graphics | Yes |\n| Windows Terminal | — | Yes |\n\nCanvas and chart widgets work in **any** terminal via Unicode blitters — no graphics protocol required. Image widgets fall back to blitter rendering when no protocol is available.\n\nOverride any capability with environment variables:\n`REZI_TERMINAL_SUPPORTS_KITTY`, `REZI_TERMINAL_SUPPORTS_SIXEL`, `REZI_TERMINAL_SUPPORTS_ITERM2`, `REZI_TERMINAL_SUPPORTS_OSC8`\n\n### Focus \u0026 Input\n- Automatic tab navigation\n- Focus traps for modals\n- Global keybindings\n- Vim-style and chord sequences\n- Mouse support (click, scroll, drag)\n\n### Theming\nSix built-in themes:\n`dark`, `light`, `dimmed`, `high-contrast`, `nord`, `dracula`\n\nSwitch at runtime:\n\n```ts\napp.setTheme(\"nord\");\n```\n\n### Deterministic Rendering\n- Same state + same events = same frames\n- Versioned binary protocol\n- Pinned Unicode version\n- Strict update semantics\n\n### Record \u0026 Replay\nCapture input sessions as deterministic bundles for debugging and testing.\n\n---\n\n## Who is Rezi for?\n\nRezi is built for:\n\n- Real-time dashboards\n- Developer tooling\n- Control planes\n- Log viewers\n- Terminal-first applications\n- Teams who want TypeScript ergonomics without sacrificing performance\n\n---\n\n## Architecture\n\nRezi separates authoring from rendering:\n\n```\nApplication Code (TypeScript)\n        │\n        ▼\n@rezi-ui/core      Layout, widgets, protocol builders\n        │ ZRDL drawlist\n        ▼\n@rezi-ui/node      Node.js/Bun backend\n        │\n        ▼\n@rezi-ui/native    N-API binding\n        │\n        ▼\nZireael (C engine) Framebuffer diff, ANSI emission\n        │\n        ▼\nTerminal\n```\n\nData flows down as drawlists (ZRDL).\nInput events flow up as event batches (ZREV).\nBoth are versioned binary formats validated at the boundary.\n\n---\n\n## Packages\n\n| Package | Description |\n|---|---|\n| `@rezi-ui/core` | Runtime-agnostic widgets, layout, themes |\n| `@rezi-ui/node` | Node.js/Bun backend |\n| `@rezi-ui/native` | N-API binding to Zireael |\n| `@rezi-ui/jsx` | JSX runtime (no React) |\n| `@rezi-ui/testkit` | Testing utilities |\n| `create-rezi` | Project scaffolding CLI |\n\n---\n\n## Requirements\n\n- **Runtime**: Node.js 18+ (18.18+ recommended) or Bun 1.3+\n- **Platforms**: Linux x64/arm64, macOS x64/arm64, Windows x64/arm64\n- **Terminal**: 256-color or true-color support recommended\n- **Graphics**: For inline images, a terminal supporting Kitty graphics, Sixel, or iTerm2 inline images. Canvas and chart widgets work in any terminal via Unicode blitters.\n\nPrebuilt native binaries are published for all supported platforms above. The\npackage does not compile from source at install time; for unsupported targets,\nbuild from a repository checkout with `npm run build:native`.\n\n## Documentation\n\n| Resource | Link |\n|---|---|\n| Website \u0026 Docs | [rezitui.dev](https://rezitui.dev) |\n| Getting started | [Install](https://rezitui.dev/docs/getting-started/install/) · [Quickstart](https://rezitui.dev/docs/getting-started/quickstart/) · [JSX](https://rezitui.dev/docs/getting-started/jsx/) |\n| Guides | [Concepts](https://rezitui.dev/docs/guide/concepts/) · [Layout](https://rezitui.dev/docs/guide/layout/) · [Input \u0026 Focus](https://rezitui.dev/docs/guide/input-and-focus/) · [Styling](https://rezitui.dev/docs/guide/styling/) |\n| Widget catalog | [56 widgets](https://rezitui.dev/docs/widgets/) |\n| API reference | [TypeDoc](https://rezitui.dev/docs/api/) |\n| Architecture | [Overview](https://rezitui.dev/docs/architecture/) · [Protocol](https://rezitui.dev/docs/protocol/) |\n\n## Contributing\n\n```bash\ngit clone https://github.com/RtlZeroMemory/Rezi.git\ncd Rezi\ngit submodule update --init --recursive\nnpm ci\nnpm run build\nnpm test\n```\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md).\n\n---\n\n## License\n\nApache-2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frtlzeromemory%2Frezi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frtlzeromemory%2Frezi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frtlzeromemory%2Frezi/lists"}