Skip to content
@Contentrain

Contentrain

Govern the content your AI ships into code.
Contentrain — Git-native content governance for AI-built products

Govern the content your AI ships into code.

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

npm: @contentrain/mcpnpm: contentrainnpm: @contentrain/queryPackages: MITStudio: AGPL-3.0Discord


Agent generates. Human approves. Git records every change.

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.

Try it in 30 seconds

npx contentrain init # create the .contentrain/ workspace
npx contentrain serve # open the local review UI

No account, no cloud, no proprietary content format. You now have models, validation, review branches, and a local UI.

Two surfaces, one content contract

Contentrain AIContentrain Studio
What it isLocal-first, open-source operating coreOpen-core team operations & delivery web app
Who it's forDevelopers and AI coding agentsEditors, reviewers, and cross-functional teams
SurfaceMCP, CLI, SDK, types, rules, skillsChat, structured editing, review, media, CDN, APIs
LicenseMITAGPL-3.0 core + separately licensed enterprise modules
RepoContentrain/aiContentrain/studio

Typical path: contentrain init → normalize hardcoded content → review branches → invite teammates into Studio → deliver through CDN/API when needed.

Open-source packages

PackageRole
@contentrain/mcp24 MCP tools over stdio or HTTP, with Local / GitHub / GitLab providers
contentrainCLI, local Serve review UI, and MCP stdio entrypoint
@contentrain/queryGenerated, fully typed query SDK
@contentrain/typesShared type definitions and constants
@contentrain/rulesAgent quality rules and schema guardrails
@contentrain/skills15 Agent Skills — workflow playbooks for AI agents

MCP works with Claude Code, Claude Desktop, Cursor, Windsurf, Codex, and any MCP-compatible client.

Normalize — the fastest way in

Before — copy is trapped in components. No structure, no locales, no review.

<h1>Welcome to our platform</h1><p>Startyourfreetrialtoday</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

The content model

KindStoresExample
CollectionMultiple typed entriesBlog posts, products, team
SingletonOne entry per localeHero section, site config
DocumentMarkdown + frontmatterDocs, articles, changelog
DictionaryFlat key-value stringsi18n translations, UI labels

4 model kinds · 27 field types · locale-aware · canonical JSON + Markdown in Git.

Use your content anywhere

Content is plain JSON and Markdown — any language reads it directly. For TypeScript, generate a typed client:

npx contentrain generate
import{query,singleton,dictionary,document}from'#contentrain'consthero=singleton('hero').locale('en').get()constposts=query('blog-post').locale('en').include('author').all()constlabels=dictionary('ui-labels').locale('tr').get('auth.login')constarticle=document('docs').locale('en').bySlug('getting-started')

Works with Nuxt, Next.js, Astro, SvelteKit, Vue, React, Node, Go, Python, Swift, Flutter, and 20+ stacks.

Starter templates

Production-ready repos with models, seed content, and a generated SDK client — click Use this template to start.

TemplateFrameworkUse case
astro-blogAstroBlog / editorial
astro-landingAstroLanding page
next-commerceNext.jsCommerce storytelling
next-multi-surface-saasNext.jsMarketing + app + docs
next-saas-dashboardNext.jsSaaS dashboard copy
next-white-label-portalNext.jsWhite-label / multi-tenant
nuxt-admin-consoleNuxtAdmin console / operations
nuxt-saasNuxtSaaS marketing site
sveltekit-editorialSvelteKitEditorial / publication
vitepress-docsVitePressDocumentation site

Browse all templates

Editions

EditionPriceFor
Open source$0 · MIT packagesLocal-first workflows, normalize, generated SDK, local review UI
Starter$9/moSolo developers and small projects on Studio
Pro$49/moTeams needing collaboration, higher limits, and API access
EnterpriseCustomSelf-managed licensing, SSO paths, custom limits, dedicated support

The AGPL Studio core is also self-hostable on infrastructure you control. → See full pricing

Who it's for

  • 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

Docs

Community

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.

Licensing

Pinned Loading

  1. rain-of-changerain-of-changePublic template

    Contentrain NuxtJS and TailwindCSS Changelog template.

    Vue 33 1

  2. help-center-faqhelp-center-faqPublic archive

    Contentrain FAQ Template

    JavaScript

  3. aiaiPublic

    Repo-native content governance for AI agents. Extract, review, and deliver UI text, docs, and structured content from Git.

    TypeScript 4

Repositories

Showing 10 of 30 repositories

Top languages

Loading…

Most used topics

Loading…