ForgeGraph
Fast, consistent, publication-quality graphs from pandas DataFrames, useable by people and AI agents.
You describe a graph in a GraphSpec. ForgeGraph draws it in a house style set by a theme and a format. It checks what it drew, and records how the graph was made inside the saved file. An agent skill lets agents make and revise graphs the same way.
Key Features
- Themes: fixes the look of the graph (fonts, palette, lines, keys, etc.).
- Formats: sets the destination: figure size, base font size, file types and resolution, e.g. a slide, a journal column or a dashboard tile.
- GraphTypes: defines the type of graph and its parameters. E.g.
xy(lines, markers and bars). - Layers: features drawn over a graph. E.g. reference lines, notes, & error bars.
- GraphSpecs: specify the data, theme, format, and all customizable properties.
- Layouts: combine multiple graphs into a larger figure or multi-tab dashboard.
- Scheduled renders: re-render graphs and dashboards on a schedule set with cron, launchd, or by an agent.
- Provenance: every saved file contains its specifications as metadata, enabling inspection of how the graph was made and reproduction of it.
- Packs: collect together a set of themes and formats for different use cases. E.g. a company or lab’s standard style, journal requirements, etc.
- Configs: control which packs may be used, per user or folder. Used to enforce use of style pack(s) and watermark non-standard graphs.
- Lint: Graphs are linted on rendering, with warnings for issues including overlapping or clipped text, a key covering data, or fonts too small.
Status: 0.x. xy graph type (lines, markers, & bars), reference lines, error bars, and notes layers, initial style packs. More graph types coming soon. If there’s specific ones you want, open an issue.
Install
ForgeGraph needs Python 3.12 or later.
pip install forgegraph
For the forgegraph command on its own, uv tool install forgegraph works too. To install the skill for Claude Code:
forgegraph skill install
For another agent, give the folder it reads skills from:
forgegraph skill install --dest <skills folder>
Then ask your agent for a graph: the skill takes it from your data to a finished graph, saving the GraphSpec beside it.
Quick start
In Python:
import pandas as pd
import forgegraph as fg
runs = pd.DataFrame({
"hours": [0, 1, 2, 3, 0, 1, 2, 3],
"voltage": [0.72, 0.71, 0.70, 0.69, 0.73, 0.73, 0.72, 0.72],
"cell": ["A", "A", "A", "A", "B", "B", "B", "B"],
})
g = fg.xy(runs, x="hours", y="voltage", color="cell", title="Cell voltage")
g.save("voltage") # voltage.png, with its GraphSpec inside
From the command line, with the DataFrame saved as runs.parquet and a GraphSpec, voltage.yaml:
name: voltage
version: 0
description: Cell voltage over a test, one line per cell.
extends: None
fixed_parameters: None
variable_parameters:
specifications:
graph_type: xy
theme: forgegraph_base/base_theme
format: forgegraph_base/base_format
text:
title: Cell voltage
data:
file: runs.parquet
preprocessing: None
axis:
x:
data:
column: hours
y:
data:
column: voltage
encoding:
color: cell
forgegraph render voltage.yaml
Packs and configs
Every named theme, format, GraphSpec, layout and schedule comes from a pack, a folder or pip package of specs, and is named pack/name. The initial built-in packs are forgegraph_base and forgegraph_base_2, stored in src/forgegraph/packs.
A config lists the packs that may be used:
- The main config,
~/.config/forgegraph/config.toml(or the fileFORGEGRAPH_CONFIGnames), applies to all work. ForgeGraph writes it, listing the built-in packs, the first time a command reads the configs, such ascatalogorrender. - A folder config,
forgegraph.toml, applies to the files in its folder and every folder below it. A file may use only the packs it lists. - A pack that a folder config lists but the main config doesn't still works, but it's non-standard: graphs drawn with it are watermarked, and ForgeGraph's commands say so. That way you can make and try a pack without changing an organization's main config.
Commands
forgegraph render <graphspec or layout>: draw and save, and report lint.forgegraph explain <graphspec or layout>: every value it's drawn with, and which file set it.forgegraph catalog: the packs, graph types, layer types, themes, formats and reference notes available here.forgegraph schema graphspec --graph-type <type> --theme <theme> --format <format>: every parameter a GraphSpec can set.forgegraph schema <kind>: every parameter of a theme, format, layer, layout, schedule, pack or config.forgegraph pack-notes: the reference notes of the packs available here.forgegraph load <file>: a saved graph's record, and its GraphSpec.forgegraph job run <schedule>: render a schedule's GraphSpecs and layouts once.forgegraph skill install: install the agent skill.
Every command takes --help, and --json for agents.
Catalogs
Each pack in this repository has a catalog: a page with a card for each parameter, showing what changing it does.
- forgegraph_base: ForgeGraph's own pack, with its graph types and layer types.
- forgegraph_base_2: its own theme and format, and the same graph types and layer types drawn in them.
Your graphs are yours
ForgeGraph is MIT-licensed. Graphs and other output you make with it are yours: no attribution or licence terms apply to them. See TRADEMARKS.md for use of the name.
Documentation
- Architecture: how ForgeGraph is designed, and why.
- Decisions: decisions that refine the architecture.
- Specifications: every spec, a folder per kind.
- Changelog.
- Build plan: how ForgeGraph is being built, phase by phase.
Contributing
Feature requests and bug reports go to GitHub issues; the skill can file them for you. CONTRIBUTING.md covers working on ForgeGraph itself. In short:
uv sync && uv run pre-commit install
uv run pytest --full && uv run ruff check . && uv run pyright
Repository map
- src/forgegraph/: the package.
graph.py: the Python API (fg.xy,fg.render,fg.graphspec,fg.load) and theGraphobject;canvas.py: the themed canvas.- cli/: the
forgegraphcommand. - spec/: reading, checking and resolving specs, and the provenance record.
- drawing/: drawing, layout and lint. layouts/: layouts. jobs/: scheduled renders.
- packs/: packs and configs, and the built-in packs
forgegraph_baseandforgegraph_base_2. fonts/: bundled fonts and their licences. - graph_types/, layers/: the graph type and layer type definitions. catalog/, catalogs/: the catalog builder, and each definition's catalog file.
- skill/forgegraph/: the agent skill.
- catalog/: the generated catalog pages.
- examples/: sample data, and
packs/acme, an example pack in a deliberately different style. - evals/skill/: the skill's eval cases, run by
scripts/run_skill_evals.py. - tests/, scripts/: tests, and build and maintenance scripts.
- docs/: the documents above. review/: each build phase's review pages.
Metadata
Release files for forgegraph 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| forgegraph-0.2.0.tar.gz | 3.2 MB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| forgegraph-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.6 MB
Release files / forgegraph-0.2.0.tar.gz
| Download URL | forgegraph-0.2.0.tar.gz |
|---|---|
| Size | 3.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b66d034e05b7c16e4f3c58e9f6892fcbe5eb2f9e78433f20763b590cfb50fbf6
|
|
BLAKE2b-256 checksum How to use checksums |
23f216906ff50f5309a041ad271d734b1eda19e2f6898d64cba7fa14ee0ce47a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 24, 2026.
Transparency logRelease files / forgegraph-0.2.0-py3-none-any.whl
| Download URL | forgegraph-0.2.0-py3-none-any.whl |
|---|---|
| Size | 2.3 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4bcd793b3d98b769bafedb0ebf47745d2d4dcaefb0882a16bda50f28f14a6836
|
|
BLAKE2b-256 checksum How to use checksums |
b2699f4ee277916e958fdbaa5e11357de61849058064c67e8ed2cc60e27ae85d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 24, 2026.
Transparency logSecurity for forgegraph 0.2.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
All 2 files in this release have been uploaded with provenance metadata.
Attestation for forgegraph-0.2.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 Oct 24, 2026.
Transparency logA 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.