>> @bdocs/dui v0.6.0
$pnpm add @bdocs/dui▍
██████╗ ██╗ ██╗██╗ ██╔══██╗██║ ██║██║ ██║ ██║██║ ██║██║ ██║ ██║██║ ██║██║ ██████╔╝╚██████╔╝██║ ╚═════╝ ╚═════╝ ╚═╝
Terminal UI toolkit for Node.js CLIs — boxes, colors, logging, lists, dividers, spinners, tables, and more.
# 01 / modules
$
Logger▌
info, warn, error, success, debug with configurable prefix and styled output.
$
Box▌
Box builder with double, single, and round border styles for structured output.
$
Lists▌
Bullet points, numbered lists, and task checklists with ANSI-aware alignment.
$
Colors▌
Custom color engine with hex, rgb, rgba, oklch, named colors and theme support.
$
Divider▌
Horizontal line separators that fit the terminal width automatically.
$
Table▌
Box-drawing character tables with alignment and cell wrapping support.
$
Prompt▌
Interactive confirm prompts with default value and SIGINT handling.
$
Spinner▌
Animated terminal spinners with braille frames for long-running tasks.
$
Steps▌
Pipeline timeline display showing task status with terminal graphics.
$
Utils▌
ANSI-aware padding, centering, width, and word-wrapping utilities.
$
Config▌
Global configuration for prefix, dev server, preview server, and update commands.
$
Overview▌
Quick start guide to integrate DUI into your Node.js CLI application.
# 02 / showcase
$ node lists.js
dui lists — bullet, ordered, tasks
• Install DUI with pnpm
• Import the components
• Build beautiful CLIs
• Share with community
1. Clone repository
2. Install dependencies
3. Build project
4. Run tests
✔ Write documentation
✔ Add unit tests
○ Review pull request
○ Deploy to production
$ node dashboard.js
dui — grid & layout — dashboard
╭── System Dashboard ────────────────────────────╮
│ │
│ CPU ████████░░░░ 65% MEM ████░░░░ 3.2G │
│ DSK ██████░░░░░░ 42% NET ██████░░ 1.5M │
│ │
│ API ● api-gateway up:12d │
│ DB ● postgres up:2h ! │
│ CACHE ● redis up:12d │
│ │
│ ✖ Disk /dev/sda1 87% │
│ ⚠ SSL cert expires 14d │
╰── Section • Grid • Badge ──────────────────────╯
$ node diff.js
dui diff — unified diff view
src/greet.ts
-export function greet(name: string) {
+export function greet(name: string,
+ polite = false) {
const prefix = polite ? "Hi " : "Hey "
- console.log("Hello", name);
+ console.log(prefix + name);
-export const VERSION = "1.0.0";
+export const VERSION = "1.1.0";
+export const AUTHOR = "Bolt Docs";
1 file changed, 5 insertions, 2 deletions
$ node colorize.js
dui colors — 24-bit true color engine
color gradient engine HEX
RGB OKLCH
████████████ True Color
12 built-in named colors • 16M RGB palette
$ node animate.js
dui animation — easing curves
Easing Curves (60 fps)
linear ██████████████████████████████
ease-out ████████████████████████░░░░░░
ease-in-out██████████████████████████████
25+ easing functions • spring physics
$ node boxes.js
dui boxes — border styles
╔══════════════════════════╗
║ DUI Terminal UI ║
║ Boxes & Borders ║
║ • double border ║
║ • single border ║
║ • round corners ║
╚══════════════════════════╝
→ bordered output for CLIs