Skip to Content
Read the release notes before upgrading production environments.
SDKSDK Overview

Install

pnpm add @cms0/cms0

Initialize

import { cms0 } from "@cms0/cms0"; import type { Image, Seo } from "@cms0/cms0/custom-types"; type RootSchema = { HomePage: { title: string; heroImage: Image; seo?: Seo; }; }; const data = cms0<RootSchema>({ apiConfig: { baseUrl: process.env.CMS0_API_BASEURL, key: process.env.CMS0_API_KEY, }, });

Fetch content

const home = await data.HomePage(); console.log(home.title);

Metadata helpers

@cms0/cms0 includes utilities like toNextMetadata for SEO mapping in Next.js apps.

Error handling

Wrap SDK reads in standard request error handling and log context (resource name, locale, and projection options).