Initialize a new Studio
Open Cursor and open the Terminal from the Command Palette or press Cmd+J
Run the following command to create a new Sanity project. If you are not logged into Sanity in the terminal, you will be asked to do so. If you do not yet have a Sanity account, you can create one for free.
The install command below has a few opinionated options preselected so that you won’t need to weigh up the options.
npm create sanity@latest -- --template blog --create-project "AI-powered Sanity" --dataset production --typescript --output-path apps/studiocd apps/studioThe files in your project (press Cmd+B to open the file browser pane) should now look like this:
ai-demo├── .cursor/│ └── rules├── apps/│ └── studio/│ └── ...other files and folders└── PRD.mdInstall the dependencies as instructed in the apps/studio directory.
# in apps/studionpm run devYou can now open the Studio at http://localhost:3333 and log in.
You now have a configured Sanity project that is a cloud-hosted real-time content database and a local Sanity Studio development server that is an admin interface for authoring content.
In the script that created this project we chose the “blog” template to create a new Sanity Studio. This is why you can currently see Post, Author, and Category document schema types in your studio.
You now have a Sanity Studio locally but it's only configured with a default blog template, let's prompt updates to the Studio to make it ours.