Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/alineacms/alinea/llms.txt

Use this file to discover all available pages before exploring further.

Alinea is a modern headless CMS that stores all content as flat files committed directly to your git repository. Every piece of content is fully typed in TypeScript, queryable through an in-memory database at build time, and editable via a beautiful visual dashboard — no separate database or SaaS dependency required.

Introduction

Learn what Alinea is, how it works, and why git-based content management changes everything.

Quickstart

Install Alinea, configure your first schema, and launch the dashboard in under 5 minutes.

Configuration

Define workspaces, roots, entry types, and fields to model your content exactly as you need.

Querying Content

Fetch, filter, and traverse content with Alinea’s fully-typed TypeScript query API.

Field Reference

Explore every built-in field type — text, rich text, links, media, lists, and more.

Deployment

Deploy Alinea on Next.js with GitHub, a database backend, or Alinea Cloud.

Why Alinea?

Git-Native Storage

Content files are committed alongside your code. History, branching, and rollbacks work out of the box.

Fully Typed

Your schema drives TypeScript types end-to-end. Query results are typed with no manual casting needed.

Zero Latency Queries

Content is bundled with your app at build time. No network round-trip at runtime — data is always available instantly.

Visual Dashboard

A built-in editing dashboard with live preview lets editors work comfortably without touching code.

Next.js First

Deep integration with Next.js App Router and Pages Router via createCMS, createHandler, and withAlinea.

Flexible Backend

Persist drafts to GitHub, PostgreSQL, MySQL, SQLite, D1, or Alinea Cloud — your choice.

Get Started

1

Install Alinea

Add Alinea to your Next.js project:
npm install alinea
2

Initialize the config

Run the init command to create a starter cms.ts configuration file:
npx alinea init
3

Start the dashboard

Launch the development dashboard alongside your Next.js dev server:
npx alinea dev
4

Query your content

Import your CMS instance and fetch typed content in any server component or page:
import {cms} from '@/cms'

const posts = await cms.find({
  type: BlogPost,
  select: {title: BlogPost.title, path: BlogPost.path}
})
Check the CLI Reference for a complete list of commands and options available through the alinea CLI.

Build docs developers (and LLMs) love