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

charts-cli

v0.2.0

Published

Render ECharts configurations to SVG/PNG from the command line — schema-driven, built for AI agents

Readme

charts-cli 📊

CI License

Chart generation CLI for agents.

Feed it an ECharts JSON config, get back SVG or PNG. No browser, no GUI, no fuss.


Examples


For Humans

You install it. Your agent does the rest.

Installation

npm install -g charts-cli

Setup

# Teach your agent how to use charts
charts onboard

This adds instructions to your CLAUDE.md or AGENTS.md file. Done.

Themes

Built-in themes: dark, vintage, or pass a path to a custom JSON theme file.

echo '{...}' | charts render --theme dark -o chart.png

For Agents

1. Get the Schema

# What chart types are available?
charts schema --list

# Get the schema for what you need
charts schema bar
charts schema xAxis
charts schema tooltip
charts schema              # Full EChartsOption (top-level keys)

Available types:

  • Series: bar, line, pie, scatter, radar, funnel, gauge, treemap, boxplot, heatmap, candlestick, sankey
  • Components: title, tooltip, grid, xAxis, yAxis, legend, dataZoom, visualMap, toolbox, dataset, radar-coord, polar, geo

2. Render

# From stdin
echo '{
  "xAxis": { "type": "category", "data": ["Mon", "Tue", "Wed"] },
  "yAxis": { "type": "value" },
  "series": [{ "type": "bar", "data": [120, 200, 150] }]
}' | charts render -o chart.png

# From file
charts render --config option.json -o chart.svg

Render Options

| Option | Description | |--------|-------------| | --config <file> | JSON file with ECharts option | | -o, --output <file> | Output file (default: stdout) | | -W, --width <n> | Width in pixels (default: 800) | | -H, --height <n> | Height in pixels (default: 400) | | --theme <name> | dark, vintage, or path to JSON theme | | --format <type> | svg or png (auto-detected from extension) |

Output

  • No -o sends SVG to stdout (pipeable)
  • -o chart.svg writes SVG
  • -o chart.png or --format png writes PNG

FAQ

Q: Why not just have the agent write a Python script with matplotlib?

Because that's a whole runtime, dependencies, and 50 lines of code for a bar chart. This is one pipe.

Q: Why ECharts?

30+ chart types, deep customization, great docs, and agents already know the config format from training data. The schema command fills in the gaps.

Q: What if the agent generates invalid JSON?

ECharts is forgiving. Missing fields get defaults. The agent gets the chart (maybe not perfect) and can iterate.


Development

bun install
bun run src/main.ts --help

# Regenerate schemas from ECharts types
bun run generate:schema

License

MIT