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
Troubleshooting schema extraction error in Sanity CLI version 3.45.07Jun 11, 2024
Quotas affected by importing/exporting datasets using Sanity CLI3Jun 3, 2024
Duplicating datasets in admin dashboard and using CLI for imports6May 21, 2024
How to back up your Sanity dataset using CLI or plugins.3Apr 20, 2024
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