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
Blueprints
Overview

  • Introduction
  • Guides

    Deploy with GitHub Actions

  • Reference

    Configuration file
    CLI reference

On this page

Previous

Manage Sanity with code

Next

Deploy with GitHub Actions

Was this page helpful?

On this page

  • Requirements
  • Core concepts
  • Blueprint
  • Resource
  • Stack
  • Limitations
  • Stack limit
  • No nested blueprints
  • Troubleshooting
  • View stacks for a project
  • View current stack
  • Remove a stack
BlueprintsLast updated January 29, 2026

Blueprints introduction

Learn what Blueprints are, how they work, and how to get started.

Blueprints enable infrastructure-as-code level management of Sanity resources. At this time, Blueprints are limited to managing Functions.

Experimental feature

This article describes an experimental Sanity feature. The APIs described are subject to change and the documentation may not be completely accurate.

Requirements

  • The latest version of Sanity CLI (sanity@latest) is recommended to interact with Blueprints and Functions as shown in this guide. You can always run the latest CLI commands with npx sanity@latest.
  • Write access to your organization and project settings.

Core concepts

Blueprint

Like a configuration file, a blueprint lets you define and customize Sanity resources.

Blueprint configuration reference

Reference documentation for the Blueprint configuration files.

Resource

Core Sanity components are resources. For the time being, Functions are the only resource supported by Blueprints.

Learn more about Functions

Functions

Learn how to take advantage of Functions in your Sanity projects.

Create a Document Function

Start building with Functions by deploying a new function to Sanity's infrastructure.

Stack

A stack is a collection of resources that are managed as a single unit. These are linked to a project and can be multiple deployments of the same sanity.blueprint.ts configuration, or deployments for different blueprint configurations entirely.

For example, marketing might have a sanity.blueprint.ts that defines resources deployed to the marketing stack, while the commerce team may have their own sanity.blueprint.ts that deploys resources to the commerce stack.

You can view stacks with the sanity blueprints stacks command, and switch stacks by running sanity blueprints init or sanity blueprints config --edit in an existing blueprints project

Limitations

Stack limit

Projects have a limit of 3 stacks. If you reach your limit and want to remove a stack, see the Remove a stack steps below.

No nested blueprints

When creating multiple blueprints in a single project, you cannot nest blueprints in subdirectories of a directory containing a sanity.blueprint.ts file.

❌ For example, don't do this:

.
└── some-project/
    ├── sanity.blueprint.ts
    └── another-project/
        └── sanity.blueprint.ts

✅ Instead, do this:

.
└── some-project/
|   └── sanity.blueprint.ts
└── another-project/
    └── sanity.blueprint.ts

Troubleshooting

View stacks for a project

If you're unsure which stacks are deployed, run the blueprints stacks command.

npx sanity@latest blueprints stacks
pnpm dlx sanity@latest blueprints stacks
yarn dlx sanity@latest blueprints stacks
bunx sanity@latest blueprints stacks

View current stack

To view the currently selected stack, run the blueprints info command.

npx sanity@latest blueprints info
pnpm dlx sanity@latest blueprints info
yarn dlx sanity@latest blueprints info
bunx sanity@latest blueprints info

Remove a stack

To remove a deployed stack, run the following commands from a directory containing a configured blueprint for the same project as the stack you want to delete.

First, retrieve the stack identifier (it starts with ST-):

npx sanity@latest blueprints info
pnpm dlx sanity@latest blueprints info
yarn dlx sanity@latest blueprints info
bunx sanity@latest blueprints info

Next, run the following command with the stack identifier from the previous step.

blueprints destroy --stack-id <ST-someid>
  • Article
  • Changelog
.
└── some-project/
    ├── sanity.blueprint.ts
    └── another-project/
        └── sanity.blueprint.ts
.
└── some-project/
|   └── sanity.blueprint.ts
└── another-project/
    └── sanity.blueprint.ts
npx sanity@latest blueprints stacks
pnpm dlx sanity@latest blueprints stacks
yarn dlx sanity@latest blueprints stacks
bunx sanity@latest blueprints stacks
npx sanity@latest blueprints stacks
pnpm dlx sanity@latest blueprints stacks
yarn dlx sanity@latest blueprints stacks
bunx sanity@latest blueprints stacks
npx sanity@latest blueprints info
pnpm dlx sanity@latest blueprints info
yarn dlx sanity@latest blueprints info
bunx sanity@latest blueprints info
npx sanity@latest blueprints info
pnpm dlx sanity@latest blueprints info
yarn dlx sanity@latest blueprints info
bunx sanity@latest blueprints info
npx sanity@latest blueprints info
pnpm dlx sanity@latest blueprints info
yarn dlx sanity@latest blueprints info
bunx sanity@latest blueprints info
npx sanity@latest blueprints info
pnpm dlx sanity@latest blueprints info
yarn dlx sanity@latest blueprints info
bunx sanity@latest blueprints info
blueprints destroy --stack-id <ST-someid>