Get started
Introduction
Culm is a local JavaScript framework for building static websites with an agent. A site is an editable document. The agent writes custom sections, Culm validates the changes, and the compiler produces HTML and CSS. Pages need no framework runtime or hydration.
Start a site from this checkout
Requires Node.js 22.18 or later. From the repository root:
npm ci
npm run pack:all
node packages/tools/bin/culm.js init my-site --from .pack
cd my-site
npm install
npx culm devinit writes a blank one-page site with the default look and no plug-in. dev previews it locally and reloads on save. Run npx culm check to validate and measure pages in Chrome, or npx culm build in the site folder to write the site to dist/.
Benchmarks: Culm vs. Astro & GSAP
We benchmarked Culm against Astro 7.4.13 (ordinary CSS) across 4 editorial briefs and Culm Stage 3 Motion against Astro + GSAP 3.15.1 (ScrollTrigger) across 4 scroll/motion choreography briefs (codex-cli 0.171.0, gpt-6.1-terra, low reasoning, host skills disabled; 16 live sessions total, headless Chromium 156.0.8078.4).
Agentic Build Cost, Time & Runtime Performance (4 Briefs per Arm)
Measure
Functional passes (desktop & phone)
Culm (Static)
4/4
Astro 7.4.13 (Static)
4/4
Culm Motion (Stage 3)
4/4
Astro + GSAP 3.15.1
4/4
Measure
Motion + JS-off + reduced-motion gate
Culm (Static)
—
Astro 7.4.13 (Static)
—
Culm Motion (Stage 3)
4/4
Astro + GSAP 3.15.1
3/4
Measure
Total input tokens (4 sites)
Culm (Static)
483,591
Astro 7.4.13 (Static)
612,624
Culm Motion (Stage 3)
375,538
Astro + GSAP 3.15.1
402,260
Measure
↳ Fresh input tokens
Culm (Static)
52,999
Astro 7.4.13 (Static)
76,944
Culm Motion (Stage 3)
49,010
Astro + GSAP 3.15.1
27,092
Measure
↳ Cached input reads
Culm (Static)
430,592
Astro 7.4.13 (Static)
535,680
Culm Motion (Stage 3)
326,528
Astro + GSAP 3.15.1
375,168
Measure
Total output tokens (reasoning)
Culm (Static)
13,362 (101)
Astro 7.4.13 (Static)
21,224 (637)
Culm Motion (Stage 3)
12,689 (169)
Astro + GSAP 3.15.1
22,585 (518)
Measure
Agent build time (median / mean)
Culm (Static)
68.29 s / 75.19 s
Astro 7.4.13 (Static)
119.80 s / 120.41 s
Culm Motion (Stage 3)
71.13 s / 73.49 s
Astro + GSAP 3.15.1
114.81 s / 115.50 s
Measure
Cost (cache-aware, total / per site)¹
Culm (Static)
$0.1413 / $0.0353
Astro 7.4.13 (Static)
$0.2098 / $0.0524
Culm Motion (Stage 3)
$0.1288 / $0.0322
Astro + GSAP 3.15.1
$0.1588 / $0.0397
Measure
Cost (uncached, total / per site)²
Culm (Static)
$0.5504 / $0.1376
Astro 7.4.13 (Static)
$0.7188 / $0.1797
Culm Motion (Stage 3)
$0.4389 / $0.1097
Astro + GSAP 3.15.1
$0.5152 / $0.1288
Measure
Cost (frontier tier, total / per site)³
Culm (Static)
$0.3737 / $0.0934
Astro 7.4.13 (Static)
$0.5385 / $0.1346
Culm Motion (Stage 3)
$0.3310 / $0.0828
Astro + GSAP 3.15.1
$0.3873 / $0.0968
Measure
Refused MCP writes / Shell calls
Culm (Static)
5 / 0
Astro 7.4.13 (Static)
0 / 42
Culm Motion (Stage 3)
1 / 0
Astro + GSAP 3.15.1
0 / 27
Measure
Static CLI export (median)
Culm (Static)
0.220 s
Astro 7.4.13 (Static)
0.441 s
Culm Motion (Stage 3)
0.220 s
Astro + GSAP 3.15.1
0.420 s
Measure
Shipped raw JS bytes (median)
Culm (Static)
581 B
Astro 7.4.13 (Static)
0 B
Culm Motion (Stage 3)
8,768 B
Astro + GSAP 3.15.1
113,762 B
Measure
Brotli-5 wire transfer / HTTP reqs (median)
Culm (Static)
3,981 B (1)
Astro 7.4.13 (Static)
3,803 B (2)
Culm Motion (Stage 3)
8,154 B (1)
Astro + GSAP 3.15.1
47,537 B (3)
Measure
Desktop FCP / LCP / Load (1280×900, 1×)
Culm (Static)
24.0 / 24.0 / 8.3 ms
Astro 7.4.13 (Static)
40.0 / 40.0 / 8.4 ms
Culm Motion (Stage 3)
26.0 / 26.0 / 13.6 ms
Astro + GSAP 3.15.1
38.0 / 38.0 / 38.5 ms
Measure
Mobile FCP / LCP / Load (390×844, 4× CPU, 150ms RTT)
Culm (Static)
214.0 / 214.0 / 213.9 ms
Astro 7.4.13 (Static)
426.0 / 426.0 / 342.1 ms
Culm Motion (Stage 3)
218.0 / 218.0 / 224.8 ms
Astro + GSAP 3.15.1
442.0 / 442.0 / 588.0 ms
¹ Cache-aware rates (per 1M tokens): $1.00 fresh input, $0.05 cached read, $1.25 cache write, $5.00 output.
² Uncached sensitivity: $1.00 all input, $5.00 output.
³ Frontier tier: $2.50 fresh input, $0.25 cached read, $10.00 output.
Controlled Motion Engine Benchmark: Culm Stage 3 vs. GSAP 3.15.1 (ScrollTrigger)
Median of 5 cold Chromium runs per scene across identical layout geometry (native CSS view() opacity scroll, box 500 px enter-view travel, panel 900 px pinned scaleX scrub, type 10-letter masked stagger expo-out):
Scene
native
Engine / Tier
Culm (Tier-1 CSS view())
Raw JS
304 B
Brotli (Reqs)
2,282 B (1)
Mobile Load / Cold JS
204.6 / 0.72 ms
Sweep Script (Desk / Mob 4×)
1.53 / 1.00 ms
Sweep Layout (Desk / Mob)
0.00 / 0.00 ms
Heap (Desk / Mob)
1,075 / 1,075 KiB
Scene
native
Engine / Tier
GSAP 3.15.1 + ScrollTrigger
Raw JS
118,275 B
Brotli (Reqs)
46,443 B (3)
Mobile Load / Cold JS
575.0 / 19.45 ms
Sweep Script (Desk / Mob 4×)
8.88 / 8.92 ms
Sweep Layout (Desk / Mob)
0.29 / 0.13 ms
Heap (Desk / Mob)
1,826 / 1,827 KiB
Scene
box
Engine / Tier
Culm (Tier-2 WAAPI Host)
Raw JS
8,490 B
Brotli (Reqs)
6,675 B (1)
Mobile Load / Cold JS
212.5 / 4.21 ms
Sweep Script (Desk / Mob 4×)
0.72 / 1.26 ms
Sweep Layout (Desk / Mob)
0.05 / 0.04 ms
Heap (Desk / Mob)
1,223 / 1,223 KiB
Scene
box
Engine / Tier
GSAP 3.15.1 + ScrollTrigger
Raw JS
118,254 B
Brotli (Reqs)
46,569 B (3)
Mobile Load / Cold JS
571.4 / 16.97 ms
Sweep Script (Desk / Mob 4×)
5.81 / 5.79 ms
Sweep Layout (Desk / Mob)
0.00 / 0.00 ms
Heap (Desk / Mob)
1,811 / 1,824 KiB
Scene
panel
Engine / Tier
Culm (Tier-2 WAAPI Host)
Raw JS
8,490 B
Brotli (Reqs)
6,665 B (1)
Mobile Load / Cold JS
216.1 / 6.39 ms
Sweep Script (Desk / Mob 4×)
5.33 / 2.79 ms
Sweep Layout (Desk / Mob)
0.00 / 0.00 ms
Heap (Desk / Mob)
1,330 / 1,329 KiB
Scene
panel
Engine / Tier
GSAP 3.15.1 + ScrollTrigger
Raw JS
118,272 B
Brotli (Reqs)
46,495 B (3)
Mobile Load / Cold JS
593.3 / 27.72 ms
Sweep Script (Desk / Mob 4×)
7.84 / 8.84 ms
Sweep Layout (Desk / Mob)
0.36 / 0.95 ms
Heap (Desk / Mob)
1,951 / 1,946 KiB
Scene
type
Engine / Tier
Culm (Tier-2 WAAPI Host)
Raw JS
8,490 B
Brotli (Reqs)
6,667 B (1)
Mobile Load / Cold JS
210.0 / 3.65 ms
Sweep Script (Desk / Mob 4×)
6.15 / 20.62 ms
Sweep Layout (Desk / Mob)
0.19 / 0.81 ms
Heap (Desk / Mob)
1,299 / 1,299 KiB
Scene
type
Engine / Tier
GSAP 3.15.1 + ScrollTrigger
Raw JS
118,626 B
Brotli (Reqs)
46,598 B (3)
Mobile Load / Cold JS
574.2 / 20.45 ms
Sweep Script (Desk / Mob 4×)
10.73 / 6.34 ms
Sweep Layout (Desk / Mob)
0.00 / 0.00 ms
Heap (Desk / Mob)
2,345 / 2,344 KiB
(In the 16-site blind visual judging study with gpt-6.2-astra, Culm scored 17.875/20 mean vs. Astro's 19.375/20, winning 0 pairs, tying 2, and losing 6.)
See every per-brief measurement, screenshot gallery, and prior visual trial details →
Connect an agent
Configure a stdio MCP server in your agent host: command <site>/node_modules/.bin/culm, arguments ["mcp"], working directory the folder containing culm.json.
Tool
Purpose
Tool
describe
Purpose
Get the revision and pages; optionally request a small editable example.
Tool
write
Purpose
Apply up to 32 ordered JSON edits (insert, update, move, remove, theme, addPage, removePage, setPage); target chrome with `page: "header"
Tool
find
Purpose
List sections or look up the node to change.
Tool
measure
Purpose
Check the rendered layout in Chromium, including at phone width.
Tool
render
Purpose
Export a node, page section, or standalone visual spec as checked PNG, WebP or SVG.
Tool
build
Purpose
Export the checked site.
For example, this write appends a section to home. Replace baseRevision with the revision returned by describe.
{
"baseRevision": 0,
"page": "home",
"ops": [
{
"op": "insert",
"node": {
"kind": "column",
"id": "studio",
"children": [
{
"kind": "text",
"id": "studiotitle",
"level": "h1",
"text": "Open studio",
"style": { "size": 160 },
"phone": { "size": 62 }
},
{ "kind": "text", "text": "Visit us on Saturdays." }
]
}
}
]
}To change that title, send
{"op":"update","id":"studiotitle","text":"Studio hours"}in the next write at the returned revision. You can compose original sections from nodes, including paths, strokes and gradients; registered blocks are optional.
culm mcp --full exposes the general editing API, including source import (HTML/CSS, literal JSX and JSONC), catalogue, plan/apply, diff and restore. Existing integrations that call these tools directly should use --full. Programmatic createMcpServer hosts retain the full interface by default; pass jsonOps: true for the six authoring tools.
Live data, islands and packages
A site can also read from a web service in the browser, sign a visitor in, change pages in place, draw an island of JavaScript, and use a package another author wrote. Each is opt-in, and each has a stated limit; read them before you rely on one:
Live data and sign-in: a page marked "signed-in only" is still a public file.
Islands: an in-page island is trusted code that can read the sign-in key; a framed island can leak the rows it was granted, and WebRTC from a frame is open (measured in Chromium with the test driver's flags dropped; Safari and Firefox not run).
Packages: approval is disclosure, not a review, and the lock file needs code review. No MCP tool, flag, environment variable or pipe approves a package, but an agent with a shell and a pseudo-terminal could still type the package name, as it could edit culm.lock.json by hand.
The site policy: it limits what a page loads and sends, not where a link goes, and on GitHub Pages it is only a <meta>.
packages/tools/__browser__/cuj6.spec.tsruns a sample application (
packages/tools/__browser__/fixtures/app) through all of it in a real browser.
Packages and documentation
@culmjs/core: document model, validation, operations and deterministic static compilation.
@culmjs/tools: CLI, folder storage, dev server, browser measurement and MCP authoring reference.
Reading: with features.llms, the build writes llms.txt and a Markdown twin of each page. On for new projects, off for existing ones.
@culmjs/webmcp: experimental; offers a page's declared tools to the browser. Proved only in Chromium launched with --enable-features=WebMCPTesting.
@culmjs/surface: experimental; draws a one-page Culm document in part of a product's own page and changes it with checked operations (behaviour reference). Server and client mode. Proved only in Chromium.
Development
Run npm test, npm run typecheck, npm run lint and npm run format-check. npm run test:browser runs the browser integration suite; set CULM_CHROME if Chromium is not automatically found. npm run check:layers and npm run check:terms validate the core package boundaries.
Next