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 dev starts a local HTTP server that hosts the Alinea content editing dashboard. While running, it watches your cms.ts configuration file for schema changes, recompiles on the fly, and pushes live-reload signals to the browser. It also exposes the CMS backend API so the dashboard can read and write content files directly to your local repository.
This is the command you run during day-to-day development whenever you want to edit content or iterate on your schema.
Usage
Start the dashboard
-- <command> separator lets you forward process spawning to another command — most commonly your framework’s dev server — so that a single terminal session runs both simultaneously.
Options
Path to the Alinea config file. Defaults to auto-detection: Alinea searches for
cms.ts (or cms.js) starting from the project root. Use this flag when your config file lives in a non-standard location.Root directory of the project. Defaults to
process.cwd(). All relative paths in the config are resolved from this directory. Useful in monorepos where the Alinea project is not at the repository root.Port for the local CMS dashboard server. Defaults to
4500. If the preferred port is unavailable, Alinea will automatically try the next available port.Base URL used for live preview links inside the dashboard. Set this to your local framework dev server URL (e.g.
http://localhost:3000) if your framework runs on a different origin than the dashboard.Run the development dashboard against the production backend (sets
NODE_ENV=production). Useful for debugging production-specific content behavior locally without deploying.Watch Alinea’s own source files in addition to your project files. This flag is intended for Alinea contributors developing on the CMS itself and is not needed in normal projects.
Forwarding to a Framework Dev Server
The-- separator passes everything after it to a child process that is spawned once after the initial schema generation completes. The child process inherits the current environment plus the ALINEA_DEV_SERVER variable (set to the dashboard URL), and its exit code propagates to the parent process.
Run Alinea and Next.js together
Run Alinea and Vite together
ALINEA_DEV_SERVER environment variable is automatically injected into the forwarded process, making it available to your framework if you need to reference the dashboard origin.
Typical package.json Setup
If you ranalinea init, your package.json dev script was already patched. It should look something like this:
package.json
Start dev via npm
Dashboard URL
Once started, the dashboard is available at:4500 is already in use, the next free port is selected automatically and printed to the console.