Contentrain turns hardcoded UI copy, docs, and structured content into a Git-native system that AI agents can safely operate. Start locally with open-source MCP, CLI, and SDK packages. Add Studio when teams need review, roles, media, and delivery.
Website · Developer Docs · Studio Docs · Open Studio · Pricing
Most teams don't wake up needing a CMS. They wake up with hardcoded copy spread across components, no translation path, and AI agents editing strings directly in source files.
Contentrain puts a governed content layer between the agent and your repository:
Agent decides → Contentrain enforces → Human reviews → Any platform consumes
(what content) (schema, validation, (branch, diff, (JSON + Markdown,
canonical Git writes) approval) SDK, CDN, API)
The content contract never changes — only the surface you operate it from does.
npx contentrain init # create the .contentrain/ workspace
npx contentrain serve # open the local review UINo account, no cloud, no proprietary content format. You now have models, validation, review branches, and a local UI.
| Contentrain AI | Contentrain Studio | |
|---|---|---|
| What it is | Local-first, open-source operating core | Open-core team operations & delivery web app |
| Who it's for | Developers and AI coding agents | Editors, reviewers, and cross-functional teams |
| Surface | MCP, CLI, SDK, types, rules, skills | Chat, structured editing, review, media, CDN, APIs |
| License | MIT | AGPL-3.0 core + separately licensed enterprise modules |
| Repo | Contentrain/ai |
Contentrain/studio |
Typical path: contentrain init → normalize hardcoded content → review branches → invite teammates into Studio → deliver through CDN/API when needed.
| Package | Role |
|---|---|
@contentrain/mcp |
24 MCP tools over stdio or HTTP, with Local / GitHub / GitLab providers |
contentrain |
CLI, local Serve review UI, and MCP stdio entrypoint |
@contentrain/query |
Generated, fully typed query SDK |
@contentrain/types |
Shared type definitions and constants |
@contentrain/rules |
Agent quality rules and schema guardrails |
@contentrain/skills |
15 Agent Skills — workflow playbooks for AI agents |
MCP works with Claude Code, Claude Desktop, Cursor, Windsurf, Codex, and any MCP-compatible client.
Before — copy is trapped in components. No structure, no locales, no review.
<h1>Welcome to our platform</h1>
<p>Start your free trial today</p>After — source uses keys, content lives in Git as structured, translatable data.
<h1>{t('hero.title')}</h1>
<p>{t('hero.subtitle')}</p>// .contentrain/content/marketing/hero/en.json
{ "title": "Welcome to our platform", "subtitle": "Start your free trial today" }Scan → extract → review. Source patching happens in a separate, reviewable phase. → See the Normalize flow
| Kind | Stores | Example |
|---|---|---|
| Collection | Multiple typed entries | Blog posts, products, team |
| Singleton | One entry per locale | Hero section, site config |
| Document | Markdown + frontmatter | Docs, articles, changelog |
| Dictionary | Flat key-value strings | i18n translations, UI labels |
4 model kinds · 27 field types · locale-aware · canonical JSON + Markdown in Git.
Content is plain JSON and Markdown — any language reads it directly. For TypeScript, generate a typed client:
npx contentrain generateimport { query, singleton, dictionary, document } from '#contentrain'
const hero = singleton('hero').locale('en').get()
const posts = query('blog-post').locale('en').include('author').all()
const labels = dictionary('ui-labels').locale('tr').get('auth.login')
const article = document('docs').locale('en').bySlug('getting-started')Works with Nuxt, Next.js, Astro, SvelteKit, Vue, React, Node, Go, Python, Swift, Flutter, and 20+ stacks.
Production-ready repos with models, seed content, and a generated SDK client — click Use this template to start.
| Template | Framework | Use case |
|---|---|---|
| astro-blog | Astro | Blog / editorial |
| astro-landing | Astro | Landing page |
| next-commerce | Next.js | Commerce storytelling |
| next-multi-surface-saas | Next.js | Marketing + app + docs |
| next-saas-dashboard | Next.js | SaaS dashboard copy |
| next-white-label-portal | Next.js | White-label / multi-tenant |
| nuxt-admin-console | Nuxt | Admin console / operations |
| nuxt-saas | Nuxt | SaaS marketing site |
| sveltekit-editorial | SvelteKit | Editorial / publication |
| vitepress-docs | VitePress | Documentation site |
| Edition | Price | For |
|---|---|---|
| Open source | $0 · MIT packages | Local-first workflows, normalize, generated SDK, local review UI |
| Starter | $9/mo | Solo developers and small projects on Studio |
| Pro | $49/mo | Teams needing collaboration, higher limits, and API access |
| Enterprise | Custom | Self-managed licensing, SSO paths, custom limits, dedicated support |
The AGPL Studio core is also self-hostable on infrastructure you control. → See full pricing
- AI-native teams — govern the copy your coding agents create instead of letting it scatter through source
- Agencies — one repeatable content workflow across every client project
- Content teams — editors change content without developers losing Git control
- Platform teams — one content contract for web, docs, mobile, and APIs
- ai.contentrain.io — packages, MCP tools, CLI, SDK, and local workflows
- docs.contentrain.io — Studio guides, team workflows, self-hosting
- contentrain.io/playbooks — repeatable adoption workflows
- contentrain.io/security — bounded agent operations and trust model
Discord · GitHub Discussions · X / Twitter · LinkedIn · YouTube
Contributions are welcome — see CONTRIBUTING.md. If Contentrain is useful to you, a ⭐ on Contentrain/ai helps others find it.
- Packages (
Contentrain/ai) — MIT - Studio core (
Contentrain/studio) — AGPL-3.0, with separately licensed enterprise modules inee/