Local-first · Files, not a database · AI-assisted

A CMS you actually own.

No database. No login screen. No monthly bill for somewhere to store your content. flat-cms keeps every page, setting, and form as a plain file in your own project — edit it through a local admin UI, or hand it to a built-in AI assistant, then publish straight to Cloudflare Pages.

Self-hosted. Runs on your machine. Your git history is your CMS's history.

The usual CMS

  • Content locked in someone else's database
  • A login screen standing between you and your own site
  • A monthly bill for hosting the CMS itself
  • Migrations, backups, and an admin panel to keep patched

flat-cms

  • Content is .md / .yml / .json files in your repo
  • Runs locally — no account, no login, no third-party server
  • No CMS hosting cost — you publish the built site, that's it
  • git diff is your content history and your backup

Everything a small site needs, nothing it doesn't

Content as files

Pages, settings, menus, and form config are readable, diffable, versionable files — not rows in a database only the CMS can query.

Config-driven collections

cms.config.ts declares your content types and their fields — pages, products, whatever you need — and the admin UI is generated from it.

Template-based rendering

Your HTML/CSS lives in templates/<id>/ as Eleventy/Nunjucks files. Swap the active template without touching a single piece of content.

Homepage & smart menus

Pick any page as the homepage with one click. Menu links that point at a page stay correct automatically, even after you change which page that is.

Forms that just work

Build a contact or signup form, drop its tag into any page, and submissions email straight to you via Resend — no server code to write.

One-command publish

flat-cms publish builds the site and deploys it to Cloudflare Pages, creating the project on Cloudflare automatically the first time.

Built-in AI assistant

Bring your own OpenAI, Anthropic (Claude), or local Ollama model and tell it what you want — new pages, menu items, contact forms — right from the admin UI's chat panel. See it in action below.

How it works

  1. 1

    Scaffold a project

    flat-cms init my-site sets up a starter pages collection, a homepage, and two ready-to-use templates.

  2. 2

    Edit in the local admin UI

    flat-cms dev opens an admin UI on your machine — content, menus, forms, and a live template preview, all backed by files on disk.

  3. 3

    Publish

    flat-cms publish builds the static site and deploys it to Cloudflare Pages. No separate hosting to set up for the CMS itself — there isn't one.

An AI assistant that actually edits your site

The admin UI has a chat panel that can create and edit pages, hero banner slides, menu items, and forms — through the same code paths as the manual UI — and it always confirms before deleting anything or publishing.

Bring your own model: OpenAI, Anthropic (Claude), or a local Ollama model. Set it once in Settings, or ship a project-wide default in cms.config.ts.

OpenAI Anthropic · Claude Ollama · local

Get started

Build it from source and link it locally — there's no install step beyond that.

# from the flat-cms repo
$ npm install
$ npm run build
$ npm link

# then, anywhere you want a site
$ flat-cms init my-site --site-name "My Site"
$ cd my-site
$ flat-cms dev

See the project README for the full CLI reference and configuration guide.