👉 Visit the DatoCMS homepage or see What is DatoCMS?
DatoCMS CLI tool for managing DatoCMS projects, environments and schemas.
- @datocms/cli: Main CLI package
- @datocms/cli-plugin-wordpress: CLI plugin to import WordPress websites into DatoCMS projects
- @datocms/cli-plugin-contentful: CLI plugin to import Contentful spaces into DatoCMS projects
This is an npm-workspaces monorepo: npm install links the packages to each
other, and Turborepo derives the build order from their dependencies, so there
is nothing to bootstrap.
npm install
npm run build
npm test
npm test includes the WordPress and Contentful import suites, which talk to
live APIs: they need a .env at the root (copy .env.sample) and, for
WordPress, docker compose up in packages/cli-plugin-wordpress. Each suite
checks its prerequisites first and tells you which one is missing.
Every push to a branch here publishes a preview of all the packages, which you
can run or install anywhere — no npm release, no npm link:
npx https://pkg.pr.new/datocms@<commit-sha> environments:list
npm i https://pkg.pr.new/@datocms/cli-plugin-wordpress@<commit-sha>
The exact URLs show up in the commit's check run on GitHub, and in a comment on the pull request once there is one. Installing one preview pulls in the previews of its siblings built from the same commit, so a change spanning several packages can be tried as one coherent set.
Previews are throwaway: they are never published to npm, and the URL stops
resolving after a while. Never commit one to a package.json that ships.
Maintainers only. A release publishes the packages that changed, and gives them all the same version number; the ones you didn't touch keep the version they already had.
- Describe your change. Run
npx changesetin the same PR that makes the change: it asks which packages are affected and whether the bump is a patch/minor/major, then writes a small markdown file under.changeset/which you commit.patchis for bug fixes only; new API surface isminor. See.changeset/README.md. - Release. From an up-to-date, clean
main, runnpm run release. It builds and tests first, then applies the pending changesets (bumping the versions and writing theCHANGELOG.mds), regenerates the oclif command reference in the READMEs of the packages that moved, publishes to npm, and only then tags each of themname@X.Y.Z, pushes, and publishes one GitHub release per tag — its notes are the changelog entries changesets just wrote.
If a release is interrupted, do not undo anything: run npm run release
again. It detects that some package is still missing from the registry and
resumes the publish instead of starting a new release.
npm run release:next does the same under the next dist-tag, leaving
latest untouched; its GitHub releases are marked as prereleases, so they
don't become the repository's "Latest release" either.
The script is @datocms/release-toolchain,
shared with every other DatoCMS repository and pinned here by tag;
toolchain/release.mjs is the twenty lines that are only true here, where the
oclif command reference has to be regenerated between the version bump and the
release commit.
Releases up to v4.0.29 carried a single vX.Y.Z tag covering the whole repo.
Those tags stay where they are; new ones are per package, which is also what the
source links in the generated command reference now point at.
DatoCMS is Headless CMS for the modern web. Trusted by 25,000+ businesses, agencies, and individuals, it gives your team one place to manage content and ship it to any website, app, or device via API.
New here? Start with Create free account and the Documentation. Stuck? Ask the Community. Curious what's new? Product Updates.
Building with AI: Agent Skills turn coding assistants (Claude Code, Cursor) into expert DatoCMS developers, with full read/write via the auto-installed CLI. No local terminal? Use the MCP Server instead.
Talking to DatoCMS from code:
- Content Delivery API (CDA) — the fast, read-only GraphQL API your website/app uses to fetch published content.
- Content Management API (CMA) — the REST API for creating and updating content, models, and project settings (think scripts, migrations, integrations).
- CLI — terminal tool for schema migrations and importing from Contentful/WordPress.
Framework guides: end-to-end recipes for fetching content, rendering Structured Text, optimizing images/video, handling SEO, and setting up live preview with visual editing in Next.js, Nuxt, Svelte, and Astro.
Want a head start? Browse our starter projects — ready-to-deploy example sites for popular frameworks.