Installation
Get started with Sanity Studio by installing it in your project. The CLI will guide you through the setup process and create a preconfigured Studio.Prerequisites
Before you begin, ensure you have the following installed:Node.js: Version 20.19 or higher, or version 22.12 or higherYou can check your Node.js version by running:
- Package manager: npm (comes with Node.js), yarn, or pnpm
- A code editor: VS Code, WebStorm, or your preferred editor
- A Sanity account: Sign up for free at sanity.io
Quick install
The fastest way to get started is using thecreate sanity command, which scaffolds a new Sanity Studio project:
Installation process
When you run the installation command, the CLI will guide you through an interactive setup:Project setup
You’ll be prompted to:
- Log in or create an account - Authenticate with your Sanity account
- Choose a project - Select an existing project or create a new one
- Choose a dataset - Name your dataset (e.g.,
production,staging) - Add sample data - Optionally populate your project with example content
Project configuration
The CLI will:
- Create a new directory for your project
- Install all required dependencies
- Generate a
sanity.config.tsfile with your project configuration - Set up the default schema types
What gets installed
The installation process creates a project structure with:Key dependencies
The main packages installed are:sanity- The core Studio package (v5.13.0+)@sanity/vision- GROQ query playground toolreactandreact-dom- Required peer dependenciesstyled-components- Styling library for custom components
Manual installation
If you prefer to set up your project manually, you can install Sanity Studio in an existing project:Create configuration file
Create a Replace
sanity.config.ts file in your project root:sanity.config.ts
your-project-id with your actual Sanity project ID from sanity.io/manage.Verify installation
Once the development server is running, open your browser tohttp://localhost:3333. You should see:
- The Sanity Studio login screen (if not authenticated)
- After logging in, the Studio interface with the Structure Tool
Configuration
Yoursanity.config.ts file is the heart of your Studio setup. At minimum, it requires:
projectId- Your unique Sanity project identifierdataset- The dataset name for your contentplugins- An array of plugins (at leaststructureTool()recommended)schema.types- An array of schema type definitions
TypeScript support
Sanity Studio has first-class TypeScript support. The CLI automatically generates atsconfig.json for you:
tsconfig.json
Next steps
Quickstart guide
Follow the quickstart to create your first schema and documents
Schema types
Learn how to define document and field types
Configuration
Explore advanced configuration options
Plugins
Extend your Studio with community plugins