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
    • 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

CLI referenceLast updated January 9, 2026

Debug

Gathers information on Sanity environment

usage: sanity debug [--secrets]

   Gathers information on Sanity environment

Used to find information about the Sanity environment, and to debug Sanity-related issues.

Options
  --secrets Include API keys in output

Examples
  # Show information about the user, project, and local/global Sanity environment
  sanity debug

  # Include API keys in the output
  sanity debug --secrets
Previous

Dataset

Next

Deploy

Was this page helpful?