Open source · early preview
●Node.js-first · native engine

Build terminal UIs
with a native Rust core.

BetterTUI is an open-source framework for Node.js terminal applications. Write a typed interface in TypeScript while the engine handles layout, input, and terminal rendering natively.

$npm install @bettertui/core
Node.js ≥ 24Bun compatibleRust engine
app.ts@bettertui/core
import { Box, Text, createCliRenderer } from "@bettertui/core";

const renderer = await createCliRenderer({ exitOnCtrlC: true });

const app = new Box(renderer, {
  flexDirection: "column", padding: 1,
});

app.add(new Text(renderer, { content: "Hello, terminal." }));
renderer.root.add(app);
renderer.start();

Features

A focused foundation for terminal software.

BetterTUI keeps application code approachable while moving terminal-specific work into a dedicated native engine.

Native Rendering Core

Layout, frame composition, and terminal output run in a Rust engine, while application code stays in TypeScript.

Node.js First

The project targets modern Node.js first, with a native addon and an API shaped for terminal applications rather than browser assumptions.

Framework-Agnostic Core

A command buffer, runtime, and tree reconciliation layer keep the engine independent from any one component model.

Purposeful Native Boundaries

Rust ownership and generational node identifiers help protect native rendering work from whole classes of stale-reference mistakes.

Native safeguards

Terminal Primitives

Compose layout, text, input, scrolling, selection, and events from primitives designed for interactive terminal surfaces.

Testable and Observable

Typed commands, testing helpers, diagnostics, and public benchmarks make the work inspectable instead of asking you to trust a headline.

Core first

Keep your terminal logic explicit.

Start directly with the core when you want a clear view of the renderer, nodes, events, and update flow. Higher-level adapters can build on the same engine boundary.

app.ts@bettertui/core
import { Box, Text, createCliRenderer } from "@bettertui/core";

const renderer = await createCliRenderer({ exitOnCtrlC: true });
const panel = new Box(renderer, {
  flexDirection: "column", padding: 1,
});

panel.add(new Text(renderer, {
  content: "Ready to build.",
}));
renderer.root.add(panel);
renderer.start();

Your application

State, layout intent, component composition, and interaction rules remain understandable TypeScript.

The engine

Layout calculation, frame composition, terminal output, and low-level input handling run behind a deliberate native boundary.

Understand the architecture

Designed for interaction

Build terminal screens that respond like applications.

Combine layout, keyboard input, focus, and dynamic state into a terminal interface that has room to grow with the workflow behind it.

terminal
~/my-app
$ npm install @bettertui/core
✓ Core package installed
$ node app.mjs
✓ Native engine ready
✓ Input and layout active
●BetterTUI DashboardPress Tab to navigate
▶CPU
████████░░81%
▷Memory
████░░░░░░42%
▷Rust engine
█░░░░░░░░░~0ms garbage collection
Press q to quit

How It Works

A small API surface with a clear native boundary.

Your application describes the interface. BetterTUI turns that intent into commands, then the native engine lays out and renders the terminal frame.

01

Your app

Application Layer

Components
State + input

TypeScript application code · framework adapters can build on the same core

02

Layer 2

@bettertui/core

TypeScript

Command buffer · runtime · tree reconciliation

A typed TypeScript layer that batches UI updates and coordinates the boundary between your application and the native engine.

Typedcommand protocolfrom application state to native bridge
03

Layer 3

Rust Engine

Rust · Native Node Addon

Flexbox layout · ANSI renderer · terminal events

The hot render path stays native. Rust ownership and generational node identifiers help the engine reject stale references before they become rendering work.

Native render pathArena allocationTaffy flexbox

Built in public

A better terminal foundation needs more than one point of view.

BetterTUI is a long-term investment in the tools people use every day. The project is shared early so the community can see, question, and improve the direction with it.

Why this exists

I am putting sustained time and care into BetterTUI because terminal applications deserve a thoughtful, dependable foundation. The goal is not to ship another demo; it is to make a project the community can inspect, shape, and eventually rely on.

A star, a question, a bug report, or an honest note about the workflow you need all make a real difference while the project is still taking shape.

01

Be honest about the stage

BetterTUI is an early preview. The API will change, and it is not ready for production workloads yet. Clear limits are part of building trust.

02

Show the work, not just the claims

The source, architecture notes, benchmarks, and development decisions are available to inspect. You can decide whether the direction earns your time.

03

Build with the people who will use it

The best terminal tooling comes from real workflows. Feedback, questions, and small experiments help turn a promising engine into a useful community project.

Early preview

See what is planned, then share the problem you would like BetterTUI to solve.

Early preview — not production-ready

If this direction matters to you, your support matters to the project.

I am building BetterTUI in public, one careful decision at a time. A star on the repository is a small signal that helps other builders find the work and gives me real momentum to keep investing in it.

MIT licensed · You can also follow the roadmap or start with the quick start.