Skip to content

Quick Start

Once the CLI is available, setup will look like this:

Prerequisites

0. Configure your npm registry

@indiepub/* packages are distributed through a private registry. Before the CLI can install dependencies, set up your license key. The generated project will include an .npmrc that picks this up automatically.

1. Scaffold your project

Terminal window
pnpm create indiepub

The CLI will ask for your site title, author details, which theme to use, and which syndication targets to enable. It generates:

  • package.json with all required dependencies
  • .npmrc pointing @indiepub:registry at registry.indiepub.dev
  • astro.config.mjs with your integration config
  • wrangler.toml with Cloudflare D1 and R2 bindings
  • .dev.vars.example listing all required secrets
  • .github/workflows/deploy.yml for Cloudflare Pages CI (optional)

2. Install dependencies

Terminal window
cd my-site
pnpm install

3. Create your D1 database

Terminal window
npx wrangler d1 create my-site-db

Copy the database_id from the output into wrangler.toml.

4. Run migrations

Terminal window
pnpm db:migrate

5. Configure secrets

Copy .dev.vars.example to .dev.vars and fill in your values:

Terminal window
cp .dev.vars.example .dev.vars

At minimum you need INDIEPUB_TOKEN — a random secret used to authenticate Micropub and admin requests:

INDIEPUB_TOKEN=some-long-random-string

6. Start the dev server

Terminal window
pnpm dev

Visit http://localhost:4321 to see your site, and http://localhost:4321/admin/onboarding to set up your profile.

Next steps