{"_id":"charts-cli","_rev":"4-215a169eb05c2a183a759875b37203c5","name":"charts-cli","dist-tags":{"latest":"0.3.1"},"versions":{"0.1.0":{"name":"charts-cli","version":"0.1.0","keywords":["chart","charts","svg","png","cli","bar-chart","line-chart","pie-chart","echarts","visualization","data-visualization"],"author":{"name":"miclivs"},"license":"MIT","_id":"charts-cli@0.1.0","maintainers":[{"name":"miclivs","email":"livsmichael@gmail.com"}],"homepage":"https://github.com/michaelliv/charts-cli#readme","bugs":{"url":"https://github.com/michaelliv/charts-cli/issues"},"bin":{"charts":"src/main.ts"},"dist":{"shasum":"1fa740b68d8b0cb52aca3d1ef5dac4b284f4e5fa","tarball":"https://registry.npmjs.org/charts-cli/-/charts-cli-0.1.0.tgz","fileCount":27,"integrity":"sha512-ySiyp6IUow4G1ZjnczGyzwYD9urW3HQu/k8bsESaNwnatdgvDg2zId1FfVYzVzQ6ciCvpFwZQbkaFay6Eim2qw==","signatures":[{"sig":"MEYCIQCK6m4FVm0abWSh9An3M8QeLaT2RagHOLzATSjCthPZJgIhAJvJOWqbNtWNy2lt18JPtQqk7fsiJjHK9O6N/NGniKR3","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":58591},"type":"module","scripts":{"dev":"bun run src/main.ts","lint":"biome check src/","format":"biome format --write src/"},"_npmUser":{"name":"miclivs","email":"livsmichael@gmail.com"},"repository":{"url":"git+https://github.com/michaelliv/charts-cli.git","type":"git"},"_npmVersion":"11.4.2","description":"Generate SVG/PNG charts from the command line — bar, line, pie, scatter, radar, and more","directories":{},"_nodeVersion":"24.4.1","dependencies":{"chalk":"^5.4.1","echarts":"^5.5.1","commander":"^14.0.0","@resvg/resvg-js":"^2.6.2"},"_hasShrinkwrap":false,"devDependencies":{"bun-types":"^1.1.34","@biomejs/biome":"^1.9.4"},"_npmOperationalInternal":{"tmp":"tmp/charts-cli_0.1.0_1770470894716_0.09697484140726598","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"charts-cli","version":"0.2.0","keywords":["chart","charts","svg","png","cli","echarts","render","schema","agent","ai","visualization"],"author":{"name":"miclivs"},"license":"MIT","_id":"charts-cli@0.2.0","maintainers":[{"name":"miclivs","email":"livsmichael@gmail.com"}],"homepage":"https://github.com/michaelliv/charts-cli#readme","bugs":{"url":"https://github.com/michaelliv/charts-cli/issues"},"bin":{"charts":"dist/main.js"},"dist":{"shasum":"20c9a75d176b49cd952e6c0e78bd377ee23786b0","tarball":"https://registry.npmjs.org/charts-cli/-/charts-cli-0.2.0.tgz","fileCount":44,"integrity":"sha512-zXsyKrLtn+1GQM6bC9GKKw4XwPxorBQRDo/sW9o+O/YZgl6/Kf6FIia1uvtSHyN+cwYmEVrkf1HOASc/He8LOQ==","signatures":[{"sig":"MEQCIFBD4kZLY383s71CszLo0mEFHvNK/89lv/vLgqw6GZ+jAiB0ObJPQIdlZE78TmPldcGFNvg9zS1UWm6fS0xZM/Izzg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":173260},"type":"module","gitHead":"e4244657544874b465ac36ca6403ee7c0a6ec55a","scripts":{"dev":"node --import tsx src/main.ts","lint":"biome check src/","build":"tsc && mkdir -p dist/schemas/generated && cp src/schemas/generated/*.json dist/schemas/generated/ && cp src/themes/*.json dist/themes/","format":"biome format --write src/","prepublishOnly":"npm run build","generate:schema":"bun run src/schemas/generate.ts"},"_npmUser":{"name":"miclivs","email":"livsmichael@gmail.com"},"repository":{"url":"git+https://github.com/michaelliv/charts-cli.git","type":"git"},"_npmVersion":"10.9.4","description":"Render ECharts configurations to SVG/PNG from the command line — schema-driven, built for AI agents","directories":{},"_nodeVersion":"22.22.0","dependencies":{"chalk":"^5.4.1","echarts":"^5.5.1","commander":"^14.0.0","@resvg/resvg-js":"^2.6.2"},"_hasShrinkwrap":false,"devDependencies":{"bun-types":"^1.1.34","typescript":"^5.9.3","@biomejs/biome":"^1.9.4","typescript-json-schema":"^0.67.1"},"_npmOperationalInternal":{"tmp":"tmp/charts-cli_0.2.0_1771458857377_0.007797001449080909","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"charts-cli","version":"0.3.0","keywords":["chart","charts","svg","png","cli","echarts","render","schema","agent","ai","visualization"],"author":{"name":"miclivs"},"license":"MIT","_id":"charts-cli@0.3.0","maintainers":[{"name":"miclivs","email":"livsmichael@gmail.com"}],"homepage":"https://github.com/michaelliv/charts-cli#readme","bugs":{"url":"https://github.com/michaelliv/charts-cli/issues"},"bin":{"charts":"dist/main.js"},"dist":{"shasum":"8ad886f564e8f96b71474357dc7e125521573556","tarball":"https://registry.npmjs.org/charts-cli/-/charts-cli-0.3.0.tgz","fileCount":48,"integrity":"sha512-uQGNzxf0D9a637a7nYtkuh9HuiID79IBS3eO7G+h52jfb2kINBsAqLclyIwESUFQ7w3p+3APviTaEWB6sdFotw==","signatures":[{"sig":"MEYCIQCbHsWXH1ZZIjxwLUkWsMQ3ukAUaSa5xi1f4ZY+MJbr2QIhAMv1j5VPlNYTbFO0Q+SdX4IHILJ1a2HCjpf76yx1QQ9o","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":175590},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":"./dist/index.js"},"gitHead":"d4243f7f0198a83e1559f9dac000d0d8aaffa3ad","scripts":{"dev":"node --import tsx src/main.ts","lint":"biome check src/","build":"tsc && mkdir -p dist/schemas/generated && cp src/schemas/generated/*.json dist/schemas/generated/ && cp src/themes/*.json dist/themes/","format":"biome format --write src/","prepublishOnly":"npm run build","generate:schema":"bun run src/schemas/generate.ts"},"_npmUser":{"name":"miclivs","email":"livsmichael@gmail.com"},"repository":{"url":"git+https://github.com/michaelliv/charts-cli.git","type":"git"},"_npmVersion":"10.9.4","description":"Render ECharts configurations to SVG/PNG from the command line — schema-driven, built for AI agents","directories":{},"_nodeVersion":"22.22.1","dependencies":{"chalk":"^5.4.1","echarts":"^5.5.1","commander":"^14.0.0","@resvg/resvg-js":"^2.6.2"},"_hasShrinkwrap":false,"devDependencies":{"bun-types":"^1.1.34","typescript":"^5.9.3","@biomejs/biome":"^1.9.4","typescript-json-schema":"^0.67.1"},"_npmOperationalInternal":{"tmp":"tmp/charts-cli_0.3.0_1774287539583_0.38382060583963074","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"charts-cli","version":"0.3.1","description":"Render ECharts configurations to SVG/PNG from the command line — schema-driven, built for AI agents","type":"module","main":"dist/index.js","exports":{".":"./dist/index.js"},"bin":{"charts":"dist/main.js"},"scripts":{"dev":"node --import tsx src/main.ts","build":"tsc && mkdir -p dist/schemas/generated && cp src/schemas/generated/*.json dist/schemas/generated/ && cp src/themes/*.json dist/themes/","prepublishOnly":"npm run build","generate:schema":"bun run src/schemas/generate.ts","lint":"biome check src/","format":"biome format --write src/"},"keywords":["chart","charts","svg","png","cli","echarts","render","schema","agent","ai","visualization"],"author":{"name":"miclivs"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/michaelliv/charts-cli.git"},"dependencies":{"@resvg/resvg-js":"^2.6.2","chalk":"^5.4.1","commander":"^14.0.0","echarts":"^5.5.1"},"devDependencies":{"@biomejs/biome":"^1.9.4","bun-types":"^1.1.34","typescript":"^5.9.3","typescript-json-schema":"^0.67.1"},"_id":"charts-cli@0.3.1","gitHead":"273eb1dcb0ca1dc64d7df49f2063c78b6f00268f","types":"./dist/index.d.ts","bugs":{"url":"https://github.com/michaelliv/charts-cli/issues"},"homepage":"https://github.com/michaelliv/charts-cli#readme","_nodeVersion":"22.22.1","_npmVersion":"10.9.4","dist":{"integrity":"sha512-hW0j6Fup+RNwyvMD2iLUJUdfL/ifqqwlRVXM6v4t01t2pwL9Pt9RrLz1vYOyTqzrPnOOyElXpg6H2/AO5/3BJg==","shasum":"9ff9a03269f6fa4e1e3e48753341788b2558dabd","tarball":"https://registry.npmjs.org/charts-cli/-/charts-cli-0.3.1.tgz","fileCount":50,"unpackedSize":177611,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC8WQjXR09eG3/7lNJwHCaVjd/mbOOhdtGdA0DO6sEtegIgWrZ9w0ERp2xo7gHdvgLjPEfJGF8mzkV41LdfcpEOVxw="}]},"_npmUser":{"name":"miclivs","email":"livsmichael@gmail.com"},"directories":{},"maintainers":[{"name":"miclivs","email":"livsmichael@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/charts-cli_0.3.1_1774288289984_0.2922412193810169"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-07T13:28:14.715Z","modified":"2026-03-23T17:51:30.292Z","0.1.0":"2026-02-07T13:28:14.862Z","0.2.0":"2026-02-18T23:54:17.538Z","0.3.0":"2026-03-23T17:38:59.728Z","0.3.1":"2026-03-23T17:51:30.189Z"},"bugs":{"url":"https://github.com/michaelliv/charts-cli/issues"},"author":{"name":"miclivs"},"license":"MIT","homepage":"https://github.com/michaelliv/charts-cli#readme","keywords":["chart","charts","svg","png","cli","echarts","render","schema","agent","ai","visualization"],"repository":{"type":"git","url":"git+https://github.com/michaelliv/charts-cli.git"},"description":"Render ECharts configurations to SVG/PNG from the command line — schema-driven, built for AI agents","maintainers":[{"name":"miclivs","email":"livsmichael@gmail.com"}],"readme":"# charts-cli 📊\n\n[![CI](https://img.shields.io/github/actions/workflow/status/Michaelliv/charts-cli/ci.yml?label=CI&color=brightgreen)](https://github.com/Michaelliv/charts-cli/actions/workflows/ci.yml) [![License](https://img.shields.io/badge/License-MIT-yellow)](https://opensource.org/licenses/MIT)\n\n**Chart generation CLI for agents.**\n\nFeed it an [ECharts](https://echarts.apache.org/) JSON config, get back SVG or PNG. No browser, no GUI, no fuss.\n\n---\n\n## Examples\n\n<p>\n  <img src=\"examples/bar.png\" width=\"400\" alt=\"Bar chart\">\n  <img src=\"examples/line.png\" width=\"400\" alt=\"Line chart\">\n</p>\n<p>\n  <img src=\"examples/pie.png\" width=\"400\" alt=\"Pie chart\">\n  <img src=\"examples/scatter.png\" width=\"400\" alt=\"Scatter plot\">\n</p>\n<p>\n  <img src=\"examples/radar.png\" width=\"400\" alt=\"Radar chart\">\n  <img src=\"examples/heatmap.png\" width=\"400\" alt=\"Heatmap\">\n</p>\n<p>\n  <img src=\"examples/funnel.png\" width=\"400\" alt=\"Funnel chart\">\n  <img src=\"examples/gauge.png\" width=\"400\" alt=\"Gauge chart\">\n</p>\n<p>\n  <img src=\"examples/sankey.png\" width=\"400\" alt=\"Sankey diagram\">\n  <img src=\"examples/dark-theme.png\" width=\"400\" alt=\"Dark theme\">\n</p>\n\n---\n\n## For Humans\n\nYou install it. Your agent does the rest.\n\n### Installation\n\n```bash\nnpm install -g charts-cli\n```\n\n### Setup\n\n```bash\n# Teach your agent how to use charts\ncharts onboard\n```\n\nThis adds instructions to your `CLAUDE.md` or `AGENTS.md` file. Done.\n\n### Themes\n\nBuilt-in themes: `dark`, `vintage`, or pass a path to a custom JSON theme file.\n\n```bash\necho '{...}' | charts render --theme dark -o chart.png\n```\n\n---\n\n## For Agents\n\n### 1. Get the Schema\n\n```bash\n# What chart types are available?\ncharts schema --list\n\n# Get the schema for what you need\ncharts schema bar\ncharts schema xAxis\ncharts schema tooltip\ncharts schema              # Full EChartsOption (top-level keys)\n```\n\nAvailable types:\n\n- **Series**: bar, line, pie, scatter, radar, funnel, gauge, treemap, boxplot, heatmap, candlestick, sankey\n- **Components**: title, tooltip, grid, xAxis, yAxis, legend, dataZoom, visualMap, toolbox, dataset, radar-coord, polar, geo\n\n### 2. Render\n\n```bash\n# From stdin\necho '{\n  \"xAxis\": { \"type\": \"category\", \"data\": [\"Mon\", \"Tue\", \"Wed\"] },\n  \"yAxis\": { \"type\": \"value\" },\n  \"series\": [{ \"type\": \"bar\", \"data\": [120, 200, 150] }]\n}' | charts render -o chart.png\n\n# From file\ncharts render --config option.json -o chart.svg\n```\n\n### Render Options\n\n| Option | Description |\n|--------|-------------|\n| `--config <file>` | JSON file with ECharts option |\n| `-o, --output <file>` | Output file (default: stdout) |\n| `-W, --width <n>` | Width in pixels (default: 800) |\n| `-H, --height <n>` | Height in pixels (default: 400) |\n| `--theme <name>` | `dark`, `vintage`, or path to JSON theme |\n| `--format <type>` | `svg` or `png` (auto-detected from extension) |\n\n### Output\n\n- No `-o` sends SVG to stdout (pipeable)\n- `-o chart.svg` writes SVG\n- `-o chart.png` or `--format png` writes PNG\n\n---\n\n## FAQ\n\n**Q: Why not just have the agent write a Python script with matplotlib?**\n\nBecause that's a whole runtime, dependencies, and 50 lines of code for a bar chart. This is one pipe.\n\n**Q: Why ECharts?**\n\n30+ chart types, deep customization, great docs, and agents already know the config format from training data. The schema command fills in the gaps.\n\n**Q: What if the agent generates invalid JSON?**\n\nECharts is forgiving. Missing fields get defaults. The agent gets the chart (maybe not perfect) and can iterate.\n\n---\n\n## Development\n\n```bash\nbun install\nbun run src/main.ts --help\n\n# Regenerate schemas from ECharts types\nbun run generate:schema\n```\n\n---\n\n## License\n\nMIT\n","readmeFilename":"README.md"}