Commands
Run these from the site’s root with npx caracms, or pnpm caracms in a pnpm site.
Command | What it does |
|---|---|
caracms init | Adds CaraCMS to an Astro site, or brings a set-up site’s skills and schemas up to date. Without --write it prints what it would change and changes nothing. |
caracms validate | Checks the content against the config. Exits with an error when there are problems. |
caracms schemas | Writes schemas/ from the config. |
caracms audit | Renders every page and lists what an editor can’t reach: words no field holds, and fields nothing on the page shows. |
caracms media import | Puts local images into the site’s media. |
caracms media push | Copies a standalone site’s images into CaraCMS Cloud. |
caracms start | Serves the built site. |
init
npx caracms initnpx caracms init --cloud --writenpx caracms init --self-hosted --railway --writeFlag | What it does |
|---|---|
--write | Applies the change. It needs a clean git tree. |
--cloud or --self-hosted | Says where the site runs, and writes it into the config. In a terminal, init asks if you leave it out. A flag that disagrees with the config starts a move between the two. |
--railway | Also writes a Railway setup, when the site has none. |
Run init again after every upgrade. It refreshes the skills and asks nothing.
validate
npx caracms validatenpx caracms validate --fixnpx caracms validate --jsonWith --fix it runs schemas first, then lays each content file out the way the editor saves it. Only whitespace changes.
media import
npx caracms media import photos/team.jpg photos/office.jpgIt uploads each file and prints its key and size, ready to use in a content file. On CaraCMS Cloud it needs the site’s key; standalone, the media bucket’s variables.
start
npx caracms startThis is the site’s start script. It serves the built site and works out each visitor’s IP for the limits on signing in, forms and downloads. A site started any other way refuses those routes.
llms.txt · llms-full.txt: this site for AI tools