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
| Command | Description |
|---|---|
lumenpages-cms create | Scaffold a project for local development |
lumenpages-cms create --deploy | Scaffold and deploy immediately |
lumenpages-cms dev | Local dev server |
lumenpages-cms deploy | Deploy to Cloudflare, provisioning remote resources |
lumenpages-cms destroy | Remove a deployed project and its resources |
lumenpages-cms token --sub admin --exp 365d | Generate a signed JWT |
lumenpages-cms db snapshot | Capture a local D1 snapshot (--remote for Time Travel) |
lumenpages-cms db snapshots | List stored snapshots |
lumenpages-cms db restore | Restore the database to a snapshot (interactive or by id) |
Configuration
Bindings (wrangler.jsonc)
| Binding | Type | Description |
|---|---|---|
DB | D1 Database | SQLite database |
BUCKET | R2 Bucket | Object storage for files |
EMAIL | Send Email | Transactional email sending |
IMAGES | Images | Image transformation at the edge |
LOADER | Worker Loader | Dynamic Worker execution for custom handlers |
ASSETS | Assets | Static asset serving (./public/) |
Secrets (.dev.vars)
| Secret | Description |
|---|---|
JWT_PRIVATE_JWK / JWT_PUBLIC_JWK | RS256 key pair for JWT auth and R2 URL signing |
APP_NAME | Display name — available in templates as {{app.name}} |
APP_URL | Public base URL — {{app.url}} |
EMAIL_FROM / EMAIL_REPLY_TO | Defaults for outgoing email |
API_ENABLED | Enable API and MCP endpoints |
Tip: the public JWT key is exposed at /.well-known/jwks.json so external services can verify tokens Lumen issued.