table-image-generator

Verified·Scanned 2/17/2026

Generate clean table images from data. Perfect for Discord/Telegram where ASCII tables look broken. Supports dark/light mode, custom styling, and auto-sizing. No Puppeteer required. Companion to chart-image skill.

from clawhub.ai·v1.3.1·60.5 KB·0 installs
Scanned from 1.3.1 at 83046ba · Transparency log ↗
$ vett add clawhub.ai/dannyshmueli/table-image-generator

Table Image Generator 📋

Generate clean PNG table images from JSON data. Stop using ASCII tables — they look broken on Discord, Telegram, WhatsApp, and every messaging platform. This renders pixel-perfect images instead.

Features

  • 🎨 Color Emoji — Full Twemoji rendering (✅🔥🏆 etc.)
  • 🌙 Dark Mode — Discord-style dark theme
  • 🔄 RTL Support — Auto-detects Hebrew/Arabic, reverses columns
  • 📝 Word Wrapping — Long text wraps (max 3 lines, configurable)
  • 📐 Smart Column Widths — Headers always visible, proportional distribution
  • Fast — Generates in <100ms, no Puppeteer needed
  • 📁 Shell-Safe Input--data-file avoids quoting issues

Installation

cd scripts && npm install

Usage

# Recommended: use --data-file to avoid shell quoting issues
cat > /tmp/data.json << 'EOF'
[{"Name":"Alice","Score":95},{"Name":"Bob","Score":87}]
EOF
node scripts/table.mjs --data-file /tmp/data.json --dark --output table.png

# Or pipe via stdin
echo '[{"Name":"Alice","Score":95}]' | node scripts/table.mjs --dark --output table.png

# Simple inline (works for basic data)
node scripts/table.mjs --data '[{"A":"1","B":"2"}]' --output table.png

Options

OptionDescriptionDefault
--dataJSON array of row objectsrequired*
--data-fileRead JSON from file (shell-safe)
--outputOutput file pathtable.png
--titleTable titlenone
--darkDark mode (Discord-style)false
--columnsColumn order/subset (comma-separated)all
--headersCustom header names (comma-separated)column keys
--max-widthMaximum table width in pixels800
--font-sizeFont size in pixels14
--header-colorHeader background color#e63946
--no-stripeDisable alternating row colorsstriped
--alignColumn alignments: l,r,c (comma-separated)auto
--compactReduce paddingfalse
--rtlForce RTL layout (auto-detected)auto
--no-wrapDisable word wrapping (truncate)wraps
--max-linesMax lines per cell when wrapping3

* Provide data via --data, --data-file, or stdin.

Examples

Dark Mode + Emoji

node scripts/table.mjs \
  --data-file skills.json \
  --title "🏆 Agent Leaderboard" \
  --dark --output leaderboard.png

Hebrew RTL (auto-detected)

node scripts/table.mjs \
  --data-file hebrew.json \
  --title "הצוות" \
  --dark --output team.png

Testing

cd scripts && node table.test.mjs

37 tests covering: generation, dark/light mode, titles, compact, stdin, data-file, RTL, word wrapping, emoji, column alignment, error handling, and edge cases.

CI runs on Node 18, 20, and 22 via GitHub Actions.

ClawHub

clawhub install table-image-generator

License

MIT