Skip to content

CLI

The BetterTUI CLI helps you create and manage projects.

Terminal window
npm install bettertui@latest

Install BetterTUI in your project.

Terminal window
pnpm dev

Start the development server with hot reload.

Terminal window
pnpm build

Build the project for production.

Terminal window
pnpm preview

Preview the production build.

import { defineConfig } from '@bettertui/core';
export default defineConfig({
// Theme configuration
theme: 'default',
// Renderer options
renderer: {
fps: 60,
dirtyRectDiffing: true,
debug: false,
},
// Build options
build: {
target: 'node',
minify: true,
},
});
Variable Description Default
BETTERTUI_FPS Target frame rate 60
BETTERTUI_DEBUG Enable debug mode false
BETTERTUI_THEME Override theme

Ensure Rust toolchain is installed:

Terminal window
rustup update stable

Check terminal capabilities:

Terminal window
echo $TERM
echo $COLORTERM

BetterTUI requires a terminal with 256 color support or higher.