Skip to main content

jigstore

ci license: MIT Sponsor Buy me a coffee

Ready-made tools for AI agents. In a workshop, a jig lets you repeat a precise job every time without redoing the setup. Jigstore does the same for agents: instead of having a model generate an SVG, a chart script or a document token by token, the agent writes a short spec and a deterministic tool does the rest. The output is the same every time, the model writes about 20 times fewer tokens, and the result arrives in under a second instead of 5 to 30 seconds of streaming.

Each tool is a jig in this catalog.

jig what it does
chart 12 chart types (bar, line, area, scatter, pie, donut, histogram, waterfall, funnel, heatmap, sparkline) from JSON to SVG or PNG
table Rows, or a CSV/JSON file, to Markdown, SVG, PNG, HTML or CSV, with totals, subtotals, formats, sorting, color rules and in-cell bars and sparklines
qr Text, a URL or Wi-Fi details to a scannable QR code, SVG or PNG
timeline Tasks with dates to a Gantt chart or roadmap, with groups, progress, milestones and a today marker

Install

pip install jigstore
# PNG output: adds resvg, a self-contained wheel (no system libraries) for Linux, macOS and Windows
pip install "jigstore[png]"

No runtime dependencies. Python 3.10+.

Chart builder

jigstore chart '{"type":"bar","title":"Revenue by region","data":{"North":1240000,"South":905000,"East":1530000,"West":712000},"prefix":"$"}' -o revenue.png
# prints: revenue.png

bar

The CLI prints only the output path, so the result costs the agent a few tokens. Errors are one line on stderr that say what to fix, with exit code 2.

From Python:

from jigstore.chart import render, save

svg = render({"type": "donut", "data": {"Compute": 48, "Storage": 15}})
save({"type": "line", "x": ["Q1", "Q2"], "series": {"Web": [3, 5]}}, "out.png")

Sparkline, for tables and text:

Specs for every chart above are in examples/specs.json.

Options that tell a story

Option Example What it does
highlight "highlight": "East" Keeps one category in color and greys out the rest
refs "refs": [{"value": 1000, "label": "Target"}] Dashed reference line with a label
stack "stack": "percent" 100% stacked bars or areas
curve "curve": "smooth" or "step" Smooth lines that never overshoot the data, or steps
ymin, ymax "ymin": 0 Fix the value axis
legend "legend": "bottom" top, bottom or none
palette "palette": "colorblind" default, colorblind (Okabe-Ito), mono, warm, cool
decimals, grid, font "decimals": 1, "grid": false Number format, gridlines, font family
y2 "y2": "Margin", "y2suffix": "%" Draws that series as a line against a second axis on the right (bar and line charts)
scale "scale": "log" Log scale for data that spans several orders of magnitude (bar, line, scatter)
from "from": "sales.csv", "x": "Month", "y": ["Revenue", "Cost"] Reads the columns from a CSV or JSON file instead of typing the data
numbers "numbers": "indian" Lakh and crore: ₹12.4L, ₹1.2Cr, 12,34,567
dates "x": ["2026-01-05", "2026-02-02"] ISO dates make a time axis: points are spaced by time and ticks fall on round dates. "xtype": "category" turns it off

What it handles for you

  • Round axis ticks and compact numbers ($1.5M, 40K, 12%), or lakh and crore with "numbers": "indian".
  • Labels that fit: long category names are rotated or shortened, crowded axes skip labels.
  • Pie slices beyond 8 are grouped into "Other". Slice and cell labels pick black or white text for contrast.
  • Gaps in line data (null) break the line instead of dropping to zero.
  • Light and dark themes, colorblind-friendly palettes, accessible <title>.
  • Small output: most example SVGs are 2 to 4 KB with no scripts or external fonts.
  • Errors an agent can act on: a misspelled option or column gets a "did you mean" (unknown option "colour"; did you mean "colors"?), and unknown options are errors rather than silently ignored.
  • Safe with untrusted specs: text is escaped and colors are validated. See SECURITY.md.

Tokens and time

Tokens are estimated as characters / 4. "By hand" is what a model would write to produce the same chart itself. Time assumes 50 to 100 output tokens a second; rendering takes about 0.1 ms and is left out. Run python scripts/build_examples.py to reproduce.

chart spec tokens SVG by hand saved time by hand time with a spec
bar 37 553 94% 5.5 to 11 s 0.4 to 0.7 s
line 49 896 95% 9 to 18 s 0.5 to 1 s
waterfall 44 827 95% 8.3 to 17 s 0.4 to 0.9 s
heatmap 50 1,586 97% 16 to 32 s 0.5 to 1 s
pie 29 586 96% 5.9 to 12 s 0.3 to 0.6 s

Writing matplotlib code instead usually takes 150 to 400 tokens of code, plus a heavy install and a second round trip when the code fails.

Table jig

jigstore table '{"from":"q3.csv","total":{"Region":"Total","Revenue":"sum"}}'   # prints Markdown
jigstore table @spec.json -o q3.png                                              # or .svg .html .csv .md

revenue table scorecard table

Why an agent would use it rather than write a Markdown table itself:

  • It reads the data from a file. "from": "q3.csv" (or .json) means the agent never retypes rows it already saved from a query: 17 tokens instead of about 200 for a 20-row table, and no copying mistakes. Only the CLI and the local MCP server read files, and only inside the working folder (or JIGSTORE_OUT_DIR).

  • Numbers come out right. Totals, averages, sorting and rounding are computed, not guessed. Each column uses one unit ($0.91M, $1.24M) so values line up.

  • It renders where Markdown doesn't. Slack and most email clients don't show Markdown tables. PNG and inline-styled HTML do. Writing that HTML by hand costs 750 to 2,350 tokens in the examples; the spec costs 78 to 111.

  • Safe output. Text is escaped in every format, and CSV cells that start with =, +, - or @ are neutralised so spreadsheets don't run them as formulas.

  • Report tables, not just grids. "group": "Region" adds a subtotal row after each region. Column rules color cells by value ({"below": 0, "color": "#dc2626"}), and "wrap": true wraps long text onto several lines in images instead of cutting it.

Percentages are written as whole or decimal numbers (12, 95.5) and shown with 2 decimals unless decimals says otherwise. Images show 25 rows by default (max_rows up to 200); Markdown, HTML and CSV keep up to 1,000.

Timeline jig

jigstore timeline @plan.json -o plan.png
jigstore timeline '{"from":"plan.csv","today":"2026-02-10"}' -o plan.svg   # columns name,start,end,group,owner,progress

timeline

Tasks need a name plus start and end (inclusive; 2026-03 means the whole month), or a date for a milestone. group gives each group a band and a color, progress shades the done part of a bar, owner is written next to it, and today and markers draw vertical lines. Nothing reads the clock: "today" is the date in the spec, so the same spec always gives the same image. The example spec is about 210 tokens; the SVG it replaces is about 1,030, and the layout math is where models usually go wrong.

QR jig

jigstore qr '{"url":"https://github.com/jigstore/jigstore","label":"github.com/jigstore"}' -o qr.png
jigstore qr '{"wifi":{"ssid":"Office","password":"...","type":"WPA"}}' -o wifi.png

qr code

A model can't draw a working QR code: every module depends on error correction that has to be computed. Agents usually have to install a library and write code for it. With the jig the spec is about 15 tokens. The encoder is pure Python with no dependencies, covers all 40 QR versions and the four error correction levels, and picks the smallest code that fits. CI decodes a code of every version and level with an independent reader (zxing-cpp). Wi-Fi codes escape ;, ,, :, " and \ in the network name and password, which is easy to get wrong by hand.

Using it from an agent

Shell access (cheapest). Copy docs/agent-prompt.md into your agent's instructions, or let the agent run jigstore docs chart or jigstore docs table when it needs the spec format (about 250 tokens each). Nothing is loaded into context until it's used.

MCP. Add the server to any MCP client (Claude, Kiro, Cursor, VS Code and others):

{
  "mcpServers": {
    "jigstore": {
      "command": "uvx",
      "args": ["jigstore", "mcp"],
      "env": { "JIGSTORE_OUT_DIR": "/path/to/charts" }
    }
  }
}

The server exposes one jig tool for every jig, so its schema stays about 145 tokens per turn however many jigs exist. The full spec format of a jig is returned only when a call fails, so it costs nothing while the model gets specs right. Arguments: jig (chart or table), spec, out (a file path whose extension picks the format), and view: true to also get a PNG back so the model can check the result. A table with no out comes back as Markdown text. When JIGSTORE_OUT_DIR is set, files are read and written only inside it.

The server has no dependencies and supports both the 2026-07-28 stateless MCP protocol and the older initialize handshake (2024-11-05 to 2025-11-25).

Adding a jig

Each jig lives in src/jigstore/<name>/ with a USAGE.md of 300 tokens or less and one entry in the registry (src/jigstore/registry.py). The CLI, the MCP server and the hosted service pick it up from there. You can also publish a jig as your own package through the jigstore.jigs entry point; jigstore list shows it next to the built-in jigs. See CONTRIBUTING.md.

Support the project

Jigstore is built and maintained by one person. If it saves your agents tokens, you can sponsor it on GitHub or buy me a coffee. Bug reports, tool ideas and pull requests help just as much.

License

MIT

Metadata

Release files for jigstore 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jigstore 0.3.0
File Size Uploaded Provenance Actions
jigstore-0.3.0.tar.gz 79.9 kB With provenance Details for jigstore-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for jigstore 0.3.0
File Interpreter ABI Platform Actions
jigstore-0.3.0-py3-none-any.whl Python 3 none any Details for jigstore-0.3.0-py3-none-any.whl

Total release size: 145.6 kB

Release files / jigstore-0.3.0.tar.gz

Download URL jigstore-0.3.0.tar.gz
Size 79.9 kB
Tags Source
SHA-256 checksum
How to use checksums
871e9b9b70cdfe1394906d679c8fd67af179479b9c47dcada91f714f0fdf86d4
BLAKE2b-256 checksum
How to use checksums
b90dbe2552badd3761a04b1bd75b3d0ffc10b2686b70920628b0552370d62083
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.

Transparency log

Release files / jigstore-0.3.0-py3-none-any.whl

Download URL jigstore-0.3.0-py3-none-any.whl
Size 65.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
787e79ba93344630fac5509a4817fc5faef38a5f715204fd380c8a5c0d2c7715
BLAKE2b-256 checksum
How to use checksums
835442c1d0f7b86feb5128561c1e09c69987eebb1e3972756e02b99623ea2ce8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.

Transparency log

Security for jigstore 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for jigstore-0.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page