
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeYou're reading that correctly! The npm create sanity@latest command is indeed designed to initialize a new Sanity Studio project, not specifically to integrate into existing applications. However, you can still use it with your existing Next.js app - let me explain how.
When you run this command in an existing Next.js project directory:
npm create sanity@latest
# or
npx sanity@latest initThe CLI will initialize a new Sanity Studio project through an interactive setup that:
The key is understanding that this creates a Sanity Studio project - its own set of files and configuration. You can specify where these files should go using the --output-path option:
npx sanity@latest init --output-path studioThis would create a studio folder within your Next.js project containing all the Sanity Studio files.
After initialization, you have two main approaches:
/studio), making it accessible alongside your main applicationFor unattended setup with defaults:
npx sanity@latest init -y --project <your-project-id> --dataset production --output-path studioAfter initialization, you'll need to install the necessary packages (like next-sanity) to connect your Next.js app to fetch content from Sanity. The init command sets up the Studio; connecting your Next.js frontend to query that content is a separate step using Sanity's client libraries.
Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.
Content operations
Content backend


The only platform powering content operations
By Industry


Tecovas strengthens their customer connections
Build and Share

Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag store