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.

The alinea CLI is your primary tool for working with Alinea CMS projects. It handles everything from bootstrapping a new project to running the local content dashboard and generating the TypeScript types and content cache needed at build time. Because the CLI ships inside the alinea npm package, there is nothing extra to install — the binary is available the moment you add alinea to your project.

Installation

The CLI is included in the alinea package. No separate install is required.
Install alinea
npm install alinea
# or
yarn add alinea
# or
pnpm add alinea
Once installed, invoke the CLI through your package manager’s runner or directly from node_modules/.bin:
Run via npx
npx alinea <command>
Run from scripts (package.json)
alinea <command>

Available Commands

CommandAliasDescription
initInitialize a new Alinea project in the current directory
devserveStart the local development dashboard
buildgenerateGenerate TypeScript types and the content cache

Runtime Requirements

The Alinea CLI requires Node.js 18 or higher. It is not intended to be run in Bun, edge runtimes, or browser environments — those environments are only relevant for the content-querying APIs, not the CLI itself. Each command performs a runtime check and exits with a clear error message if the Node.js version requirement is not met. The CLI also automatically loads environment variables from .env.local or .env in your project root (or any parent directory) before executing any command, so secrets like ALINEA_API_KEY are available without manual configuration.

Command Reference

init

Bootstrap a new Alinea project — creates cms.ts and a starter content directory.

dev

Start the local CMS dashboard with live schema watching and optional process forwarding.

build

Generate TypeScript types and the content cache for use at build time.

Build docs developers (and LLMs) love