# datocms-plugin-sdk

> DatoCMS Plugin SDK

Latest version **2.4.2** (published 2026-09-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install datocms-plugin-sdk
pnpm add datocms-plugin-sdk
yarn add datocms-plugin-sdk
bun add datocms-plugin-sdk
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.4.2 |
| Published | 2026-09-03 |
| First published | 2021-11-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 5 |
| Unpacked size | 1.5 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 10 |
| Author | Stefano Verna |
| Maintainers | marcelofinamorvieira, stefanoverna, delphaber, mat_jack1, souljuse, sistrall_, datoroger |
| Keywords | datocms, plugin, sdk |

## Links

- npm: https://www.npmjs.com/package/datocms-plugin-sdk
- Repository: https://github.com/datocms/plugins-sdk
- Homepage: https://github.com/datocms/plugins-sdk/tree/master/packages/sdk#readme
- Issues: https://github.com/datocms/plugins-sdk/issues
- npm.io page: https://npm.io/package/datocms-plugin-sdk

## Dependencies (5)

- [penpal](https://npm.io/package/penpal.md) ^4.1.1
- [@types/react](https://npm.io/package/@types/react.md) ^17.0.3
- [emoji-regex-xs](https://npm.io/package/emoji-regex-xs.md) ^2.0.0
- [@datocms/cma-client](https://npm.io/package/@datocms/cma-client.md) ^6.1.0
- [datocms-structured-text-utils](https://npm.io/package/datocms-structured-text-utils.md) ^6.0.1

## Recent versions

- 2.4.2 (latest) — 2026-09-03
- 2.2.0-alpha.3 (next) — 2026-06-03
- 2.4.1 — 2026-09-03
- 2.4.0 — 2026-09-03
- 2.3.0 — 2026-09-03
- 2.2.7 — 2026-08-25
- 2.2.6 — 2026-07-17
- 2.2.5 — 2026-06-29
- 2.2.2 — 2026-06-04
- 2.2.1 — 2026-06-03
- 2.2.0-alpha.2 — 2026-06-03
- 2.2.0-alpha.1 — 2026-05-29
- 2.1.5 — 2026-05-14
- 3.0.1-alpha.0 — 2026-04-23
- 3.0.0-alpha.0 — 2026-04-21
- … 100 more at https://npm.io/package/datocms-plugin-sdk/versions

## README

# `datocms-plugin-sdk`

TypeScript SDK to build DatoCMS plugins.

## Using this SDK

To build a plugin with this SDK, see the official [DatoCMS Plugin SDK documentation](https://www.datocms.com/docs/plugin-sdk) for guides and API reference.

Plugins scaffolded from the official plugin template already include the SDK (alongside [`datocms-react-ui`](https://github.com/datocms/plugins-sdk/tree/master/packages/react-ui)). You should not need to manually add this.

## Developing

This package is developed in the [`datocms/plugins-sdk`](https://github.com/datocms/plugins-sdk) repository, an npm-workspaces monorepo (a single Git repo hosting multiple npm packages) built with [Turborepo](https://turborepo.com/) and released with [Changesets](https://github.com/changesets/changesets). The monorepo contains two packages, which share a version number whenever they are released together:

- `datocms-plugin-sdk` — this core plugin SDK;
- [`datocms-react-ui`](https://github.com/datocms/plugins-sdk/tree/master/packages/react-ui) — a React component library that depends on it.

To work on the SDK (e.g. to prepare a PR), clone the whole monorepo — this package isn't buildable standalone:

```sh
git clone https://github.com/datocms/plugins-sdk && cd plugins-sdk
npm install                          # workspaces: one install wires up both packages
npm run build                        # turbo; builds all packages in dependency order
```

To verify the checkout, `npm test` runs the monorepo's small Jest suite (unit tests for SDK and UI helpers); it takes a couple of seconds and every test should pass.

### Testing your changes inside a real plugin

Use the provided npm `install-in-place` script, which rebuilds **this package only** and copies its artifacts (`dist/`, `manifest.json`) over the copy installed in a plugin project:

```sh
cd packages/sdk
INSTALL_PATH=/path/to/your-plugin npm run install-in-place
```

Re-run it after every change; if the plugin uses Vite, restart the dev server with `--force` so its dependency cache doesn't serve stale bits. This is enough even if the plugin also uses `datocms-react-ui`: at runtime the UI library resolves `datocms-plugin-sdk` from the plugin's `node_modules`, so it picks up your copied build automatically. To restore the registry version afterwards, in the plugin run:

```sh
rm -rf node_modules/datocms-plugin-sdk node_modules/.vite && npm install
```

### Releasing (maintainers)

Every user-visible change needs a changeset: run `npx changeset` from the repo root in the same PR, pick the bump level (`patch` is for bug fixes only, new API surface is `minor`) and commit the file it writes under `.changeset/`.

To release, from an up-to-date, clean `master`, run `npm run release` from the repo root. It builds and tests, applies the pending changesets — bumping whichever packages changed, and writing their `CHANGELOG.md`s — publishes to npm, and only then tags each package `name@X.Y.Z`, pushes, and publishes a GitHub release per tag, whose notes come straight from those changelog entries. An interrupted release is resumed by re-running it, never undone. Use `npm run release:next` for a prerelease under the `next` dist-tag.

---
_Source: https://npm.io/package/datocms-plugin-sdk · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
