Your content lives
in your codebase
OctoCMS is a file-based CMS that drops into your Next.js app, powered by TanStack Query and Octokit. Design your schema in a visual editor, edit in a polished UI, query with full type safety. Your content is just files in GitHub — versioned, reviewable, yours.

How it works
Three steps. Full CMS.
From schema to live content in minutes. Everything stays in your repo.
Define your schema
A single TypeScript config file describes your collections, fields, and relationships. Full autocomplete, version-controlled, reviewable in PRs.
defineConfig({
collections: {
post: {
label: 'Blog Posts',
hasMany: true,
fields: {
title: {
label: 'Title',
format: 'string',
required: true,
},
body: {
label: 'Content',
format: 'markdown',
...Edit in the admin UI
A polished editor at /cms in your app. Protected by GitHub OAuth.
- Rich markdown editor with live preview
- Drag-and-drop media uploads
- Inline editing of referenced entries
- Draft, published & archived statuses
- Full-text search across all content
Query with type safety
A chainable API with full TypeScript inference. Autocomplete for collection names, field names, and return types.
import { query } from 'cms/__generated__/query'
const posts = await query('post')
.filter(p =>
p.fields.publishedAt !== null)
.sort('publishedAt', 'desc')
.limit(10)
.toArray()
// ^ fully typed PostEntry[]Features
Everything you need. Nothing you don’t.
Config-as-code
Your entire content model in one TypeScript file. Version it, review in PRs, get autocomplete everywhere.
12 field types
String, markdown, boolean, select, image, number, datetime, JSON, slug, URL, color, and reference.
Type-safe queries
Chainable, fully-typed content queries with autocomplete for collection and field names.
Rich editor
ProseMirror-based markdown editor with toolbar, shortcuts, and live preview. Clean diffs in Git.
Media manager
Upload images with auto-extracted dimensions and blur placeholders. Organize with folders.
Git-native publishing
Branch-based workflow: edit on feature branches, publish with a click, merge when ready.
GitHub OAuth
One-click sign-in via GitHub App. No separate auth system to maintain.
Reference fields
Link entries across collections. Inline editing, drag-to-reorder, backlink tracking.
Visual schema editor
Edit collections and fields in the UI. Changes are diffed, validated, and committed to your schema in one click.
AI chat assistant
Ask questions, find content, and propose edits in natural language. Bring your own Anthropic, OpenAI, or local model.
Instant cache invalidation
Built on Next.js use cache and cacheTag(). Save an entry and public pages update immediately.
No database, no vendor.
Content is JSON on disk in dev, in your GitHub repo in production. No external API, no hosted service to pay for.
Philosophy
Everything stays in your repo.
Your schema, your content, your media, your types — all committed to Git. git blame your content. Review changes in PRs. Roll back with git revert.
Use cases
Built for small teams.
Small teams
Content editors get a polished UI. Developers keep full control. Git history is your audit trail. No per-seat pricing.
Agencies
One codebase pattern for every client. Clone, customize, deploy. Clients edit content without touching code.
Solo developers
Ship a blog, docs site, or portfolio with a real CMS in minutes. No SaaS bills, no vendor lock-in.
Get started in 60 seconds
Three commands. That’s it.
$ npx octocms init
$ npm install octocms ...
$ npm run dev
# open localhost:3000/cms