npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

cli-table-lite

v1.0.0

Published

Minimalist, zero-dependency ASCII and Unicode table renderer for terminal output, logs, and CLI dashboards.

Readme

📊 cli-table-lite

Minimalist, zero-dependency ASCII and Unicode table formatter for Node.js CLI tools, terminal dashboards, and markdown reports.

npm version License: MIT Sponsor TypeScript Size


💡 Why cli-table-lite?

Popular CLI table libraries like cli-table3 or table often weigh heavily (hundreds of kilobytes of string-width and east-asian-width dependencies).

cli-table-lite is focused on pure speed and zero overhead:

  • ⚡ Zero Dependencies — Less than 1.5 KB minified with zero external dependencies.
  • 📐 Multiple Visual Styles — Seamlessly switch between Unicode Box Drawing, clean ASCII, GitHub Markdown, and Compact spacing.
  • 🎯 Alignment & Padding — Precise left, center, and right alignment controls with customizable cell padding.
  • 🏷️ Dynamic Column Inference — Pass an array of objects directly and headers/widths calculate automatically.
  • 📦 Dual ESM & CommonJS — Native compatibility across Node.js, Next.js, Vite, Bun, and Deno.

📥 Installation

# npm
npm install cli-table-lite

# pnpm
pnpm add cli-table-lite

# yarn
yarn add cli-table-lite

# bun
bun add cli-table-lite

🚀 Usage & Real-World Examples

1. Basic Box Table

import { renderTable } from 'cli-table-lite';

const data = [
  { id: 1, name: 'Alice Doe', role: 'Lead Architect', status: 'Active' },
  { id: 2, name: 'Bob Smith', role: 'Frontend Engineer', status: 'Active' },
  { id: 3, name: 'Charlie', role: 'QA Analyst', status: 'Offline' },
];

console.log(renderTable(data));

Output:

┌────┬───────────┬───────────────────┬─────────┐
│ id │ name      │ role              │ status  │
├────┼───────────┼───────────────────┼─────────┤
│ 1  │ Alice Doe │ Lead Architect    │ Active  │
│ 2  │ Bob Smith │ Frontend Engineer │ Active  │
│ 3  │ Charlie   │ QA Analyst        │ Offline │
└────┴───────────┴───────────────────┴─────────┘

2. GitHub Markdown Table Mode

Generate formatted Markdown tables for GitHub PR comments, issue descriptions, or automated CI docs:

import { renderTable } from 'cli-table-lite';

const stats = [
  { package: 'auth-service', size: '12 KB', coverage: '98%' },
  { package: 'api-gateway', size: '45 KB', coverage: '94%' },
];

const mdTable = renderTable(stats, { borderStyle: 'markdown' });
console.log(mdTable);

Output:

| package      | size  | coverage |
|--------------|-------|----------|
| auth-service | 12 KB | 98%      |
| api-gateway  | 45 KB | 94%      |

3. Custom Columns & Alignment

import { renderTable } from 'cli-table-lite';

const sales = [
  { item: 'MacBook Pro', price: '$2,499', qty: 5 },
  { item: 'Dell XPS 15', price: '$1,899', qty: 12 },
  { item: 'Magic Mouse', price: '$79', qty: 45 },
];

const output = renderTable(sales, {
  columns: [
    { key: 'item', header: 'Product Name', align: 'left' },
    { key: 'price', header: 'Unit Price', align: 'right' },
    { key: 'qty', header: 'Stock', align: 'center' },
  ],
  padding: 2,
});

console.log(output);

📖 API Reference

renderTable(data, options?)

  • Parameters:
    • data (Record<string, any>[]): Array of plain objects.
    • options (TableOptions, optional): Formatting options.
  • Returns: string containing the multi-line rendered table.

Options (TableOptions):

| Property | Type | Default | Description | |---|---|---|---| | borderStyle | 'box' \| 'ascii' \| 'markdown' \| 'compact' | 'box' | Border style preset | | padding | number | 1' | Number of horizontal spaces around cell content | | columns | (string \| TableColumn)[] | Inferred | Custom column list, ordering, and alignments |

Column Definition (TableColumn):

| Property | Type | Default | Description | |---|---|---|---| | key | string | Required | Property key in data objects | | header | string | key | Header text to display in top row | | align | 'left' \| 'center' \| 'right' | 'left' | Column text alignment | | width | number | Auto | Minimum column width |


💖 Support the Project

If cli-table-lite helps keep your terminal outputs and dashboards neat, please support ongoing development:

👉 Sponsor @Piratha97 on GitHub Sponsors


📄 License

MIT © 2026 Pirapaakaran Pirathapan