Folder sites

The folder

A folder site is a Culm site kept as a folder of JSON files. A person edits the files in any editor. An agent changes them through the MCP server. @culmjs/tools loads the folder into the canonical document, writes changes back into the same files, serves the site while you edit, builds it, and measures it in a browser.

Every error and every measure finding on a folder site names a file and a line.

This page is the reference for the folder and its files. For the agent side, see mcp.md. For the document model underneath, see overview.md.

The folder

my-site/
  culm.json plug-in package names, output folder
  site.json name, look, styles, fonts, languages, header, footer
  pages/*.json one page per file
  pieces/**/*.json reusable subtrees with named settings
  blocks/*.json blocks written as data
  data/<source>.json rows for a data source
  islands/<name>.js an island's module, and <name>.json its descriptor (see app/islands.md)
  packages/<name>/ a package, copied by `culm add` and approved by a person (see app/packages.md)
  culm.lock.json what each package is, and whether a person approved it
  assets/ files the pages use (copied to assets/ in the output)
  fonts/ font files (copied to _fonts/ in the output)
  .culm/ Culm's own record; not edited by hand

A project is a folder with a culm.json⁠. Every culm command run outside one stops with one problem that names culm.json⁠.

All files are JSONC: JSON with comments. Culm keeps your comments, key order and indentation when it writes (see "What is kept when Culm writes").

culm init <folder> [--from folder] writes a blank one-page site (⁠culm.json with no plug-in, site.json and pages/home.json⁠) into a new or empty folder (⁠

npx @culmjs/tools init my-site

, then npm install⁠; before a release, see "First run" in overview.md for --from .pack⁠). A folder that holds anything, hidden files included, is refused. It also writes a package.json⁠, a culm.schema.json and a .gitignore⁠.

Edit this page on GitHub