Sanity Studio v4.0.0: The sanity package is now on v4

✨ Highlights

sanity v4 is here

The `sanity` package is now on v4. The only breaking change is that it now requires Node.js 20, where it previously required Node.js 18. Learn more about why we're making this change and what it means for your apps.

If you have auto-updates enabled, your deployed studios will automatically move to v4. We only auto-update to major versions when they involve non-breaking runtime changes. Learn more about auto-updating studios.

Sanity docs CLI

We've updated the sanity docs command to make searching the documentation from the CLI easier. The sanity docs search and sanity docs read commands now let you, and your AI tooling, search and read docs pages without leaving the CLI.

Breaking: sanity docs is now a command group. The previous behavior of opening docs in browser is now sanity docs browse.

🐛 Notable bugfixes

Fixes an issue that could cause Agent Action execution to fail with 400 - Bad Request - Unable to create schema from schemaId if a schema had been deployed using Sanity version 3.99.0 and the Studio workspace had Media Library enabled. If you are affected by this issue, please redeploy your schema using the latest versions of sanity and @sanity/cli by running the command sanity schema deploy.

Install or upgrade Sanity Studio

To initiate a new Sanity Studio project or upgrade an existing one, please refer to our comprehensive guide on Installing and Upgrading Sanity Studio.

If you are updating from a version earlier than 3.37.0, you should also check out this article to ensure your dependencies are up to date.