Contentrain is a content governance ecosystem for teams and AI agents. Content lives in Git as structured JSON and Markdown. Start locally with the open-source MCP, CLI, and SDK packages. Add Studio when teams need review, roles, media, and delivery. Moving off WordPress? Bridge exports your content for free, and Migrate moves the whole site to Astro.
Website · Developer Docs · Studio Docs · Open Studio · Migrate · Bridge · Pricing
Most teams don't wake up needing a new content platform. 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.
| Open-source tools | Studio | Migrate | Bridge | |
|---|---|---|---|---|
| What it is | Local-first packages for developers and agents | Team operating surface for governed content | Service that moves a WordPress site to Astro | Free WordPress plugin |
| Who it's for | Developers and AI coding agents | Editors, reviewers, and cross-functional teams | WordPress site owners leaving WordPress | WordPress sites that want their content in Git |
| What you get | MCP, CLI, SDK, types, rules, skills | Chat, structured editing, review, roles, media, CDN, APIs | An Astro project with its content and template structure, delivered to your GitHub or as a ZIP | Content and interface text as a validated Contentrain store, as a ZIP or to your GitHub |
| License | MIT | AGPL-3.0 core + separately licensed ee/ |
Paid service | GPL-2.0-or-later |
| Where | Contentrain/ai |
Contentrain/studio |
migrate.contentrain.io | Contentrain/wordpress-bridge · WordPress.org |
Typical path: contentrain init → normalize hardcoded content → review branches → invite teammates into Studio → deliver through CDN/API when needed.
| Package | Role |
|---|---|
@contentrain/mcp |
27 MCP tools over stdio or HTTP, with Local / GitHub / GitLab providers (the 5 media tools need a provider with a media stack, such as Studio) |
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/wp-import |
WordPress content into a Contentrain store (contentrain import) |
@contentrain/skills |
16 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')contentrain init recognizes 29 stacks, from Nuxt, Next.js, Astro, and SvelteKit to Django, Rails, Laravel, Go, and Flutter. Any language that reads JSON and Markdown can read the content.
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
- WordPress sites — export content with Bridge, or move the whole site to Astro with Migrate
- 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/ - Bridge (
Contentrain/wordpress-bridge) — GPL-2.0-or-later - Migrate (migrate.contentrain.io) — paid service