Sanity Starter
Sanity starter with localization utils, presentation tool and types generation
Sanity Starter
A Sanity Studio v6 starter template with built-in localization utilities, presentation tool, and automatic types generation.
Features
Localization utilities for multilingual content
- Types: localeBlock, localeSlug, localeString, localeText
- Utils: Languages array -> localization.ts, locale type factory -> locale.ts
Schema utilities β
hiddenUnlessandrequireWhenhelpers for conditional field logicTyped GROQ queries with auto-generated TypeScript result types
Presentation tool for custom document views
Automatic TypeScript types generation from Sanity schemas
Plugins Used
@sanity/language-filter: Language filter for Sanity Studiosanity-plugin-media: Digital asset manager for Sanity Studio
AI & MCP
Install the Sanity MCP server to let your AI assistant query, create, and patch documents directly β with automatic schema awareness, no manual context needed. Pair it with AGENTS.md for full project context across Claude, Cursor, Copilot, and other AI tools.
Scripts
dev: Start Sanity Studio in development modebuild: Build the Studio and generate typesdeploy: Deploy the Studiotypegen: Extract schema and generate TypeScript typestypegen:watch: Watch mode for type generation
Getting Started
- Install dependencies:
bun install - Set .env variables:
SANITY_STUDIO_ID="ID_HERE" SANITY_STUDIO_PREVIEW_URL="STUDIO_URL_HERE" SANITY_STUDIO_DATASET="production" - Start the development server:
bun run dev - Generate types:
bun run typegen
License
MIT