ggsvelte is a fast agent-native implementation of the layered grammar of graphics, inspired by ggplot2.
Documentation · Examples · Getting started
bun add @ggsvelte/svelte
# or: npm install @ggsvelte/svelteRequires Node.js 22+ and Svelte 5.33.1+. CI covers npm, pnpm, and Bun on Ubuntu and Windows.
- Skill:
@ggsvelte/skill— install from npm, then copynode_modules/@ggsvelte/skillinto your agent's skills dir asggsvelte/(dependabot surfaces version bumps for bundled copies). In-tree source:packages/skill/SKILL.md - Schema:
schema/v0.json - Corpus:
llms.txt·llms-full.txt validate()errors are{ code, path, message, fix }with a machine-applicablefix.example
| Package | Surface |
|---|---|
@ggsvelte/svelte |
Svelte 5 components, re-exports |
@ggsvelte/spec |
PortableSpec types, JSON Schema, validate/normalize, fluent builder |
@ggsvelte/core |
Pipeline, headless SVG, canvas, hit testing |
@ggsvelte/cli |
ggsvelte-render CLI: validate + render specs in agent sandboxes |
@ggsvelte/skill |
Agent skill (SKILL.md + references) teaching the grammar |
| Capability | ggsvelte | SveltePlot | Unovis | LayerCake |
|---|---|---|---|---|
| Bundle size (min+gzip, 1k scatter app) | ✅ 109 KB | ✅ 80 KB | ✅ 41 KB | |
| API stability | ✅ v1.6 | ✅ v10 | ||
| Headless server-side SVG (no DOM) | ✅ | ❌ empty shell | ❌ client onMount |
ssr flag |
| Portable JSON spec + schema | ✅ | ❌ | ❌ | ❌ |
| CLI validator + renderer | ✅ | ❌ | ❌ | ❌ |
| Agent skill | ✅ | ❌ | ❌ | ❌ |
| Automatic temporal detection | ✅ | ❌ | ❌ | |
| Built-in interactions | ✅ | ❌ | ||
| ggplot2 API | ✅ | ❌ | ❌ | ❌ |
| Scale, axis & coord control | ✅ | ✅ | ✅ |
Pre-1.0. Package manifests are the version source of truth. Lifecycle and
compatibility contracts live in lifecycle.json and the
lifecycle guide.
See CONTRIBUTING.md.