Dollie Editor SDK guide

Package a Catalog

Distribute catalog content as one discoverable package.

A CatalogPackage combines sources with their editing and AI metadata.

import { defineCatalog } from "@dollie_ai/editor";

export const productCatalog = defineCatalog({
  id: "product-marketing",
  name: "Product marketing",
  version: "1.0.0",
  sources: [productSource],
  definitions: productSectionDefinitions,
  templates: [launchTemplate],
  ai: {
    instructions:
      "Use these sections for concise product marketing pages.",
  },
});

Add the package marker

Published npm catalogs declare the export in package.json:

{
  "x-dollie-editor": {
    "catalog": "./src/catalog-export.ts"
  }
}

That marker lets the CLI discover the catalog without a second project configuration format.

Add a catalog

npx dollie-editor add @acme/editor-catalog

The command installs the package and regenerates the discovered catalog module.

Run discovery again after changing dependencies:

npx dollie-editor discover

Verify

npx dollie-editor info --json

Confirm the package id, component ids, elements, and templates before storing pages that depend on them.