Skip to content

Getting Started

A code-first CMS for Astro. Define collections in TypeScript and get a generated admin UI and typed content API.

Supports Astro’s route caching with tag-based invalidation.

Try live demo

Terminal window
pnpx create-kide-app

It then asks how you want the CMS runtime:

Command What it does
pnpm dev Start dev server (auto-generates schema, pushes to DB)
pnpm build Production build
pnpm check astro check + Cloudflare TS profile + eslint
pnpm test Run the test suite (vitest)
pnpm format Format with Prettier
pnpm cms:generate Regenerate .generated/ from cms.config.ts
pnpm cms:admin Create an admin user from the CLI
pnpm cms:mcp Start the local MCP server for AI-assisted editing
pnpm cms:push Sync the local SQLite DB to the generated schema
pnpm cms:upgrade Upgrade to a newer Kide release (see Updates)
pnpm cms:restore Roll back a failed upgrade from its backup
pnpm db:generate Generate migration SQL from schema changes (D1)

In dev mode, schema changes are pushed to the DB automatically. On the Node target, cms:push is the same sync used in deploys; migration files are for Cloudflare D1 only.

src/cms/
cms.config.ts # CMS config (locales, admin, collection imports)
collections/ # One file per collection (schema, access rules)
adapters/ # db / email / storage adapters (project-owned)
fields/ # Custom admin field components (optional)
runtime.ts # Wires adapters into the core runtime
.generated/ # Auto-generated (don't edit)
schema.ts # Drizzle tables
types.ts # TypeScript interfaces
validators.ts # Zod schemas
api.ts # Typed API
core/, admin/, routes/ # CMS runtime (embedded mode only — in package
middleware/, platform/ # mode these ship inside @kidecms/core)

Set these in .env for local development or through your deployment platform. The full table with production requirements is in Deploy.

Variable Description
AI_PROVIDER AI provider (openai)
AI_API_KEY AI provider API key
AI_MODEL AI model name (e.g. gpt-4o-mini)
RESEND_API_KEY Enables automatic invite emails for new users
RESEND_FROM_EMAIL Email sender address
CMS_TRUSTED_ORIGIN Canonical public origin for admin CSRF checks
CRON_SECRET Secures the cron endpoints (publish, tasks)

Astro 7, React 19, Drizzle ORM, SQLite (local) / D1 (Cloudflare), Zod, Tiptap, shadcn/ui, Tailwind CSS v4