Project Management
Open Management Interface
Open your project’s management interface in a web browser:https://www.sanity.io/manage/project/<project-id>(if in a project directory)https://www.sanity.io/manage/(if not in a project)
List Projects
List all projects you have access to:Create Project
Create a new Sanity project:- Project name
- Organization (if you belong to multiple)
- Project plan
Authentication
Login
Authenticate the CLI:--sso <slug>- Log in using Single Sign-On--provider <providerId>- Authenticate against a specific provider--no-open- Don’t open browser, only print URL
Logout
Log out from the CLI:- Revokes the current session
- Clears stored authentication token
- Clears cached telemetry consent
Documentation Access
Browse Documentation
Open Sanity documentation in your browser:Search Documentation
Search the documentation from the CLI:Read Documentation
Read documentation in the terminal:Development Tools
Debug Information
Gather debugging information:- Sanity CLI version
- Node.js version
- Package versions
- Project configuration
- System information
Check Versions
Show installed versions of Sanity packages:Install Plugin
Install a Sanity plugin:- Installs the npm package
- Adds it to
package.json - Optionally adds it to
sanity.config.ts
Modern Sanity projects use standard npm/pnpm/yarn commands. The
install command is primarily for backward compatibility.Type Generation
Generate TypeScript Types
Generate TypeScript types from your schema:--output <path>- Output file path (default:sanity.types.ts)--watch- Watch for changes and regenerate
Telemetry
Manage CLI telemetry settings.Check Status
Enable Telemetry
Disable Telemetry
Sanity Functions
Manage Sanity Functions (serverless functions).Development Server
Start local functions development server:View Logs
View function execution logs:Test Functions
Test functions locally:Manage Environment Variables
Manage function environment variables:Blueprints
Manage infrastructure blueprints (Infrastructure as Code).Initialize Blueprint
Plan Changes
Preview infrastructure changes:Deploy Blueprint
Apply infrastructure changes:View Blueprint Info
View Logs
Destroy Infrastructure
OpenAPI
Interact with Sanity OpenAPI specifications.List Specifications
Get Specification
Code Transformation
Run Codemod
Run codemods to transform your code:- Migrating between major versions
- Updating deprecated patterns
- Transforming schema definitions
Learning Resources
Interactive Learning
Access interactive learning resources:AI Editor Integration (MCP)
Configure Model Context Protocol for AI editor integration:- Cursor integration
- Windsurf integration
- Other MCP-compatible editors
Help
Get help for any command:Configuration Files
Management commands read from:sanity.cli.ts
CLI-specific configuration:sanity.cli.ts
sanity.config.ts
Studio configuration:sanity.config.ts
Environment Variables
Management commands respect:SANITY_AUTH_TOKEN- Authentication token (for CI/CD)SANITY_STUDIO_PROJECT_ID- Override project IDSANITY_STUDIO_DATASET- Override dataset
Common Workflows
Initial Project Setup
Adding Team Members
Debugging Issues
Type-Safe Development
Next Steps
CLI Overview
Return to CLI overview and command reference
Initialize Project
Learn about project initialization