Skip to content

Getting started

Use with AI

This page

Ask ClaudeAsk ChatGPT

All of CaraCMS Docs

Connect once, and it answers your questions from this help.

Connect to ClaudeConnect to ChatGPT

You need Node 22.12 or later, and git. CaraCMS works with Astro 7.

A new site

One command makes an Astro site with CaraCMS on it:

Terminal window
npm create caracms

pnpm, yarn and bun work the same way. It asks for the site’s folder, whether you want a blank site or a docs site, whether to add Tailwind, where the site runs (CaraCMS Cloud or Standalone) and where it’s deployed.

Every question has a flag, so a script or an agent can run it without a terminal:

Terminal window
pnpm create caracms my-site --cloud --deploy railway

With npm, flags go after a double dash:

Terminal window
npm create caracms my-site -- --cloud --deploy railway

Then run it:

Terminal window
cd my-site
pnpm dev

The site is at the address Astro prints, with the editor at /admin. On your own machine the editor opens without signing in and saves straight to the files in content/.

An existing Astro site

Install the package pinned to an exact version, and commit the install by itself:

Terminal window
npm install caracms --save-exact
git add package.json package-lock.json
git commit -m "Add caracms"

That commit matters. The next step refuses to write while tracked files have uncommitted changes, so that its own change is one diff you can review. Now see what it would do:

Terminal window
npx caracms init

It asks where the site will run, then prints every file it would add and every edit it would make, and changes nothing. An agent or a script passes the answer as a flag, --cloud or --self-hosted. When the diff looks right, apply it and install what it added:

Terminal window
npx caracms init --write
npm install

What init adds:

It adds

What for

The Node adapter and the caracms integration

In astro.config. The site’s pages stay prerendered.

caracms.config.ts

A minimal config, with the mode you chose.

A page component and a text block

A starting point to replace with your own.

One catch-all route

src/pages/[...path].astro serves every document that has an address.

schemas/

JSON schemas for the content files, made from the config.

.claude/skills/

The skills an agent reads.

It doesn’t touch the site’s existing pages. Bringing them in is its own job: see From an existing Astro site.

What to do next