Skip to content

cmd-tableModern CLI tables for Node.js

Interactive TUI · Sparklines · Pivot tables · Async pagination · CSV/JSON/HTML — zero runtime dependencies, TypeScript-first.

cmd-table

30-Second Quick Start

bash
npm install cmd-table
ts
import { Table } from 'cmd-table';

const table = new Table();
table.addRow({ Name: 'Alice', Role: 'Engineer', Status: 'Active' });
table.addRow({ Name: 'Bob', Role: 'Designer', Status: 'Away' });
table.addRow({ Name: 'Charlie', Role: 'PM', Status: 'Active' });

console.log(table.render());
╭─────────┬──────────┬────────╮
│ Name    │ Role     │ Status │
├─────────┼──────────┼────────┤
│ Alice   │ Engineer │ Active │
│ Bob     │ Designer │ Away   │
│ Charlie │ PM       │ Active │
╰─────────┴──────────┴────────╯

That's it — columns are inferred from object keys, alignment, theme, and colors all have sensible defaults. When you're ready, browse the recipes for common patterns or jump into the full guide.

Pipe data straight from your shell

bash
echo '[{"name":"Alice","age":30},{"name":"Bob","age":25}]' | npx cmd-table
cat data.csv | npx cmd-table --interactive
sqlite3 app.db ".dump users" | npx cmd-table

The ecosystem

PackageWhat it does
cmd-tableCore library — tables, themes, TUI, visuals.
cmd-table-jest-reporterDrop-in Jest reporter with table summaries and slowest-tests view.
cmd-table-vitest-reporterSame idea for Vitest, with watch-mode support.
cmd-table-oclifcli-ux table replacement for oclif CLIs (Heroku, Salesforce, …).

Released under the MIT License.