😎 Discover cool tips and tricks for customization in our next Developer Deep Dive virtual event - sign up now!

Answers from the community about CLI

Some of the conversations between community members on questions, suggestions and tips for using Sanity. Join our Slack to be a part of it.

TopicCategoriesFeaturedRepliesLast Updated
CLI Error - zsh: command not found17Jan 29, 2022
Hey all - what’s the quickest way to batch delete all documents of a certain type? It looks like the `sanity` cli tool allows...5Jan 29, 2021
Best way to convert HTML to a PortableText object?6Dec 3, 2020
Error reading sanity/cli after updating to version 3.35.213Mar 26, 2024
Running a query from the CLI and outputting it as a .ndjson file in Sanity.io4Feb 14, 2024
How to backup and restore data in Sanity.io using the CLI.3Dec 12, 2023
Error importing data into Sanity via CLI due to malformed data and internal server error.15Nov 7, 2023
How to backup Sanity Studio CMS content using the CLI.5Oct 2, 2023
Issue with stuck files in upload state resolved by deleting them via CLI in Sanity Studio 3.14.3.9Jul 26, 2023
Deleting a schema in Sanity does not delete related documents, but they can be deleted in batch using the CLI. The discussion...10Jul 10, 2023
Error importing data into Sanity project due to outdated CLI version8Jun 23, 2023
Draft document deleted via CLI still showing in desk tool's main document list12Jun 16, 2023
Error creating new project through CLI due to certificate verification issue12Jun 14, 2023
Troubleshooting a `sanity graphql deploy` error with a CLI upgrade/downgrade.17Jun 10, 2023
Issue with scrolling resolved after updating to latest version of Sanity CLI4May 31, 2023
Troubleshooting version mismatch between Sanity Studio and CLI28May 30, 2023
Error deploying project to Vercel due to missing module '@sanity/cli'4Feb 25, 2023
Error migrating data with CLI due to non-existent document reference34Jan 19, 2023