Getting started
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:
npm create caracmspnpm, 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:
pnpm create caracms my-site --cloud --deploy railwayWith npm, flags go after a double dash:
npm create caracms my-site -- --cloud --deploy railwayThen run it:
cd my-sitepnpm devThe 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:
npm install caracms --save-exactgit add package.json package-lock.jsongit 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:
npx caracms initIt 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:
npx caracms init --writenpm installWhat 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
- Building a site: blocks, fields and collections.
- CaraCMS Cloud or Standalone: the services behind the editor.
- Where the server runs: putting it on a host.
A site set to run on CaraCMS Cloud needs its key before it will build. The dev server runs without one.
llms.txt · llms-full.txt: this site for AI tools