How to create a new project without creating all the studio files in Sanity.io.
Yes! You have a couple of options to create a new Sanity project without initializing all the studio files locally. This is perfect for your use case where you want to maintain your own private starter kit.
Option 1: Use the Management API (Recommended for your use case)
You can programmatically create projects using the Management API. This creates just the project in Sanity's system without any local files:
curl -X POST https://api.sanity.io/v2021-06-07/projects \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"displayName": "My New Project",
"organizationId": "org_abc123"
}'This returns a project ID and details, which you can then reference in your custom starter kit's configuration files.
Option 2: Use CLI flags to minimize scaffolding
While sanity init typically creates studio files, you can use the --create-project flag to create a project and control what gets initialized:
sanity init \
--create-project "My Project" \
--organization org_abc123 \
--dataset production \
--output-path ./studio \
-yYou can then discard the generated files and use your own starter kit instead.
Recommended workflow for your private starter kit:
- Create the project using the Management API (just the project, no files)
- Store the project ID returned from the API
- Clone your private starter kit repository
- Update the configuration in your starter kit with the new project ID and dataset name (typically in
sanity.config.tsorsanity.cli.ts) - Run your setup - your starter kit already has the schemas and structure you need
This way, you maintain full control over your starter kit structure while still creating properly configured Sanity projects. The Management API approach is cleaner since it doesn't create any local files you'd need to discard.
Sanity – Build the way you think, not the way your CMS thinks
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.