platform

Everything Galerne does

Galerne is a headless CMS where people and agents edit the same content. This page goes through each part of it with a short example taken from the real API, and links to the docs page that covers it in full.

content model

The schema lives in your repo as code

You describe types, fields, blocks, languages and the studio sidebar in galerne.config.ts. Twenty field types cover text, rich text, references, images, blocks and more, with validation rules on each. The studio, the API and agents all validate against the same schema.

A schema change can wait on a branch with the site code that uses it, and goes live on main when the branch is promoted.

schema reference →
// galerne.config.ts
import { defineConfig } from '@galerne/schema'

export default defineConfig({
  languages: ['en', 'fr'],
  types: {
    post: {
      i18n: 'doc',
      fields: {
        title: { type: 'string', required: true, max: 120 },
        slug: { type: 'slug', from: 'title' },
        cover: { type: 'image', altRequired: true },
        author: { type: 'reference', to: ['person'] },
        body: { type: 'richText' },
      },
    },
    person: { fields: { name: { type: 'string', required: true } } },
  },
})
galerne schema diff      # flags breaking changes
galerne schema deploy    # or --branch agent/new-section
studio and live editing

Several people edit the same document at once

Edits in the studio merge live, character by character, and each person sees who is in which field. Changes an agent makes through the API show up in open editors. The editor has panels for checks, comments, references, history and translations, and a live preview of the site next to the form.

Document lists have filters, saved views and bulk actions, and ⌘K jumps anywhere. A field can use a custom input, set in the config.

tour of the studio →
// galerne.config.ts: the sidebar and a custom input
structure: [
  { singleton: 'settings', title: 'Settings' },
  { group: 'Blog', items: [
    { type: 'post', title: 'News', filter: { category: 'news' } },
    { type: 'person', title: 'Authors' },
  ] },
],

excerpt: {
  type: 'text',
  component: 'character-count',
  componentOptions: { max: 160 },
},
branches, review, promotion

Changes wait on a branch until a person promotes them

A branch reads through to main until it changes a document, so a preview of a branch shows the whole site. Review shows a diff per field, the content checks and the comments. Promotion merges text by character and reports fields changed on both sides as conflicts.

A release is a branch with a publish time. Any promotion can be rolled back.

branches and review →
galerne branch create agent/translate-de --title "German version"
galerne branch changes agent/translate-de
galerne branch review agent/translate-de --note "All pages translated"
galerne branch promote agent/translate-de --publish

# a promotion that hits a conflict
{ "error": { "code": "conflict", "message": "…", "details": { … } } }
  • textMerges by character, so an editor's typo fix and an agent's rewrite both survive
  • blocksMerge by _key, in order
  • conflictsStop the promotion, or pick a side with onConflict
  • approvalPeople only: agents ask for review
history, comments, scheduling

Every change has an author and can be undone

Each version records who made it, person or agent, and when. Compare two versions field by field and restore a whole document or only some fields. Comments sit on a document, a single field or a branch, mention people and become tasks with an assignee.

A document can be published or unpublished at a set time, and a release goes live as a whole at its time.

# bring back two fields from version 880
curl https://api.galerne.cloud/p/acme/v1/docs/harbours/restore \
  -H "Authorization: Bearer gal_…" -H "content-type: application/json" \
  -d '{"branch":"main","seq":880,"paths":["title","seo.description"]}'

# publish a page at 8:00 on 20 March
curl https://api.galerne.cloud/p/acme/v1/docs/spring-sale/schedule \
  -H "Authorization: Bearer gal_…" -H "content-type: application/json" \
  -d '{"branch":"main","action":"publish","at":"2027-03-20T08:00:00+01:00"}'
agents and mcp

Each project has its own MCP server

Claude, Cursor, ChatGPT or your own agent connects with OAuth or a project token. Each connection acts as an agent member with a role, allowed branches and types, and a rate limit. Agents read the schema and your writing guidelines, work on a branch and ask a person for review.

The server also ships three prompts: translate_doc, alt_text and seo_pass. Galerne runs no language model.

agents and MCP →
# Claude Code
claude mcp add --transport http acme https://api.galerne.cloud/p/acme/mcp

# Cursor: .cursor/mcp.json
{ "mcpServers": { "acme": { "url": "https://api.galerne.cloud/p/acme/mcp" } } }

# clients that only run local servers
{ "mcpServers": { "acme": {
  "command": "galerne", "args": ["mcp", "--project", "acme"],
  "env": { "GALERNE_API_URL": "https://api.galerne.cloud", "GALERNE_TOKEN": "gal_…" } } } }
tool api

79 tools over REST, MCP, the CLI and the studio

Every operation is one tool with one definition: the same inputs, permissions, validation and errors everywhere. Call any tool with POST /p/acme/v1/tools/<name>, or through its REST route. Errors name the field path and the rule, so a program or an agent can fix its input and retry.

GET /p/acme/v1/tools lists the tools your token may call, with their JSON Schemas, and the API serves an OpenAPI document.

# change one field, safe against edits made meanwhile
curl -X PATCH https://api.galerne.cloud/p/acme/v1/docs/harbours \
  -H "Authorization: Bearer gal_…" -H "content-type: application/json" \
  -d '{"branch":"agent/seo","set":{"seo.description":"Ten harbours of Brittany."},"rev":7}'

# the same call, by tool name
curl https://api.galerne.cloud/p/acme/v1/tools/patch_doc \
  -H "Authorization: Bearer gal_…" -H "content-type: application/json" \
  -d '{"id":"harbours","branch":"agent/seo","set":{"seo.description":"Ten harbours of Brittany."},"rev":7}'

# 422 when a value breaks the schema
{ "error": { "code": "validation", "message": "…",
  "errors": [{ "path": "seo.description", "rule": "max", "message": "at most 160 characters" }] } }
query api

One JSON query returns what a page needs

Filter with operators and and, or, not, order, page, pick fields, and get rich text as Markdown, HTML or JSON. Read published content, drafts, or any branch.

expand follows references up to three levels. With a map from type to fields, each referenced document keeps only those fields. Every answer lists the cache tags it depends on, and published reads without a token are cached at the CDN.

query API →
curl https://api.galerne.cloud/p/acme/v1/query \
  -H 'content-type: application/json' \
  -d '{
    "type": "page",
    "perspective": "published",
    "where": { "slug": "work" },
    "expand": { "project": ["title", "slug", "cover"], "*": ["title", "slug"] }
  }'
{
  "total": 1,
  "items": [{ "_id": "work", "_type": "page", "content": [
    { "_key": "k1", "_type": "projectCard", "project":
      { "_id": "proj-1", "_type": "project", "title": "Harbour", "slug": "harbour", "cover": { … } } }
  ] }],
  "tags": ["type:page", "doc:work", "doc:proj-1"]
}
checks, search, analytics

Content checks tell people and agents what to fix

Beyond validation, the checks find broken links and references, missing alt text, skipped heading levels, vague link text, duplicate slugs, and missing or outdated translations. Reviews list them, and agents use them as a to-do list. An accessibility report groups the issues per type.

Full text search works on every plan. On Business, search by meaning finds published documents that never use your words, and page views per document come from the CDN logs.

# in CI: fail on errors and warnings in what changed
galerne check --changed --strict

# search by meaning (Business)
curl "https://api.galerne.cloud/p/acme/v1/search?text=sailing+in+winter&semantic=true" \
  -H "Authorization: Bearer gal_…"

# accessibility issues of a branch
curl "https://api.galerne.cloud/p/acme/v1/accessibility?branch=main" \
  -H "Authorization: Bearer gal_…"
media and images

Upload once, resize with URL parameters

Each file is stored once by content, so the same bytes keep one id. Images take width, height, fit and format parameters, and the resized image is cached at the CDN. Video and audio answer Range requests, so players can seek.

Files carry alt text, captions, credits, licenses, tags and an expiry. The library finds files no document uses, and a file can be replaced in place.

media →
curl "https://api.galerne.cloud/p/acme/v1/media?filename=harbour.jpg&alt=Harbour%20at%20dawn" \
  -H "Authorization: Bearer gal_…" -H "content-type: image/jpeg" \
  --data-binary @harbour.jpg

# 1200 pixels wide, as WebP, centred on the most detailed area
https://api.galerne.cloud/p/acme/media/m_7Qk2…?w=1200&fm=webp

# in a document, and in rich text
{ "cover": { "asset": "m_7Qk2…", "alt": "Harbour at dawn", "hotspot": { "x": 0.5, "y": 0.4 } } }
![Harbour at dawn](media:m_7Qk2…)
webhooks and events

Every change is an event you can follow

Twenty event types cover documents, branches, reviews, comments, media, schema deploys, releases and data sources. Webhooks send them signed with HMAC-SHA256, filtered by event, type and branch, with retries for about seven hours. Each event lists the cache tags it changes, so a site purges exactly what a publish touched.

Programs without a public URL follow the same events over Server-Sent Events, and resume where they stopped.

POST /api/galerne/revalidate
x-galerne-event: doc.published
x-galerne-signature: t=1760606561,v1=5f1c…

{
  "id": "evt_8KfQ2x…",
  "type": "doc.published",
  "project": "acme",
  "branch": "main",
  "docId": "harbours",
  "docType": "post",
  "actor": { "kind": "human", "id": "acc_…", "name": "Marie" },
  "data": {},
  "tags": ["doc:harbours", "type:post", "all"],
  "at": "2026-10-16T09:22:41.000Z"
}
curl -N "https://api.galerne.cloud/p/acme/v1/events/stream?types=media.uploaded" \
  -H "Authorization: Bearer gal_…"
next.js kit and preview

Cached pages that refresh when their content changes

@galerne/next caches each query with "use cache" and tags it with the documents it read. Its revalidation route checks the webhook signature and purges those tags, so a publish refreshes only the pages that show the change.

Editors preview drafts on any branch next to the editor, and a click on the page focuses the field. The kit also has image, rich text and blocks components, i18n routing, sitemap, robots and llms.txt routes.

Next.js kit →
// lib/galerne.ts
import { createGalerne } from '@galerne/next'

export const galerne = createGalerne<Docs>({
  project: process.env.GALERNE_PROJECT!,
  apiUrl: 'https://api.galerne.cloud',
  previewToken: process.env.GALERNE_PREVIEW_TOKEN,
  previewSecret: process.env.GALERNE_PREVIEW_SECRET,
  webhookSecret: process.env.GALERNE_WEBHOOK_SECRET,
  studioUrl: 'https://studio.galerne.cloud',
  languages: ['en', 'fr'],
  routes: { post: '/{lang}/blog/{slug}' },
})

// app/api/galerne/revalidate/route.ts
export const { POST } = galerne.handlers.revalidate

// app/[lang]/blog/[slug]/page.tsx
const { doc: post } = await galerne.bySlug('post', slug, lang)
const edit = await galerne.editable()
return <h1 {...edit(post, 'title')}>{post.title}</h1>
clients and cli

Typed clients and a command line tool

@galerne/client infers TypeScript types from your galerne.config.ts and exposes every tool as a typed method. It has no runtime dependencies. Small Python and PHP clients cover the same calls.

The galerne CLI deploys the schema, manages content and branches, exports, imports, calls any tool, and runs a local MCP server over stdio.

import { createClient, type DocsOf } from '@galerne/client'
import config from './galerne.config.ts'

const galerne = createClient<DocsOf<typeof config>>({
  project: 'acme',
  apiUrl: 'https://api.galerne.cloud',
  token: process.env.GALERNE_TOKEN,
  branch: 'agent/alt-text',
})

const { items } = await galerne.query({ type: 'post', limit: 10 })
await galerne.tools.update_media({ id: 'm_7Qk2…', alt: 'Fishing boats at dawn' })
await galerne.tools.request_review({ note: 'Alt text for 12 images' })
galerne docs patch harbours --set title="Harbours of Brittany" --rev 7
galerne call get_history '{"id":"harbours"}'
managed sites and design browser

Galerne can host the site and let agents change its code

create_site makes a git repo from a site template on Galerne's Forgejo at git.galerne.cloud, and a site on Tramontane, the EU frontend cloud, with its environment and webhook. Agents change the code on branches through MCP. Each branch gets a preview build that shows the drafts of the content branch with the same name.

People review code and content together and promote them as one. Every site from the template has a design browser at /_design, and the studio's design tab edits its tokens, web fonts included. The repo can be cloned with plain git or mirrored to GitHub or GitLab.

// write_files: one commit on the agent's branch
{
  "branch": "agent/new-hero",
  "message": "Add a hero block",
  "files": [
    { "path": "app/blocks/hero.tsx", "content": "export function Hero() { … }" },
    { "path": "app/blocks/old-banner.tsx", "delete": true }
  ]
}

// update_theme: design tokens, checked against the schema
{ "branch": "design/darker-accent", "tokens": { "colors": { "accent": "#0b5f59" } } }
git clone https://bot-<id>:<token>@git.galerne.cloud/sites/acme.git
data sources

External APIs fill documents on a schedule

A data source maps a JSON API into documents of one type, with stable ids, so running it twice never makes duplicates. Unchanged items are skipped, removed items are unpublished, and an empty or broken answer stops the run and keeps the data.

When a person or an agent edits a synced field, the edit wins and later syncs leave it alone. Sources run on a schedule, on a signed webhook, or on a branch for review.

data sources →
// galerne.config.ts
sources: {
  github: {
    type: 'repo',
    fetch: {
      url: 'https://api.github.com/orgs/velours/repos',
      headers: { Authorization: 'Bearer {{secret.TOKEN}}' },
      pagination: { type: 'link' },
    },
    id: 'repo-{{name}}',
    fields: { name: 'name', stars: 'stargazers_count' },
    schedule: { every: 60 },
  },
},
import, export, migrations

Move in from six CMSs and export on every plan

Importers read Sanity, Contentful, Storyblok, WordPress, Payload and Markdown, infer a galerne.config.ts, and write everything to a branch with ids, references, drafts, translations and media kept. A second run changes only what changed at the source.

The plain export is documented NDJSON, on every plan, Free included. Exporters write the same six formats back.

galerne import --from sanity --project-id abc123 --dataset production --dry-run
galerne export --out ./backup
galerne export --to wordpress --out ./wp-export --site-url https://example.com

curl "https://api.galerne.cloud/p/acme/v1/export?branch=main" \
  -H "Authorization: Bearer gal_…" -o acme.ndjson

curl "https://api.galerne.cloud/p/acme/v1/import?branch=import/blog&dryRun=1" \
  -H "Authorization: Bearer gal_…" -H "content-type: application/x-ndjson" \
  --data-binary @posts.ndjson
languages

Translate per field or per document

Localized fields hold every language in one document. Types with documents per language give each translation its own slug, drafts and publish date. Queries return one language with a fallback to the default, and the checks flag missing and outdated translations.

On Business, a translator can be limited to their language. The Next.js kit routes readers to their language and writes the hreflang links.

languages and translations →
# German posts, English where a translation is missing
curl https://api.galerne.cloud/p/acme/v1/query \
  -H 'content-type: application/json' \
  -d '{"type":"post","lang":"de","fallback":true,"perspective":"published"}'
// proxy.ts
import { createI18nProxy } from '@galerne/next/proxy'

export const proxy = createI18nProxy({ languages: ['en', 'fr', 'de'], defaultLanguage: 'en' })
members, sso, scim

Roles for people, rules for agents, tokens with scopes

Members are viewers, contributors, editors or admins. Tokens act as a member or as the project, with a scope from published reads to admin, and an optional expiry. MCP clients sign in with OAuth 2.1, and each connected app can be disconnected at once.

On Business, people sign in through your identity provider with OIDC on a verified domain, SCIM 2.0 adds and removes members, and an audit log records who did what.

# your identity provider, through SCIM
curl -G https://api.galerne.cloud/scim/v2/Users \
  -H "Authorization: Bearer gal_scim_…" \
  --data-urlencode 'filter=userName eq "ada@example.com"'

curl -X PATCH https://api.galerne.cloud/scim/v2/Users/<id> \
  -H "Authorization: Bearer gal_scim_…" -H "content-type: application/scim+json" \
  -d '{"schemas":["urn:ietf:params:scim:api:messages:2.0:PatchOp"],"Operations":[{"op":"replace","value":{"active":false}}]}'
  • read:publishedPublished content, the schema and media
  • readAlso drafts, branches, history, comments, export
  • writeAlso every write the role allows
  • adminAlso schema deploys, members, tokens, webhooks, settings
plans and billing

Priced per project, in euros, with VAT handled for the EU

Free, Pro and Business are priced per project, monthly or yearly, and agents never count as seats. Payments go through Mollie. Upgrades apply at once, cancelations at the end of the paid period, and usage over the limits is billed at the start of the next month.

Invoices carry the right VAT: reverse charge for EU businesses with a valid number, the local rate for EU consumers.

curl https://api.galerne.cloud/p/acme/v1/billing/checkout \
  -H "Authorization: Bearer gal_…" -H "content-type: application/json" \
  -d '{"plan":"pro","interval":"year"}'

{ "checkoutUrl": "https://www.mollie.com/checkout/…", "netCents": …, "vatCents": …, "totalCents": … }
  • free€0, 3 people, 2 agents, 10,000 documents
  • pro€39 per project a month, review, releases, scheduling, event stream
  • business€299 per project a month, SSO, custom roles, audit log, semantic search
eu hosting

Your content stays with European companies

Galerne runs on Scaleway in Paris, with one Postgres database per project. Media and cached published reads go through Bunny's CDN, email through Brevo and payments through Mollie. None of them has a US parent company.

We run no language model. Your content reaches a model provider only when your own agent sends it there.

every provider, and where →
  • studiostudio.galerne.cloud
  • api and mcpapi.galerne.cloud, one path per project
  • site codegit.galerne.cloud, Galerne's own Forgejo
  • site hostingTramontane, the EU frontend cloud
  • databaseOne Postgres database per project, on Scaleway in Paris (fr-par)
  • mediaStored in Paris, cached by Bunny's CDN in Europe
  • searchAn open embedding model run by Scaleway in Paris, on Business
  • exportEverything as NDJSON on every plan