Build CLI command reference

Builds the current Sanity configuration to a static bundle.

USAGE
  $ sanity build [OUTPUTDIR] [--yes] [--auto-updates] [--minify] [--source-maps] [--stats]

ARGUMENTS
  [OUTPUTDIR]  Output directory

FLAGS
  -y, --yes           Unattended mode, answers "yes" to any "yes/no" prompt and otherwise uses defaults
      --auto-updates  Enable/disable auto updates of studio versions
      --minify        Enable/disable minifying of built bundles
      --source-maps   Enable source maps for built bundles (increases size of bundle)
      --stats         Show stats about the built bundles

DESCRIPTION
  Build Sanity Studio into a static bundle

EXAMPLES
    $ sanity build

    $ sanity build --no-minify --source-maps

Was this page helpful?

sanity.ioAll Systems Operational© Sanity 2026
Change site theme