👉 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.