CLI Reference
Create
Section titled “Create”| Command | Where | Effect |
|---|---|---|
npm create @kenresoft-cms@latest my-cms |
anywhere | New CMS project (Git clone) |
npm create @kenresoft-cms@latest my-site -- --astro |
anywhere | New Astro starter |
npx @kenresoft-cms/create astro |
Astro project root | Connect an existing Astro project |
create astro options
Section titled “create astro options”| Option | Effect |
|---|---|
--cms-url <url> |
CMS API URL (must be http(s)) |
--no-install |
Do not install dependencies |
--update |
Refresh managed files and the package |
--force |
With --update: overwrite edited managed files |
--help |
Show help |
Exit code 2 means managed-file conflicts.
CMS repository
Section titled “CMS repository”| Command | Purpose |
|---|---|
pnpm run setup |
First deployment or reconfigure |
pnpm run update |
Pull, migrate, redeploy |
pnpm run rename-worker |
Rename a Worker and fix cross-references |
pnpm dev |
Start API and admin locally |
pnpm build · pnpm test · pnpm lint · pnpm typecheck · pnpm clean |
Repository tasks |
pnpm run test:scripts |
Tests for the setup/update scripts |
pnpm run update options
Section titled “pnpm run update options”Pass flags after --.
| Flag | Effect |
|---|---|
--branch <name> |
Upstream branch (env: UPDATE_BRANCH) |
--auth |
Better Auth URL |
--email |
Email provider |
--storage |
Show R2 storage config |
--database |
Show D1 config |
--domain |
API custom domain |
--admin-domain |
Admin custom domain |
--ci |
Non-interactive; reads BETTER_AUTH_URL_NEW, EMAIL_PROVIDER_NEW, EMAIL_FROM_NEW, RESEND_API_KEY_NEW. An unset variable means leave unchanged |
Only one category flag per run.
pnpm run rename-worker
Section titled “pnpm run rename-worker”pnpm run rename-worker -- --target api --name my-new-api--target is api or admin. It deploys a new Worker under the new name, updates cross-references (admin build, BETTER_AUTH_URL, CORS_ORIGINS, ADMIN_URL) and offers to delete the old Worker.