cms-lab documentation

cms-lab is a local CLI for checking the contract between headless CMS content and a Next.js App Router site. It runs from your project, fetches CMS documents, probes expected routes, and produces terminal, JSON, or a local HTML report.

How it works

The config declares your site URL, framework, CMS repository, route mappings, and optional required fields. The scanner loads CMS documents, resolves each expected path, checks the running site, then adds content diagnostics for SEO, images, UID, and required field gaps. Provider adapters keep the original CMS payload while normalizing stable IDs, UID-like slugs, status, and public URLs where the CMS exposes them.

Scopecms-lab supports Next.js App Router with Prismic, Strapi, Directus, and WordPress adapters. Shopify, internal links, and schema drift checks stay out of the default scan until they have adapters, fixtures, and release smoke coverage.

Install

Run without installing:

npx @cms-lab/cli scan

Or pin it in a project:

pnpm add -D @cms-lab/cli @cms-lab/core

Your first scan

Start your Next app, create a config file, then run scan. Use doctor first when connecting a repo for the first time.

first run
$ npx @cms-lab/cli doctor
config ok - cms-lab.config.ts
next app ok - app
site ok - http://localhost:3000
cms ok - 6 documents

$ npx @cms-lab/cli scan --report

Where to next