Quick Start

From an empty directory to a deployed, agent-managed site. Local-first: you never need a Cloudflare account until you deploy.

Install the CLI

The lumenpages-cms CLI is distributed via npm. Install it globally (requires Node.js 18 or later):

npm install -g lumenpages-cms

# verify the installation
lumenpages-cms --version

Prefer not to install anything? Prefix any command with npx instead, e.g. npx lumenpages-cms create.

Scaffold with the CLI

The CLI scaffolds a project configured for local development and seeds the local D1 database so the site works immediately:

lumenpages-cms create            # scaffold + generate keys + seed local D1 + admin JWT
cd my-project
lumenpages-cms dev               # local dev server at http://localhost:8787

create prompts for a project name, admin email, and app name, then writes everything to .dev.vars — keys, APP_URL=http://localhost:8787, and an admin JWT.

Or start from the source repo

git clone <repo> lumenpages-cms && cd lumenpages-cms
npm install
npm run setup        # creates tables + seeds demo content (local D1)
npm run dev          # start wrangler dev server

Connect your coding agent

The fastest way to build pages is to hand the CMS to an agent over MCP. Generate a token and register the server:

npm run jwt:sign -- --sub admin --exp 365d

# opencode
opencode mcp add lumenpages-cms \
  --url http://localhost:8787/mcp \
  --header "Authorization=Bearer <token>"

# Claude Code
claude mcp add --transport http lumenpages-cms http://localhost:8787/mcp \
  --header "Authorization: Bearer <token>"

Then just ask: "Create a home page at /". See MCP & Agents for the full tool list.

Deploy to the edge

lumenpages-cms deploy            # Worker + remote D1 + R2 + secrets + APP_URL
lumenpages-cms deploy --app-url https://cms.example.com

Deploy is idempotent: the schema runs safely on every push and seeding is skipped once the remote database has content.

CLI reference

CommandDescription
lumenpages-cms createScaffold a project for local development
lumenpages-cms create --deployScaffold and deploy immediately
lumenpages-cms devLocal dev server
lumenpages-cms deployDeploy to Cloudflare, provisioning remote resources
lumenpages-cms destroyRemove a deployed project and its resources
lumenpages-cms token --sub admin --exp 365dGenerate a signed JWT
lumenpages-cms db snapshotCapture a local D1 snapshot (--remote for Time Travel)
lumenpages-cms db snapshotsList stored snapshots
lumenpages-cms db restoreRestore the database to a snapshot (interactive or by id)

Configuration

Bindings (wrangler.jsonc)

BindingTypeDescription
DBD1 DatabaseSQLite database
BUCKETR2 BucketObject storage for files
EMAILSend EmailTransactional email sending
IMAGESImagesImage transformation at the edge
LOADERWorker LoaderDynamic Worker execution for custom handlers
ASSETSAssetsStatic asset serving (./public/)

Secrets (.dev.vars)

SecretDescription
JWT_PRIVATE_JWK / JWT_PUBLIC_JWKRS256 key pair for JWT auth and R2 URL signing
APP_NAMEDisplay name — available in templates as {{app.name}}
APP_URLPublic base URL — {{app.url}}
EMAIL_FROM / EMAIL_REPLY_TODefaults for outgoing email
API_ENABLEDEnable API and MCP endpoints

Tip: the public JWT key is exposed at /.well-known/jwks.json so external services can verify tokens Lumen issued.