Skip to content

EmDash Quick Start

This page covers everything you need to get EmDash running locally and publish your first piece of content. Prerequisites to completion: about 5 minutes.

Prerequisites

  • Node.js 20 or later
  • A Cloudflare account (free tier works for development and most production sites)
  • npm or pnpm

1. Create a New Project

Use the EmDash starter template to scaffold a new project:

Terminal
npm create emdash@latest my-site
cd my-site
npm install

2. Start the Dev Server

The dev server runs database migrations, seeds initial content, and generates TypeScript types automatically on startup:

Terminal
npx emdash dev

Your site is now running at http://localhost:4321. The admin panel is at http://localhost:4321/_emdash/admin.

3. Complete Admin Setup

On first run, EmDash shows a setup wizard. You'll be asked to:

  1. Create your admin account (email + password)
  2. Set your site title and basic settings
  3. Confirm your default locale

4. Create Your First Content

In the admin panel, navigate to any collection and click New. Fill in the fields, then click Publish to make it live. Changes appear immediately on the dev server.

If you prefer working from the CLI or want AI agent content management, see the MCP server and CLI documentation.

Key Files to Know

  • astro.config.mjs — Astro config with the emdash() integration, Tailwind vite plugin, and Cloudflare adapter
  • seed/seed.json — Schema definitions and demo content (collections, fields, taxonomies, menus)
  • emdash-env.d.ts — Auto-generated TypeScript types for your collections (regenerated on dev server start)
  • src/live.config.ts — EmDash loader registration (boilerplate, don't modify)
  • data.db — Local SQLite database (do not delete unless resetting from scratch)

Useful Commands

Terminal
npx emdash dev          # Start dev server (migrations + seed + type generation)
npx emdash types        # Regenerate TypeScript types from schema
npx emdash seed seed/seed.json --validate  # Validate seed file without applying it

Next: read the Content Modeling guide to understand collections, fields, and the seed format.