Zero-dependency, modern TypeScript library and CLI for building gorgeous terminal dashboards and visualizations.
termalytics brings high-performance data visualization to your Node.js scripts, CLIs, and servers. Built from scratch with zero runtime dependencies, TypeScript-first types, support for 24-bit Truecolor ANSI, and a powerful sub-pixel Braille canvas.
- Zero Runtime Dependencies β Tiny footprint, no install bloating.
- Braille Canvas β Renders sub-pixel lines and curves by utilizing the Unicode Braille Patterns block (2Γ4 pixel density per text cell).
- Horizontal Bar Charts β Smooth fractional block rendering (
βββββ). - Modern Color Engine β Support for 24-bit RGB Truecolor and classic 16-color ANSI maps.
- Sparklines & Gauges β Ultra-compact visualizations for inline logs and status lines.
- Box-Drawing Tables & Heatmaps β Structured data tables with alignment controls and truecolor activity matrices.
- Grid Layout Engine β Flexibly compose widgets into responsive multi-panel dashboards.
- CLI Mode β Pipe CSV, JSON, or newlines directly to generate instant charts on standard input.
- Live Mode β Build real-time updating terminal interfaces with cursor control and alternate-screen buffering.
Until the npm registry package is published, install the verified GitHub release tarball:
npm install https://github.com/wenn-id/termalytics/releases/download/v1.0.2/termalytics-1.0.2.tgzFor global CLI usage:
npm install -g https://github.com/wenn-id/termalytics/releases/download/v1.0.2/termalytics-1.0.2.tgzThen verify:
termalytics --helpimport { lineChart, barChart, gauge, table, Color, wrap } from 'termalytics';
// Line Chart (Multi-series using Braille pixels)
const seriesA = [10, 30, 45, 25, 60, 90, 80];
const seriesB = [50, 48, 55, 60, 30, 20, 45];
console.log(lineChart([seriesA, seriesB], {
title: "Server Performance",
width: 60,
height: 10,
series: [
{ label: "CPU", color: Color.Cyan },
{ label: "Memory", color: Color.Magenta }
]
}));
// Horizontal Bar Chart
console.log(barChart([
{ label: "Node.js", value: 92 },
{ label: "Rust", value: 85 },
{ label: "Go", value: 74 }
], { width: 50, title: "Language Adoption" }));
// Status Gauge
console.log(gauge(75.5, 100, { label: "Disk Usage", width: 30 }));Termalytics automatically detects CSV, TSV, JSON, and list formats.
# Feed a JSON array of values
echo '[10, 24, 45, 30, 75, 90, 60]' | termalytics line --title="Hourly Requests"
# Multi-series JSON
echo '{"series": [[5, 15, 30], [25, 20, 10]]}' | termalytics line# Line-separated raw values
seq 1 10 | termalytics bar# Pipe non-numeric CSV
echo -e "Service,Status,Latency\napi-gw,healthy,12ms\nauth-svc,healthy,8ms\ndb-primary,degraded,45ms" | termalytics tableecho '[20, 45, 90, 50, 30, 80]' | termalytics spark Server Performance
β CPU β Memory
90β€β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β£β‘β β β β β β
β€β β β β β β β β β β β β β β β β β β β β β β β β β‘ β β β β β €β‘β β β β β β β‘ β β β β β ’β‘β β β β
60β€β β β β β β β β β β’β£β‘β β β β β β β β β β β‘ β β β β β β β β β ’β‘β β β’β β β β β β β β β β’β β
β€β β β β β β β β‘ β β β β β β €β‘β β β β β β’β β β β β β β β β β β β β ’β£β β β β β β β β β β β β β’
30β€β’β£β β β β β‘°β β β β β β β β β β €β£β β‘ β β β β β β β β β β β β β β β β β β β β β β β β β β β β
β€β β β β ’β’β‘°β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β
0β€β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Rust ββββββββββββββββββββββββββββββββββββββ 89
Go βββββββββββββββββββββββββββββββ 71
TypeScript ββββββββββββββββββββββββββββββββββββββββ 95
Plots multiple dataset lines using Unicode Braille pixels.
width: Number of text columns (default80).height: Number of text rows (default15).min/max: Force scale bounds (defaults to data range).showAxis: Draw y-axis labels and boundary grid (defaulttrue).series: Config arrays like{ label: string, color: number }.
Creates horizontal bars.
- Automatically normalizes lengths.
- Colors negative values red.
Renders an inline line chart using 8 distinct vertical block levels ( ββββ
βββ).
gauge(value: number, maxValue: number, opts?: { width?: number, label?: string, color?: number }): string
A progress bar indicator. Scales color automatically from Green (low) to Yellow (medium) to Red (critical).
Draws a border around pre-rendered text lines with configurable title alignment, colors, and inner padding.
Arranges multiple panels side-by-side or stacked in rows. Automatically scales panel heights to align cleanly.
Switches the terminal to the alternate screen buffer, hides the cursor, and redraws your screen template at the configured refresh rate. Automatically handles SIGINT/SIGTERM interrupts to restore your user's shell cleanly.
MIT License. Designed & developed with π by Alwan Juliawan.