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.

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:push Sync the local SQLite DB to the generated schema (--recreate=<slugs>, --allow-data-loss)
pnpm cms:admin Create an admin user from the CLI
pnpm cms:seed Load src/cms/seed.ts into the database
pnpm cms:reindex Rebuild the full-text search index (see Search)
pnpm cms:describe Write .kide/model.json + MODEL.md, the content-model manifest (see Migrations)
pnpm cms:mcp Start the local MCP server for AI-assisted editing
pnpm cms:upgrade Embedded projects: upgrade to a newer release (see Updates)
pnpm cms:restore Embedded projects: roll back a failed upgrade from its backup
pnpm exec kide eject Package projects: convert to embedded mode (one-way)
pnpm db:generate Generate migration SQL from schema changes (D1)

Every cms:* script runs the kide bin (pnpm cms:push is kide push), which works the same in package and embedded mode.

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)
migrations/ # Drizzle SQL migrations (Cloudflare D1 only)
seed.ts # Seed content for `pnpm cms:seed` (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)
client/, internals/

What each project-owned file is for, and the full cms.config.ts shape, is in Configuration.

None are needed for local development. Email, AI features, and production settings are configured through environment variables listed in Deploy.

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