Sanity logo

Documentation

    • Overview
    • Platform introduction
    • Next.js quickstart
    • Nuxt.js quickstart
    • Astro quickstart
    • React Router quickstart
    • Content Lake
    • Compute and AI
    • APIs and SDKs
    • Dashboard
    • Studio
    • Canvas
    • Media Library
    • Build custom apps
    • HTTP API
    • CLI
    • Libraries
    • Specifications
    • Changelog
    • User guides
    • Developer guides
    • Courses and certifications
    • Join the community
    • Templates
CLI reference
Overview

  • Configuration
  • Commands

    Backup
    Blueprints
    Build
    Codemod
    CORS
    Dataset
    Debug
    Deploy
    Dev
    Docs
    Documents
    Exec
    Functions
    GraphQL
    Help
    Hook
    Init
    Install
    Login
    Logout
    Manage
    Manifest
    Media
    Migration
    Preview
    Projects
    Schema
    Start
    Telemetry
    TypeGen
    Undeploy
    Users
    Versions

CLI referenceLast updated May 15, 2025

Sanity CLI

The sanity Command Line Interface (CLI) is a tool for interacting with the Sanity ecosystem from your terminal.

Common commands

Init

Initialize a new Sanity project or plugin

Dev

Starts a development server for the Sanity Studio

Docs

Opens the Sanity documentation

Deploy

Deploys a statically built Sanity studio

TypeGen

Generate TypeScript type definition from a Studio schema and GROQ queries

Schema

List, validate, extract, and deploy schema.

Sanity logosanity.ioAll Systems Operational© Sanity 2025