Site operations

4 operations named site.*. Every one runs in a batch through apply_ops, dry_run_ops, the CLI or the admin.

Updated
OperationWhat it doesPermissionConfirmation
site.readsite.read with validated settings and revisioned undo.site.readnone
site.updatesite.update with validated settings and revisioned undo.site.adminnone
site.createCreate a new site in the program of this token's site, seeded from a blueprint (blueprintId, default blank: an empty home page with the theme's header and footer; the site's theme is the blueprint's).site.adminnone
site.updateLanguagesSet the site's languages: the whole list (locales, 1 to 12 locale codes) and the default (defaultLocale, one of them).site.adminnone

site.read

site.read with validated settings and revisioned undo.

permission: site.readreads onlyclass: read

Example input

{}

Input

The input is a record; see the schema below.

{
  "type": "object",
  "properties": {},
  "additionalProperties": false
}

Output

FieldTypeRequiredNotes
siteobjectyes
site.idstringyes
site.slugstringyes
site.namestringyes
site.themestringyes
site.blueprintIdstringyes
site.programIdstringno
site.parentSiteIdstring | nullno
site.mountPathstring | nullno
site.domainstringno
site.createdAtstringyes
site.updatedAtstringyes

Try it

yarn splash site.read '{}' --dry-run

site.update

site.update with validated settings and revisioned undo.

permission: site.adminwrites: siteclass: transactionundo: yes

Example input

{
  "name": "Studio site"
}

Input

FieldTypeRequiredNotes
namestringnoAt least 1 character. At most 255 characters.
slugstringnoAt least 1 character. At most 100 characters.
parentSiteIdstring | nullno
mountPathstring | nullno

Output

FieldTypeRequiredNotes
siteobjectyes
site.idstringyes
site.slugstringyes
site.namestringyes
site.themestringyes
site.blueprintIdstringyes
site.programIdstringno
site.parentSiteIdstring | nullno
site.mountPathstring | nullno
site.domainstringno
site.createdAtstringyes
site.updatedAtstringyes

Try it

yarn splash site.update '{"name":"Studio site"}' --dry-run

site.create

Create a new site in the program of this token's site, seeded from a blueprint (blueprintId, default blank: an empty home page with the theme's header and footer; the site's theme is the blueprint's). With brand (the brand.setup input), the new site's draft design system gets that brand in the same transaction, so the site is created branded or not at all. Answers the new site; this token stays scoped to its own site, so edit the new one with a token minted for it. Run it alone in a batch with the site base revision; it is not undoable (delete the site from the admin).

permission: site.adminwrites: siteclass: transactionundo: explicit recovery

Example input

{
  "name": "Studio",
  "slug": "studio",
  "blueprintId": "blank",
  "brand": {
    "primary": "#1e3d4f",
    "secondary": "#c8553d",
    "neutral": "#737373",
    "headingFamily": [
      "DM Sans",
      "sans-serif"
    ],
    "bodyFamily": [
      "DM Sans",
      "sans-serif"
    ],
    "typeRatio": 1.25,
    "baseSize": 17,
    "spaceBase": 4,
    "radius": "soft"
  }
}

Input

FieldTypeRequiredNotes
namestringyesAt least 1 character. At most 255 characters.
slugstringyesAt least 1 character. At most 100 characters.
blueprintIdstringnoAt least 1 character. At most 100 characters. Default "blank".
brandobjectno
brand.primarystringyes
brand.secondarystringyes
brand.neutralstringyes
brand.headingFamilyarray of stringyesAt least 1 item.
brand.bodyFamilyarray of stringyesAt least 1 item.
brand.typeRationumberyesOne of 1.125, 1.2, 1.25, 1.333.
brand.baseSizeintegeryesAt least 14. At most 22.
brand.spaceBasenumberyesOne of 4, 8.
brand.radiusstringyesOne of "sharp", "soft", "round", "pill".
defaultLocalestringno

Output

FieldTypeRequiredNotes
siteobjectyes
site.idstringyes
site.slugstringyes
site.namestringyes
site.themestringyes
site.blueprintIdstringyes
site.programIdstringno
site.parentSiteIdstring | nullno
site.mountPathstring | nullno
site.domainstringno
site.createdAtstringyes
site.updatedAtstringyes

Try it

yarn splash site.create '{"name":"Studio","slug":"studio","blueprintId":"blank","brand":{"primary":"#1e3d4f","secondary":"#c8553d","neutral":"#737373","headingFamily":["DM Sans","sans-serif"],"bodyFamily":["DM Sans","sans-serif"],"typeRatio":1.25,"baseSize":17,"spaceBase":4,"radius":"soft"}}' --dry-run

site.updateLanguages

Set the site's languages: the whole list (locales, 1 to 12 locale codes) and the default (defaultLocale, one of them). An added language changes only the list: pages show the default's text in it until translated. A removed language is swept out of every draft locale map (page fields and trees, menus, collections and items, site settings, forms, media texts); a value only that language had moves to the default. Removing a language needs confirmed: ["destructive"]; the current default cannot be removed (make another language the default first). A new default first gets the old default's value wherever it has none. Published versions change at the next publish. Answers the languages and, per removed language, how many values it lost or moved. Run it with the site base revision; it is not undoable.

permission: site.adminwrites: siteclass: transactionundo: explicit recovery

Example input

{
  "locales": [
    "it",
    "fr"
  ],
  "defaultLocale": "it"
}

Input

FieldTypeRequiredNotes
localesarray of stringyesAt least 1 item. At most 12 items.
defaultLocalestringyes

Output

FieldTypeRequiredNotes
localesarray of stringyes
defaultLocalestringyes
removedarray of objectyes
removed[].localestringyes
removed[].valuesintegeryesAt least 0.

Try it

yarn splash site.updateLanguages '{"locales":["it","fr"],"defaultLocale":"it"}' --dry-run

Generated from the operation registry and the MCP tool catalogue (source 3289ff41103b8dbd).

Something wrong on this page? Write to docs@librettocms.com.

Libretto docs

Colophon. These docs are a Libretto site: 68 pages in two languages, 20 guide pages imported from Markdown and 41 reference pages generated from the operation registry. Set in Softcore, with code in IBM Plex Mono. Its outline:

/ Libretto docs /start Get started /start/request-access Request access /start/workspace Your workspace /start/first-site Your first site /start/invite-a-client Invite a client /start/connect-claude Connect Claude to Libretto /build Build /build/first-page Build a page /build/layers-and-canvas Layers and canvas /build/site-components Site components /design-system Design system /design-system/tokens Colours, space and themes /design-system/components Components and variants /design-system/fonts Typography and fonts /motion Motion /motion/scenes Scenes and recipes /motion/image-sequences Image sequences /motion/reduced-motion Reduced motion /publish Publish /publish/languages Site languages /publish/versions Publish and versions /publish/members-and-forms Members and forms /publish/domains Domains /handover Hand a site to a client /glossary Glossary /agents Agents and API /agents/mcp MCP server /agents/cli CLI /agents/batches Batches /agents/errors Errors and findings /agents/operations Operations /search Search