MCPcopy Index your code
hub / github.com/alineacms/alinea

github.com/alineacms/alinea @v1.7.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.7.0 ↗ · + Follow
2,272 symbols 6,302 edges 680 files 14 documented · 1%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

npm install size

Vercel OSS Program

Alinea CMS

Alinea is a modern content management system.

  • Content is stored in flat files and committed to your repository
  • Content is easily queryable through an in-memory database
  • Content is fully typed

Get started

Install Alinea in your project directory

npm install alinea

Initialize Alinea's config file

npx alinea init

Open the dashboard to have a look around

npx alinea dev

Start configuring types and fields →

Coding agents

If you are working in a project that depends on alinea, a handbook is included in the npm distribution at ./llms-full.txt.

Configure

Configure Alinea in cms.ts

import {Config, Field} from 'alinea'

const BlogPost = Config.document('Blog post', {
  fields: {
    title: Field.text('Blog entry title'),
    body: Field.richText('Body text')
  }
})

const Blog = Config.document('Blog', {
  contains: [BlogPost]
})

Type options and fields →

Query

Retrieve content fully-typed and filter, order, limit as needed.
Select only the fields you need.

import {Query} from 'alinea'

console.log(
  await cms.get({
    type: Blog,
    select: {
      title: Blog.title,
      posts: Query.children({
        type: BlogPost,
        select: {
          title: BlogPost.title
        }
      })
    }
  })
)

See the full api →

Content is available during static site generation and when server side querying.
Content is bundled with your code and can be queried with zero network overhead.

How alinea bundles content →

Deploy anywhere

Alinea supports custom backends that can be hosted as a simple Node.js process or on serverless runtimes.

Setup your backend →

How to contribute to this project

Have a question or an idea? Found a bug? Read how to contribute.

Extension points exported contracts — how you extend this code

Resolver (Interface)
(no doc) [8 implementers]
src/core/Resolver.ts
Previews (Interface)
(no doc) [2 implementers]
src/backend/Previews.ts
PositionInputProps (Interface)
(no doc)
apps/dev/src/field/PositionField.view.tsx
EntryPickerRowProps (Interface)
(no doc)
src/picker/entry/EntryPickerRow.tsx
GenerateOptions (Interface)
(no doc)
src/cli/Generate.ts
EntryFixtureEntry (Interface)
(no doc)
src/test/EntryFixture.ts
RootProps (Interface)
(no doc)
src/ui/AppBar.tsx
PreviewProps (Interface)
(no doc)
src/adapter/next/cms.tsx

Core symbols most depended-on inside this repo

map
called by 187
src/backend/router/Router.ts
get
called by 144
src/core/Graph.ts
push
called by 135
src/core/shape/ListShape.ts
get
called by 133
src/core/Role.ts
set
called by 131
src/core/Role.ts
get
called by 118
src/core/source/Tree.ts
create
called by 109
src/core/Shape.ts
assert
called by 97
src/core/util/Assert.ts

Shape

Function 1,150
Method 550
Interface 341
Class 219
Enum 12

Languages

TypeScript100%

Modules by API surface

src/core/db/EntryIndex.ts68 symbols
src/core/source/Tree.ts51 symbols
src/core/Role.ts51 symbols
src/core/db/Operation.ts48 symbols
src/core/db/EntryResolver.ts34 symbols
src/core/Connection.ts33 symbols
src/backend/router/Router.ts29 symbols
src/core/shape/RichTextShape.ts28 symbols
src/core/Graph.ts25 symbols
src/core/Type.ts24 symbols
src/core/Client.ts24 symbols
src/core/shape/ListShape.ts23 symbols

For agents

$ claude mcp add alinea \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact