Introduction
sanity-plugin-document-manager adds a dedicated tool pane to Sanity Studio that lets you browse, search, filter, and bulk-delete documents across all your datasets.
Why?
Sanity Studio's built-in Structure tool is great for day-to-day editing, but it wasn't designed for operational tasks like finding orphaned documents, auditing content across datasets, or cleaning up drafts in bulk. This plugin fills that gap.
Key Capabilities
- Multi-dataset browsing — switch between production, staging, and development datasets from a single dropdown.
- Full-text search — filter by title, name, document ID, or type in real time.
- Type filtering with counts — see how many documents exist per type and drill into any one of them.
- Draft toggle — include or exclude draft documents to focus on published content.
- Bulk select & delete — pick documents with checkboxes and delete them in one atomic transaction.
- Paginated table — browse thousands of documents with configurable page sizes.
Quick Example
sanity.config.ts
import { defineConfig } from 'sanity'
import { documentManager } from 'sanity-plugin-document-manager'
export default defineConfig({
plugins: [
documentManager(),
],
})That's it. The plugin registers a "Document Manager" tool in your Studio navbar — no API keys or external services needed.