Sanity logosanity.ioAll Systems Operational© Sanity 2026
Change Site Theme
Sanity logo

Documentation

    • Overview
    • Platform introduction
    • Next.js quickstart
    • Nuxt.js quickstart
    • Astro quickstart
    • React Router quickstart
    • Studio quickstart
    • Build with AI
    • Content Lake
    • Functions
    • APIs and SDKs
    • Agent Actions
    • Visual Editing
    • Blueprints
    • Platform management
    • Dashboard
    • Studio
    • Canvas
    • Media Library
    • App SDK
    • Content Agent
    • HTTP API
    • CLI
    • Libraries
    • Specifications
    • Changelog
    • User guides
    • Developer guides
    • Courses and certifications
    • Join the community
    • Templates
CLI reference
Overview

  • Configuration
  • Commands

    Backup CLI command reference
    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
    Tokens

On this page

Previous

Dev

Next

Documents

Was this page helpful?

On this page

  • Commands
  • browse
  • read
  • search
CLI referenceLast updated January 9, 2026

Docs

  • Article
  • Changelog

Opens the Sanity documentation

usage: npx sanity docs [--default] [-v|--version] [-d|--debug] [-h|--help] <command> [<args>]

Commands:
   browse  Open Sanity docs in a web browser
   read    Read an article in terminal
   search  Search Sanity docs

See 'npx sanity help docs <command>' for specific information on a subcommand.

Commands

browse

usage: npx sanity docs browse 

   Open Sanity docs in a web browser

read

usage: npx sanity docs read <path|url> [-w, --web]

   Read an article in terminal

Arguments
  <path> Path or URL to article, found in search results and docs content as links

Options
  -w, --web               Open in a web browser

Examples
  # Read as markdown in terminal
  sanity docs read /docs/studio/installation
  sanity docs read https://www.sanity.io/docs/studio/installation

  # Open in web browser
  sanity docs read /docs/studio/installation --web
  sanity docs read https://www.sanity.io/docs/studio/installation -w

search

usage: npx sanity docs search <query> [--limit <limit>]

   Search Sanity docs

Arguments
  <query> Search query for documentation

Options
  --limit <limit>   Maximum number of results to return [default: 10]

Examples
  # Search for documentation about schemas
  sanity docs search schema

  # Search with phrase
  sanity docs search "groq functions"

  # Limit search results
  sanity docs search "deployment" --limit=5
usage: npx sanity docs read <path|url> [-w, --web]

   Read an article in terminal

Arguments
  <path> Path or URL to article, found in search results and docs content as links

Options
  -w, --web               Open in a web browser

Examples
  # Read as markdown in terminal
  sanity docs read /docs/studio/installation
  sanity docs read https://www.sanity.io/docs/studio/installation

  # Open in web browser
  sanity docs read /docs/studio/installation --web
  sanity docs read https://www.sanity.io/docs/studio/installation -w