$ rezi

Installation

Install Rezi packages from npm to start building terminal applications.

Install Rezi packages from npm to start building terminal applications.

Requirements

  • Runtime: Node.js 18.18.0+ or Bun 1.3.0+
  • Operating System: Linux, macOS, or Windows
  • Terminal: Any terminal emulator with 256-color or true-color support

Install via npm

If you want a ready-to-run starter, use the scaffolding tool:

npm create rezi my-app

Install the core and Node.js/Bun backend packages:

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

Or with other package managers:

npm install @rezi-ui/core @rezi-ui/node
pnpm add @rezi-ui/core @rezi-ui/node
yarn add @rezi-ui/core @rezi-ui/node
bun add @rezi-ui/core @rezi-ui/node

Prebuilt Binaries

The @rezi-ui/node package includes prebuilt native binaries for common platforms:

PlatformArchitectureStatus
Linuxx64Included
Linuxarm64Included
macOSx64 (Intel)Included
macOSarm64 (Apple Silicon)Included
Windowsx64Included

If a prebuilt binary is not available for your platform, the package will attempt to compile from source (requires a C toolchain).

Package Overview

PackageDescriptionRequired
@rezi-ui/coreWidgets, layout, themes, forms, keybindingsYes
@rezi-ui/nodeNode.js/Bun backend (worker/inline modes + native rendering)Yes
@rezi-ui/testkitTesting utilities and fixturesOptional

Optional packages

PackageWhen to use
@rezi-ui/jsxPrefer JSX syntax over ui.* function calls
@rezi-ui/testkitTesting Rezi applications

@rezi-ui/core

The core package is runtime-agnostic and contains:

  • All widget constructors (ui.text, ui.button, ui.table, etc.)
  • Layout engine with flexbox-like semantics
  • Theme system with built-in presets
  • Form management and validation
  • Keybinding parser and matcher
  • Focus management utilities
  • Binary protocol builders and parsers

@rezi-ui/node

The Node.js/Bun backend provides:

  • Runtime execution modes (worker, inline, auto)
  • Native addon binding to the Zireael C engine
  • Terminal capability detection
  • Event loop integration
  • Debug tracing and performance instrumentation

@rezi-ui/testkit

Testing utilities for Rezi applications:

  • Test fixtures for protocol testing
  • Golden file comparison utilities
  • Mock backends for unit testing

Install for development:

npm install --save-dev @rezi-ui/testkit

TypeScript Setup

Rezi is written in TypeScript and ships with full type definitions. No additional @types/* packages are needed.

Recommended tsconfig.json settings:

{
  "compilerOptions": {
    "target": "ES2022",
    "module": "ESNext",
    "moduleResolution": "bundler",
    "strict": true,
    "esModuleInterop": true,
    "skipLibCheck": true
  }
}

For maximum type safety, enable these additional options:

{
  "compilerOptions": {
    "noUncheckedIndexedAccess": true,
    "exactOptionalPropertyTypes": true
  }
}

Verify Installation

Create a test file to verify your installation:

// test.ts
import { ui } from "@rezi-ui/core";
import { createNodeApp } from "@rezi-ui/node";

const app = createNodeApp({
    initialState: {},
});

app.view(() => ui.text("Rezi is working!"));

await app.start();

Run with:

npx tsx test.ts

Or with Bun:

bun run test.ts

You should see "Rezi is working!" displayed in your terminal.

Building from Source

For contributors or custom platform builds, see the Build Guide.

Next Steps

On this page