import and export

Bring your content in and take it out whenever you want

Galerne imports from the CMS you use today and exports everything in a documented format on every plan. You can try it on a copy of your content and leave with one command.

import and export

Six CMSs, both ways

An import reads your content from the CMS you use today, infers a content model, and writes everything to a Galerne branch. You review the branch like any other change, then promote it to main.

An export writes Galerne content in the other CMS's own format, ready for its import tools. Strapi, Hygraph, Prismic and Directus are not built yet; until then, go through Markdown files.

galerne import --from sanity --project-id abc123 \
  --dataset production --source-token sk… --dry-run
Import sources and export targets
cmsimport readsexport writes
SanityThe dataset API, public datasets without a token, or a .tar.gz exportA dataset for sanity dataset import
ContentfulA contentful space export fileA file for contentful space import
StoryblokThe delivery and Management APIs, or a fileStories, components and assets
WordPressA WXR export fileA WXR file with attachments
PayloadThe REST API or a file, Lexical and SlateData, collection configs, a seed script
Markdown, MDXA folder with front matterA folder with front matter
GalerneAn export folderNDJSON, on every plan
what an import keeps

Your ids, links and drafts survive the move

  • idsDocument and media ids stay the same, so references and links keep working. Ids Galerne cannot accept are renamed and listed in the report.
  • schemaAn inferred galerne.config.ts for you to review and commit. Your deployed schema wins where the two differ.
  • rich textConverted to Galerne rich text, with links to other documents and embedded images kept.
  • mediaFiles copied once. The same bytes uploaded twice keep one id.
  • draftsDraft and published versions both come across.
  • languagesTranslations kept, as localized fields or one document per language.
  • reportCounts per type, missing references and assets, renamed ids and problems to fix.
  • re-runsRunning an import again changes only what changed at the source.
  • the restContent with no Galerne equivalent is kept as its original JSON in the rich text, and every loss is listed in the report. Each guide lists the losses per CMS.
export

Plain export on every plan

Every plan can export, Free included. The export holds the schema, every document with its draft and published versions, and every media file with its details. The format is galerne-export/1: newline-delimited JSON, documented and versioned.

the export format →
# everything on main, with media files
galerne export --out ./backup

# or straight from the API
curl https://api.galerne.cloud/p/acme/v1/export?branch=main \
  -H "Authorization: Bearer gal_…" > acme.ndjson

{"kind":"schema","format":"galerne-export/1",…}
{"kind":"doc","id":"about","type":"page",…}
{"kind":"media","id":"m_7Qk…",…}
{"kind":"end","docs":412,"media":96}
moving day

Keep both CMSs in step until you switch

Run the import again on the same branch as often as you like: it brings over what changed at the source and leaves the rest alone. Editors keep working in the old CMS while you rebuild the site. Sync mode in @galerne/migrate repeats it every minute. It does not notice deletions, so remove deleted documents by hand before you switch.

Agents can run migrations too. The import_from and export_to tools take the same options as the CLI, and an import lands on a branch for a person to review.