Skip to content
Updated May 2026Edit this page ↗

Installation

Get TermUI running in your project. There are two paths: scaffold a new app with the CLI, or add packages to something you already have.

Prerequisites

  • Bun 1.3 or later for development
  • Node.js 18+ if you only consume published @termuijs/* packages from npm
  • A terminal with 256-color or truecolor support

Create a new project

The scaffolding CLI sets up a ready-to-run project:

TERMINAL
$ bunx create-termui-app my-app
$ cd my-app
$ bun install
$ bun run dev

This gives you:

  • TypeScript configuration
  • Hot-reload dev server (bun run dev)
  • Example app with Box, Text, and keyboard handling
  • TSS theme setup with the default dark theme
  • Vitest config for testing

Add to an existing project

Install the packages you need:

TERMINAL
# Core framework (required)
$ bun add @termuijs/core
$ 
# UI building blocks
$ bun add @termuijs/widgets
$ bun add @termuijs/ui
$ bun add @termuijs/jsx
$ 
# Application features
$ bun add @termuijs/tss
$ bun add @termuijs/router
$ bun add @termuijs/motion
$ bun add @termuijs/store
$ bun add @termuijs/data
$ 
# Development tools
$ bun add -D @termuijs/testing
$ bun add -D @termuijs/dev-server

Verify it works

Create an index.ts to check your setup:

TYPESCRIPT
import { App, Screen } from '@termuijs/core'
import { Box, Text } from '@termuijs/widgets'
 
// Build a simple widget tree
const root = new Box({ border: 'round', padding: 1 })
root.addChild(new Text('Hello from TermUI!'))
 
// Create and mount the app
const app = new App(root, { fullscreen: true })
await app.mount()

Run it:

TERMINAL
$ bun index.ts

You should see a rounded box with your text inside. Press Ctrl+C to exit.

Package overview

PackageWhat it does
@termuijs/coreScreen buffer, input parsing, event system, layout engine
@termuijs/widgetsBox, Text, Table, ProgressBar, Spinner, Gauge, VirtualList
@termuijs/uiSelect, Tabs, Modal, Toast, Tree, MultiSelect
@termuijs/jsxJSX runtime, useState, useEffect, useContext, memo, useAsync
@termuijs/tssCSS-like theming with variables and selectors
@termuijs/routerScreen routing with dynamic params and history
@termuijs/motionSpring physics and easing-based transitions
@termuijs/storeZustand-style state with selector subscriptions
@termuijs/dataSystem monitoring: CPU, memory, disk, network, processes
@termuijs/quickRapid prototyping with reactive values and layout helpers
@termuijs/testingIn-memory test renderer with query and interaction API
@termuijs/dev-serverProcess-based hot reload for development (uses Bun.spawn)

Next steps

  • Quick start: build a working app in a few minutes
  • Architecture: how the packages fit together
  • Core overview: the render engine in detail
  • Testing guide: write your first component test