@sanity/cli 6.0.0-alpha.9 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (600) hide show
  1. package/README.md +602 -258
  2. package/bin/run.js +2 -0
  3. package/dist/SanityHelp.js +51 -23
  4. package/dist/SanityHelp.js.map +1 -1
  5. package/dist/actions/auth/authServer.js +28 -22
  6. package/dist/actions/auth/authServer.js.map +1 -1
  7. package/dist/actions/auth/login/getProvider.js +49 -38
  8. package/dist/actions/auth/login/getProvider.js.map +1 -1
  9. package/dist/actions/auth/login/getSSOProvider.js +25 -19
  10. package/dist/actions/auth/login/getSSOProvider.js.map +1 -1
  11. package/dist/actions/auth/login/login.js +12 -33
  12. package/dist/actions/auth/login/login.js.map +1 -1
  13. package/dist/actions/auth/types.js.map +1 -1
  14. package/dist/actions/backup/downloadAsset.js +9 -9
  15. package/dist/actions/backup/downloadAsset.js.map +1 -1
  16. package/dist/actions/backup/downloadDocument.js +8 -8
  17. package/dist/actions/backup/downloadDocument.js.map +1 -1
  18. package/dist/actions/build/buildApp.js +55 -18
  19. package/dist/actions/build/buildApp.js.map +1 -1
  20. package/dist/actions/build/buildStaticFiles.js +3 -2
  21. package/dist/actions/build/buildStaticFiles.js.map +1 -1
  22. package/dist/actions/build/buildStudio.js +72 -44
  23. package/dist/actions/build/buildStudio.js.map +1 -1
  24. package/dist/actions/build/buildVendorDependencies.js +18 -52
  25. package/dist/actions/build/buildVendorDependencies.js.map +1 -1
  26. package/dist/actions/build/checkRequiredDependencies.js +13 -8
  27. package/dist/actions/build/checkRequiredDependencies.js.map +1 -1
  28. package/dist/actions/build/checkStudioDependencyVersions.js +19 -17
  29. package/dist/actions/build/checkStudioDependencyVersions.js.map +1 -1
  30. package/dist/actions/build/createExternalFromImportMap.js +1 -1
  31. package/dist/actions/build/createExternalFromImportMap.js.map +1 -1
  32. package/dist/actions/build/determineBasePath.js +5 -2
  33. package/dist/actions/build/determineBasePath.js.map +1 -1
  34. package/dist/actions/build/getViteConfig.js +47 -4
  35. package/dist/actions/build/getViteConfig.js.map +1 -1
  36. package/dist/actions/build/handlePrereleaseVersions.js +44 -0
  37. package/dist/actions/build/handlePrereleaseVersions.js.map +1 -0
  38. package/dist/actions/build/renderDocument.js +6 -10
  39. package/dist/actions/build/renderDocument.js.map +1 -1
  40. package/dist/actions/build/renderDocumentWorker/components/BasicDocument.js +4 -4
  41. package/dist/actions/build/renderDocumentWorker/components/BasicDocument.js.map +1 -1
  42. package/dist/actions/build/renderDocumentWorker/components/DefaultDocument.js +3 -3
  43. package/dist/actions/build/renderDocumentWorker/components/DefaultDocument.js.map +1 -1
  44. package/dist/actions/build/renderDocumentWorker/components/GlobalErrorHandler.js +1 -0
  45. package/dist/actions/build/renderDocumentWorker/components/GlobalErrorHandler.js.map +1 -1
  46. package/dist/actions/build/renderDocumentWorker/getDocumentComponent.js +2 -2
  47. package/dist/actions/build/renderDocumentWorker/getDocumentComponent.js.map +1 -1
  48. package/dist/actions/build/renderDocumentWorker/renderDocumentWorker.js +1 -1
  49. package/dist/actions/build/renderDocumentWorker/renderDocumentWorker.js.map +1 -1
  50. package/dist/actions/build/shouldAutoUpdate.js +2 -0
  51. package/dist/actions/build/shouldAutoUpdate.js.map +1 -1
  52. package/dist/actions/build/types.js.map +1 -1
  53. package/dist/actions/build/writeFavicons.js +3 -5
  54. package/dist/actions/build/writeFavicons.js.map +1 -1
  55. package/dist/actions/build/writeSanityRuntime.js +4 -3
  56. package/dist/actions/build/writeSanityRuntime.js.map +1 -1
  57. package/dist/actions/codemods/reactIconsV3.js +2 -2
  58. package/dist/actions/codemods/reactIconsV3.js.map +1 -1
  59. package/dist/actions/dataset/create.js +7 -1
  60. package/dist/actions/dataset/create.js.map +1 -1
  61. package/dist/actions/dataset/determineDatasetAclMode.js.map +1 -1
  62. package/dist/actions/dataset/resolveDataset.js +26 -0
  63. package/dist/actions/dataset/resolveDataset.js.map +1 -0
  64. package/dist/actions/debug/formatters.js +22 -0
  65. package/dist/actions/debug/formatters.js.map +1 -0
  66. package/dist/actions/deploy/createStudioUserApplication.js +17 -4
  67. package/dist/actions/deploy/createStudioUserApplication.js.map +1 -1
  68. package/dist/actions/deploy/deployApp.js +41 -15
  69. package/dist/actions/deploy/deployApp.js.map +1 -1
  70. package/dist/actions/deploy/deployStudio.js +92 -44
  71. package/dist/actions/deploy/deployStudio.js.map +1 -1
  72. package/dist/actions/deploy/deployStudioSchemasAndManifests.js +55 -0
  73. package/dist/actions/deploy/deployStudioSchemasAndManifests.js.map +1 -0
  74. package/dist/actions/deploy/deployStudioSchemasAndManifests.worker.js +120 -0
  75. package/dist/actions/deploy/deployStudioSchemasAndManifests.worker.js.map +1 -0
  76. package/dist/actions/deploy/findUserApplicationForStudio.js +35 -12
  77. package/dist/actions/deploy/findUserApplicationForStudio.js.map +1 -1
  78. package/dist/actions/deploy/types.js +10 -1
  79. package/dist/actions/deploy/types.js.map +1 -1
  80. package/dist/actions/deploy/urlUtils.js +21 -0
  81. package/dist/actions/deploy/urlUtils.js.map +1 -0
  82. package/dist/actions/dev/getDashboardAppUrl.js +48 -0
  83. package/dist/actions/dev/getDashboardAppUrl.js.map +1 -0
  84. package/dist/actions/dev/getDevServerConfig.js +7 -3
  85. package/dist/actions/dev/getDevServerConfig.js.map +1 -1
  86. package/dist/actions/dev/startAppDevServer.js +3 -3
  87. package/dist/actions/dev/startAppDevServer.js.map +1 -1
  88. package/dist/actions/dev/startStudioDevServer.js +14 -14
  89. package/dist/actions/dev/startStudioDevServer.js.map +1 -1
  90. package/dist/actions/doctor/checks/cliInstallation.js +56 -0
  91. package/dist/actions/doctor/checks/cliInstallation.js.map +1 -0
  92. package/dist/actions/doctor/checks/index.js +16 -0
  93. package/dist/actions/doctor/checks/index.js.map +1 -0
  94. package/dist/actions/doctor/runDoctorChecks.js +56 -0
  95. package/dist/actions/doctor/runDoctorChecks.js.map +1 -0
  96. package/dist/actions/doctor/types.js +3 -0
  97. package/dist/actions/doctor/types.js.map +1 -0
  98. package/dist/actions/documents/types.js.map +1 -1
  99. package/dist/actions/documents/validate.js +11 -2
  100. package/dist/actions/documents/validate.js.map +1 -1
  101. package/dist/actions/documents/validateDocuments.worker.js +4 -4
  102. package/dist/actions/documents/validateDocuments.worker.js.map +1 -1
  103. package/dist/actions/documents/validation/reporters/jsonReporter.js +1 -1
  104. package/dist/actions/documents/validation/reporters/jsonReporter.js.map +1 -1
  105. package/dist/actions/documents/validation/reporters/ndjsonReporter.js +1 -1
  106. package/dist/actions/documents/validation/reporters/ndjsonReporter.js.map +1 -1
  107. package/dist/actions/documents/validation/reporters/prettyReporter/formatDocumentValidation.js +1 -1
  108. package/dist/actions/documents/validation/reporters/prettyReporter/formatDocumentValidation.js.map +1 -1
  109. package/dist/actions/documents/validation/reporters/prettyReporter/tree.js +108 -0
  110. package/dist/actions/documents/validation/reporters/prettyReporter/tree.js.map +1 -0
  111. package/dist/actions/graphql/SchemaError.js +4 -26
  112. package/dist/actions/graphql/SchemaError.js.map +1 -1
  113. package/dist/actions/graphql/__tests__/fixtures/many-self-refs.js +540 -0
  114. package/dist/actions/graphql/__tests__/fixtures/many-self-refs.js.map +1 -0
  115. package/dist/actions/graphql/__tests__/fixtures/test-studio.js +1143 -0
  116. package/dist/actions/graphql/__tests__/fixtures/test-studio.js.map +1 -0
  117. package/dist/actions/graphql/__tests__/fixtures/union-refs.js +591 -0
  118. package/dist/actions/graphql/__tests__/fixtures/union-refs.js.map +1 -0
  119. package/dist/actions/graphql/__tests__/helpers.js +23 -0
  120. package/dist/actions/graphql/__tests__/helpers.js.map +1 -0
  121. package/dist/actions/graphql/extractFromSanitySchema.js +5 -5
  122. package/dist/actions/graphql/extractFromSanitySchema.js.map +1 -1
  123. package/dist/actions/graphql/extractGraphQLAPIs.js +150 -0
  124. package/dist/actions/graphql/extractGraphQLAPIs.js.map +1 -0
  125. package/dist/actions/graphql/extractGraphQLAPIs.worker.js +12 -0
  126. package/dist/actions/graphql/extractGraphQLAPIs.worker.js.map +1 -0
  127. package/dist/actions/graphql/gen1/generateTypeFilters.js +1 -1
  128. package/dist/actions/graphql/gen1/generateTypeFilters.js.map +1 -1
  129. package/dist/actions/graphql/gen1/generateTypeQueries.js +2 -1
  130. package/dist/actions/graphql/gen1/generateTypeQueries.js.map +1 -1
  131. package/dist/actions/graphql/gen1/index.js +5 -5
  132. package/dist/actions/graphql/gen1/index.js.map +1 -1
  133. package/dist/actions/graphql/gen2/generateTypeQueries.js +1 -1
  134. package/dist/actions/graphql/gen2/generateTypeQueries.js.map +1 -1
  135. package/dist/actions/graphql/gen2/index.js +6 -6
  136. package/dist/actions/graphql/gen2/index.js.map +1 -1
  137. package/dist/actions/graphql/gen3/generateTypeQueries.js +3 -4
  138. package/dist/actions/graphql/gen3/generateTypeQueries.js.map +1 -1
  139. package/dist/actions/graphql/gen3/index.js +6 -7
  140. package/dist/actions/graphql/gen3/index.js.map +1 -1
  141. package/dist/actions/graphql/getGraphQLAPIs.js +15 -57
  142. package/dist/actions/graphql/getGraphQLAPIs.js.map +1 -1
  143. package/dist/actions/graphql/getGraphQLAPIs.worker.js +75 -106
  144. package/dist/actions/graphql/getGraphQLAPIs.worker.js.map +1 -1
  145. package/dist/actions/graphql/helpers.js +13 -0
  146. package/dist/actions/graphql/helpers.js.map +1 -1
  147. package/dist/actions/graphql/resolveGraphQLApisFromWorkspaces.js +187 -0
  148. package/dist/actions/graphql/resolveGraphQLApisFromWorkspaces.js.map +1 -0
  149. package/dist/actions/graphql/types.js +1 -1
  150. package/dist/actions/graphql/types.js.map +1 -1
  151. package/dist/actions/init/bootstrapLocalTemplate.js +10 -8
  152. package/dist/actions/init/bootstrapLocalTemplate.js.map +1 -1
  153. package/dist/actions/init/bootstrapRemoteTemplate.js +6 -5
  154. package/dist/actions/init/bootstrapRemoteTemplate.js.map +1 -1
  155. package/dist/actions/init/bootstrapTemplate.js.map +1 -1
  156. package/dist/actions/init/checkNextJsReactCompatibility.js +1 -1
  157. package/dist/actions/init/checkNextJsReactCompatibility.js.map +1 -1
  158. package/dist/actions/init/createAppCliConfig.js.map +1 -1
  159. package/dist/actions/init/createCliConfig.js.map +1 -1
  160. package/dist/actions/init/createPackageManifest.js +21 -9
  161. package/dist/actions/init/createPackageManifest.js.map +1 -1
  162. package/dist/actions/init/remoteTemplate.js +1 -2
  163. package/dist/actions/init/remoteTemplate.js.map +1 -1
  164. package/dist/actions/init/sdkAppDependencies.js +19 -0
  165. package/dist/actions/init/sdkAppDependencies.js.map +1 -0
  166. package/dist/actions/init/studioDependencies.js.map +1 -0
  167. package/dist/actions/init/templates/appQuickstart.js +1 -22
  168. package/dist/actions/init/templates/appQuickstart.js.map +1 -1
  169. package/dist/actions/init/templates/appSanityUi.js +3 -22
  170. package/dist/actions/init/templates/appSanityUi.js.map +1 -1
  171. package/dist/actions/init/types.js.map +1 -1
  172. package/dist/actions/manifest/SchemaIcon.js +6 -4
  173. package/dist/actions/manifest/SchemaIcon.js.map +1 -1
  174. package/dist/actions/manifest/blockTypeTransformer.js +67 -0
  175. package/dist/actions/manifest/blockTypeTransformer.js.map +1 -0
  176. package/dist/actions/manifest/debug.js +4 -0
  177. package/dist/actions/manifest/debug.js.map +1 -0
  178. package/dist/actions/manifest/extractAppManifest.js +39 -22
  179. package/dist/actions/manifest/extractAppManifest.js.map +1 -1
  180. package/dist/actions/manifest/extractManifest.js +27 -78
  181. package/dist/actions/manifest/extractManifest.js.map +1 -1
  182. package/dist/actions/manifest/extractManifest.worker.js +30 -0
  183. package/dist/actions/manifest/extractManifest.worker.js.map +1 -0
  184. package/dist/actions/manifest/extractWorkspaceManifest.js +31 -372
  185. package/dist/actions/manifest/extractWorkspaceManifest.js.map +1 -1
  186. package/dist/actions/manifest/iconResolver.js +30 -0
  187. package/dist/actions/manifest/iconResolver.js.map +1 -0
  188. package/dist/actions/manifest/referenceTransformer.js +51 -0
  189. package/dist/actions/manifest/referenceTransformer.js.map +1 -0
  190. package/dist/actions/manifest/schemaTypeHelpers.js +2 -2
  191. package/dist/actions/manifest/schemaTypeHelpers.js.map +1 -1
  192. package/dist/actions/manifest/schemaTypeTransformer.js +168 -0
  193. package/dist/actions/manifest/schemaTypeTransformer.js.map +1 -0
  194. package/dist/actions/manifest/transformerUtils.js +40 -0
  195. package/dist/actions/manifest/transformerUtils.js.map +1 -0
  196. package/dist/actions/manifest/types.js +5 -0
  197. package/dist/actions/manifest/types.js.map +1 -1
  198. package/dist/actions/manifest/validationTransformer.js +84 -0
  199. package/dist/actions/manifest/validationTransformer.js.map +1 -0
  200. package/dist/actions/manifest/writeManifestFile.js +30 -0
  201. package/dist/actions/manifest/writeManifestFile.js.map +1 -0
  202. package/dist/actions/manifest/writeWorkspaceFiles.js +30 -0
  203. package/dist/actions/manifest/writeWorkspaceFiles.js.map +1 -0
  204. package/dist/actions/mcp/detectAvailableEditors.js +16 -4
  205. package/dist/actions/mcp/detectAvailableEditors.js.map +1 -1
  206. package/dist/actions/mcp/editorConfigs.js +64 -6
  207. package/dist/actions/mcp/editorConfigs.js.map +1 -1
  208. package/dist/actions/mcp/setupMCP.js.map +1 -1
  209. package/dist/actions/mcp/writeMCPConfig.js +27 -15
  210. package/dist/actions/mcp/writeMCPConfig.js.map +1 -1
  211. package/dist/actions/media/buildNdjsonIndex.js +32 -0
  212. package/dist/actions/media/buildNdjsonIndex.js.map +1 -0
  213. package/dist/actions/media/importAspects.js +2 -11
  214. package/dist/actions/media/importAspects.js.map +1 -1
  215. package/dist/actions/media/importMedia.js +22 -18
  216. package/dist/actions/media/importMedia.js.map +1 -1
  217. package/dist/actions/organizations/findOrganizationByUserName.js +5 -0
  218. package/dist/actions/organizations/findOrganizationByUserName.js.map +1 -0
  219. package/dist/actions/organizations/getOrganization.js +3 -2
  220. package/dist/actions/organizations/getOrganization.js.map +1 -1
  221. package/dist/actions/organizations/getOrganizationChoices.js +27 -19
  222. package/dist/actions/organizations/getOrganizationChoices.js.map +1 -1
  223. package/dist/actions/organizations/types.js +3 -0
  224. package/dist/actions/organizations/types.js.map +1 -0
  225. package/dist/actions/projects/getManageUrl.js +1 -2
  226. package/dist/actions/projects/getManageUrl.js.map +1 -1
  227. package/dist/actions/schema/deleteSchemaAction.js +14 -30
  228. package/dist/actions/schema/deleteSchemaAction.js.map +1 -1
  229. package/dist/actions/schema/deploySchemas.js +22 -91
  230. package/dist/actions/schema/deploySchemas.js.map +1 -1
  231. package/dist/actions/schema/extractSanitySchema.worker.js +0 -5
  232. package/dist/actions/schema/extractSanitySchema.worker.js.map +1 -1
  233. package/dist/actions/schema/extractSanityWorkspace.worker.js +24 -0
  234. package/dist/actions/schema/extractSanityWorkspace.worker.js.map +1 -0
  235. package/dist/actions/schema/extractSchema.js +8 -40
  236. package/dist/actions/schema/extractSchema.js.map +1 -1
  237. package/dist/actions/schema/extractSchemaWatcher.js +128 -0
  238. package/dist/actions/schema/extractSchemaWatcher.js.map +1 -0
  239. package/dist/actions/schema/formatSchemaValidation.js +5 -1
  240. package/dist/actions/schema/formatSchemaValidation.js.map +1 -1
  241. package/dist/actions/schema/getExtractOptions.js +16 -0
  242. package/dist/actions/schema/getExtractOptions.js.map +1 -0
  243. package/dist/actions/schema/listSchemas.js +53 -56
  244. package/dist/actions/schema/listSchemas.js.map +1 -1
  245. package/dist/actions/schema/matchSchemaPattern.js +22 -0
  246. package/dist/actions/schema/matchSchemaPattern.js.map +1 -0
  247. package/dist/actions/schema/runSchemaExtraction.js +39 -0
  248. package/dist/actions/schema/runSchemaExtraction.js.map +1 -0
  249. package/dist/actions/schema/types.js +8 -0
  250. package/dist/actions/schema/types.js.map +1 -1
  251. package/dist/actions/schema/uniqueWorkspaces.worker.js +24 -0
  252. package/dist/actions/schema/uniqueWorkspaces.worker.js.map +1 -0
  253. package/dist/actions/schema/updateWorkspaceSchema.js +63 -0
  254. package/dist/actions/schema/updateWorkspaceSchema.js.map +1 -0
  255. package/dist/actions/schema/uploadSchemaToLexicon.js +87 -0
  256. package/dist/actions/schema/uploadSchemaToLexicon.js.map +1 -0
  257. package/dist/actions/schema/utils/SchemaExtractionError.js +10 -0
  258. package/dist/actions/schema/utils/SchemaExtractionError.js.map +1 -0
  259. package/dist/actions/schema/utils/schemaStoreValidation.js +1 -15
  260. package/dist/actions/schema/utils/schemaStoreValidation.js.map +1 -1
  261. package/dist/actions/schema/utils/uniqByProjectIdDataset.js +1 -1
  262. package/dist/actions/schema/utils/uniqByProjectIdDataset.js.map +1 -1
  263. package/dist/actions/schema/validateSchema.worker.js +1 -8
  264. package/dist/actions/schema/validateSchema.worker.js.map +1 -1
  265. package/dist/actions/schema/watchExtractSchema.js +72 -0
  266. package/dist/actions/schema/watchExtractSchema.js.map +1 -0
  267. package/dist/actions/telemetry/isTrueish.js +10 -0
  268. package/dist/actions/telemetry/isTrueish.js.map +1 -0
  269. package/dist/actions/telemetry/resolveConsent.js +2 -1
  270. package/dist/actions/telemetry/resolveConsent.js.map +1 -1
  271. package/dist/actions/telemetry/setConsent.js +2 -1
  272. package/dist/actions/telemetry/setConsent.js.map +1 -1
  273. package/dist/actions/users/getMembersForProject.js.map +1 -1
  274. package/dist/actions/users/getPendingInvitations.js +1 -1
  275. package/dist/actions/users/getPendingInvitations.js.map +1 -1
  276. package/dist/actions/users/types.js.map +1 -1
  277. package/dist/actions/versions/filterSanityModules.js.map +1 -1
  278. package/dist/actions/versions/findSanityModulesVersions.js +2 -3
  279. package/dist/actions/versions/findSanityModulesVersions.js.map +1 -1
  280. package/dist/actions/versions/getFormatters.js +1 -1
  281. package/dist/actions/versions/getFormatters.js.map +1 -1
  282. package/dist/actions/versions/tryFindLatestVersion.js +1 -1
  283. package/dist/actions/versions/tryFindLatestVersion.js.map +1 -1
  284. package/dist/commands/backup/disable.js +22 -7
  285. package/dist/commands/backup/disable.js.map +1 -1
  286. package/dist/commands/backup/download.js +19 -10
  287. package/dist/commands/backup/download.js.map +1 -1
  288. package/dist/commands/backup/enable.js +22 -7
  289. package/dist/commands/backup/enable.js.map +1 -1
  290. package/dist/commands/backup/list.js +20 -8
  291. package/dist/commands/backup/list.js.map +1 -1
  292. package/dist/commands/build.js +2 -5
  293. package/dist/commands/build.js.map +1 -1
  294. package/dist/commands/cors/add.js +20 -7
  295. package/dist/commands/cors/add.js.map +1 -1
  296. package/dist/commands/cors/delete.js +22 -7
  297. package/dist/commands/cors/delete.js.map +1 -1
  298. package/dist/commands/cors/list.js +22 -7
  299. package/dist/commands/cors/list.js.map +1 -1
  300. package/dist/commands/dataset/alias/create.js +26 -7
  301. package/dist/commands/dataset/alias/create.js.map +1 -1
  302. package/dist/commands/dataset/alias/delete.js +20 -7
  303. package/dist/commands/dataset/alias/delete.js.map +1 -1
  304. package/dist/commands/dataset/alias/link.js +20 -7
  305. package/dist/commands/dataset/alias/link.js.map +1 -1
  306. package/dist/commands/dataset/alias/unlink.js +20 -7
  307. package/dist/commands/dataset/alias/unlink.js.map +1 -1
  308. package/dist/commands/dataset/copy.js +45 -30
  309. package/dist/commands/dataset/copy.js.map +1 -1
  310. package/dist/commands/dataset/create.js +32 -7
  311. package/dist/commands/dataset/create.js.map +1 -1
  312. package/dist/commands/dataset/delete.js +16 -7
  313. package/dist/commands/dataset/delete.js.map +1 -1
  314. package/dist/commands/dataset/embeddings/disable.js +77 -0
  315. package/dist/commands/dataset/embeddings/disable.js.map +1 -0
  316. package/dist/commands/dataset/embeddings/enable.js +141 -0
  317. package/dist/commands/dataset/embeddings/enable.js.map +1 -0
  318. package/dist/commands/dataset/embeddings/status.js +72 -0
  319. package/dist/commands/dataset/embeddings/status.js.map +1 -0
  320. package/dist/commands/dataset/export.js +25 -16
  321. package/dist/commands/dataset/export.js.map +1 -1
  322. package/dist/commands/dataset/import.js +306 -1
  323. package/dist/commands/dataset/import.js.map +1 -1
  324. package/dist/commands/dataset/list.js +22 -7
  325. package/dist/commands/dataset/list.js.map +1 -1
  326. package/dist/commands/dataset/visibility/get.js +18 -7
  327. package/dist/commands/dataset/visibility/get.js.map +1 -1
  328. package/dist/commands/dataset/visibility/set.js +22 -7
  329. package/dist/commands/dataset/visibility/set.js.map +1 -1
  330. package/dist/commands/debug.js +4 -2
  331. package/dist/commands/debug.js.map +1 -1
  332. package/dist/commands/deploy.js +22 -11
  333. package/dist/commands/deploy.js.map +1 -1
  334. package/dist/commands/dev.js +2 -4
  335. package/dist/commands/dev.js.map +1 -1
  336. package/dist/commands/doctor.js +125 -0
  337. package/dist/commands/doctor.js.map +1 -0
  338. package/dist/commands/documents/create.js +19 -12
  339. package/dist/commands/documents/create.js.map +1 -1
  340. package/dist/commands/documents/delete.js +19 -12
  341. package/dist/commands/documents/delete.js.map +1 -1
  342. package/dist/commands/documents/get.js +17 -12
  343. package/dist/commands/documents/get.js.map +1 -1
  344. package/dist/commands/documents/query.js +26 -18
  345. package/dist/commands/documents/query.js.map +1 -1
  346. package/dist/commands/documents/validate.js +32 -10
  347. package/dist/commands/documents/validate.js.map +1 -1
  348. package/dist/commands/graphql/deploy.js +58 -30
  349. package/dist/commands/graphql/deploy.js.map +1 -1
  350. package/dist/commands/graphql/list.js +15 -7
  351. package/dist/commands/graphql/list.js.map +1 -1
  352. package/dist/commands/graphql/undeploy.js +37 -19
  353. package/dist/commands/graphql/undeploy.js.map +1 -1
  354. package/dist/commands/hook/attempt.js +22 -7
  355. package/dist/commands/hook/attempt.js.map +1 -1
  356. package/dist/commands/hook/create.js +23 -8
  357. package/dist/commands/hook/create.js.map +1 -1
  358. package/dist/commands/hook/delete.js +22 -7
  359. package/dist/commands/hook/delete.js.map +1 -1
  360. package/dist/commands/hook/list.js +22 -7
  361. package/dist/commands/hook/list.js.map +1 -1
  362. package/dist/commands/hook/logs.js +21 -8
  363. package/dist/commands/hook/logs.js.map +1 -1
  364. package/dist/commands/init.js +46 -28
  365. package/dist/commands/init.js.map +1 -1
  366. package/dist/commands/login.js +19 -6
  367. package/dist/commands/login.js.map +1 -1
  368. package/dist/commands/logout.js +8 -6
  369. package/dist/commands/logout.js.map +1 -1
  370. package/dist/commands/manage.js +0 -1
  371. package/dist/commands/manage.js.map +1 -1
  372. package/dist/commands/manifest/extract.js +14 -10
  373. package/dist/commands/manifest/extract.js.map +1 -1
  374. package/dist/commands/mcp/configure.js +1 -1
  375. package/dist/commands/mcp/configure.js.map +1 -1
  376. package/dist/commands/media/create-aspect.js +4 -4
  377. package/dist/commands/media/create-aspect.js.map +1 -1
  378. package/dist/commands/media/delete-aspect.js +9 -7
  379. package/dist/commands/media/delete-aspect.js.map +1 -1
  380. package/dist/commands/media/deploy-aspect.js +22 -9
  381. package/dist/commands/media/deploy-aspect.js.map +1 -1
  382. package/dist/commands/media/export.js +9 -7
  383. package/dist/commands/media/export.js.map +1 -1
  384. package/dist/commands/media/import.js +10 -8
  385. package/dist/commands/media/import.js.map +1 -1
  386. package/dist/commands/preview.js +2 -4
  387. package/dist/commands/preview.js.map +1 -1
  388. package/dist/commands/projects/list.js +2 -1
  389. package/dist/commands/projects/list.js.map +1 -1
  390. package/dist/commands/schema/delete.js +33 -34
  391. package/dist/commands/schema/delete.js.map +1 -1
  392. package/dist/commands/schema/deploy.js +19 -30
  393. package/dist/commands/schema/deploy.js.map +1 -1
  394. package/dist/commands/schema/extract.js +32 -4
  395. package/dist/commands/schema/extract.js.map +1 -1
  396. package/dist/commands/schema/list.js +10 -31
  397. package/dist/commands/schema/list.js.map +1 -1
  398. package/dist/commands/tokens/add.js +24 -7
  399. package/dist/commands/tokens/add.js.map +1 -1
  400. package/dist/commands/tokens/delete.js +20 -7
  401. package/dist/commands/tokens/delete.js.map +1 -1
  402. package/dist/commands/tokens/list.js +20 -7
  403. package/dist/commands/tokens/list.js.map +1 -1
  404. package/dist/commands/users/invite.js +24 -7
  405. package/dist/commands/users/invite.js.map +1 -1
  406. package/dist/commands/users/list.js +76 -33
  407. package/dist/commands/users/list.js.map +1 -1
  408. package/dist/commands/versions.js +1 -1
  409. package/dist/commands/versions.js.map +1 -1
  410. package/dist/config/createCliConfig.js +1 -2
  411. package/dist/config/createCliConfig.js.map +1 -1
  412. package/dist/exports/_internal.d.ts +132 -0
  413. package/dist/exports/_internal.js +4 -0
  414. package/dist/exports/_internal.js.map +1 -0
  415. package/dist/exports/index.d.ts +113 -0
  416. package/dist/exports/index.js +6 -0
  417. package/dist/exports/index.js.map +1 -0
  418. package/dist/hooks/init/checkForUpdates.js +14 -0
  419. package/dist/hooks/init/checkForUpdates.js.map +1 -0
  420. package/dist/hooks/prerun/flushTelemetry.worker.js +1 -1
  421. package/dist/hooks/prerun/flushTelemetry.worker.js.map +1 -1
  422. package/dist/hooks/prerun/injectEnvVariables.js +9 -1
  423. package/dist/hooks/prerun/injectEnvVariables.js.map +1 -1
  424. package/dist/hooks/prerun/setupTelemetry.js +9 -3
  425. package/dist/hooks/prerun/setupTelemetry.js.map +1 -1
  426. package/dist/prompts/promptForProject.js +64 -0
  427. package/dist/prompts/promptForProject.js.map +1 -0
  428. package/dist/{actions/auth/login/promptProviders.js → prompts/promptForProviders.js} +3 -3
  429. package/dist/prompts/promptForProviders.js.map +1 -0
  430. package/dist/prompts/selectMediaLibrary.js +1 -1
  431. package/dist/prompts/selectMediaLibrary.js.map +1 -1
  432. package/dist/server/devServer.js +4 -2
  433. package/dist/server/devServer.js.map +1 -1
  434. package/dist/server/previewServer.js +2 -2
  435. package/dist/server/previewServer.js.map +1 -1
  436. package/dist/server/vite/plugin-schema-extraction.js +201 -0
  437. package/dist/server/vite/plugin-schema-extraction.js.map +1 -0
  438. package/dist/server/vite/plugin-typegen.js +217 -0
  439. package/dist/server/vite/plugin-typegen.js.map +1 -0
  440. package/dist/services/auth.js +42 -3
  441. package/dist/services/auth.js.map +1 -1
  442. package/dist/services/datasets.js +7 -5
  443. package/dist/services/datasets.js.map +1 -1
  444. package/dist/services/docs.js +2 -2
  445. package/dist/services/docs.js.map +1 -1
  446. package/dist/services/embeddings.js +25 -0
  447. package/dist/services/embeddings.js.map +1 -0
  448. package/dist/services/getUrlHeaders.js +7 -18
  449. package/dist/services/getUrlHeaders.js.map +1 -1
  450. package/dist/services/grants.js +13 -0
  451. package/dist/services/grants.js.map +1 -0
  452. package/dist/services/graphql.js +1 -1
  453. package/dist/services/graphql.js.map +1 -1
  454. package/dist/services/projects.js +4 -2
  455. package/dist/services/projects.js.map +1 -1
  456. package/dist/services/schemas.js +1 -1
  457. package/dist/services/schemas.js.map +1 -1
  458. package/dist/services/telemetry.js +2 -1
  459. package/dist/services/telemetry.js.map +1 -1
  460. package/dist/services/userApplications.js +21 -6
  461. package/dist/services/userApplications.js.map +1 -1
  462. package/dist/telemetry/extractSchema.telemetry.js +10 -0
  463. package/dist/telemetry/extractSchema.telemetry.js.map +1 -1
  464. package/dist/types/grants.js +3 -0
  465. package/dist/types/grants.js.map +1 -0
  466. package/dist/types.js +3 -0
  467. package/dist/types.js.map +1 -1
  468. package/dist/util/checkProjectPermissions.js +21 -0
  469. package/dist/util/checkProjectPermissions.js.map +1 -0
  470. package/dist/util/cliClient.js +5 -3
  471. package/dist/util/cliClient.js.map +1 -1
  472. package/dist/util/compareDependencyVersions.js +74 -38
  473. package/dist/util/compareDependencyVersions.js.map +1 -1
  474. package/dist/util/createExpiringConfig.js +64 -0
  475. package/dist/util/createExpiringConfig.js.map +1 -0
  476. package/dist/util/detectFramework.js +135 -0
  477. package/dist/util/detectFramework.js.map +1 -0
  478. package/dist/util/errorMessages.js +0 -1
  479. package/dist/util/errorMessages.js.map +1 -1
  480. package/dist/util/extractDocumentsFromNdjsonOrTarball.js +1 -2
  481. package/dist/util/extractDocumentsFromNdjsonOrTarball.js.map +1 -1
  482. package/dist/util/getCliVersion.js +1 -1
  483. package/dist/util/getCliVersion.js.map +1 -1
  484. package/dist/util/getLocalPackageVersion.js +31 -23
  485. package/dist/util/getLocalPackageVersion.js.map +1 -1
  486. package/dist/util/getProjectDefaults.js.map +1 -1
  487. package/dist/util/getSharedServerConfig.js +1 -0
  488. package/dist/util/getSharedServerConfig.js.map +1 -1
  489. package/dist/util/getWorkspace.js +1 -1
  490. package/dist/util/getWorkspace.js.map +1 -1
  491. package/dist/util/isSchemaError.js +11 -0
  492. package/dist/util/isSchemaError.js.map +1 -0
  493. package/dist/util/isTar.js +8 -0
  494. package/dist/util/isTar.js.map +1 -0
  495. package/dist/util/packageManager/getPeerDependencies.js +44 -0
  496. package/dist/util/packageManager/getPeerDependencies.js.map +1 -0
  497. package/dist/util/packageManager/installationInfo/analyzeIssues.js +225 -0
  498. package/dist/util/packageManager/installationInfo/analyzeIssues.js.map +1 -0
  499. package/dist/util/packageManager/installationInfo/commands.js +73 -0
  500. package/dist/util/packageManager/installationInfo/commands.js.map +1 -0
  501. package/dist/util/packageManager/installationInfo/detectCliInstallation.js +66 -0
  502. package/dist/util/packageManager/installationInfo/detectCliInstallation.js.map +1 -0
  503. package/dist/util/packageManager/installationInfo/detectGlobals.js +295 -0
  504. package/dist/util/packageManager/installationInfo/detectGlobals.js.map +1 -0
  505. package/dist/util/packageManager/installationInfo/detectPackages.js +190 -0
  506. package/dist/util/packageManager/installationInfo/detectPackages.js.map +1 -0
  507. package/dist/util/packageManager/installationInfo/detectWorkspace.js +192 -0
  508. package/dist/util/packageManager/installationInfo/detectWorkspace.js.map +1 -0
  509. package/dist/util/packageManager/installationInfo/index.js +4 -0
  510. package/dist/util/packageManager/installationInfo/index.js.map +1 -0
  511. package/dist/util/packageManager/installationInfo/readJsonFile.js +14 -0
  512. package/dist/util/packageManager/installationInfo/readJsonFile.js.map +1 -0
  513. package/dist/util/packageManager/installationInfo/resolveVersionRange.js +42 -0
  514. package/dist/util/packageManager/installationInfo/resolveVersionRange.js.map +1 -0
  515. package/dist/util/packageManager/installationInfo/types.js +3 -0
  516. package/dist/util/packageManager/installationInfo/types.js.map +1 -0
  517. package/dist/util/packageManager/packageManagerChoice.js +1 -20
  518. package/dist/util/packageManager/packageManagerChoice.js.map +1 -1
  519. package/dist/util/packageManager/upgradePackages.js +4 -1
  520. package/dist/util/packageManager/upgradePackages.js.map +1 -1
  521. package/dist/util/promiseRaceWithTimeout.js +28 -0
  522. package/dist/util/promiseRaceWithTimeout.js.map +1 -0
  523. package/dist/util/readdirRecursive.js.map +1 -1
  524. package/dist/util/resolveLatestVersions.js +2 -2
  525. package/dist/util/resolveLatestVersions.js.map +1 -1
  526. package/dist/util/sharedFlags.js +54 -0
  527. package/dist/util/sharedFlags.js.map +1 -0
  528. package/dist/util/telemetry/cleanupOldTelemetryFiles.js +30 -0
  529. package/dist/util/telemetry/cleanupOldTelemetryFiles.js.map +1 -0
  530. package/dist/util/telemetry/createTelemetryStore.js +95 -0
  531. package/dist/util/telemetry/createTelemetryStore.js.map +1 -0
  532. package/dist/util/telemetry/createTraceId.js +10 -0
  533. package/dist/util/telemetry/createTraceId.js.map +1 -0
  534. package/dist/util/telemetry/findTelemetryFiles.js +35 -0
  535. package/dist/util/telemetry/findTelemetryFiles.js.map +1 -0
  536. package/dist/util/telemetry/flushTelemetryFiles.js +118 -0
  537. package/dist/util/telemetry/flushTelemetryFiles.js.map +1 -0
  538. package/dist/util/telemetry/generateTelemetryFilePath.js +30 -0
  539. package/dist/util/telemetry/generateTelemetryFilePath.js.map +1 -0
  540. package/dist/util/telemetry/logger.js +59 -0
  541. package/dist/util/telemetry/logger.js.map +1 -0
  542. package/dist/util/telemetry/readNDJSON.js +28 -0
  543. package/dist/util/telemetry/readNDJSON.js.map +1 -0
  544. package/dist/util/telemetry/telemetryStoreDebug.js +7 -0
  545. package/dist/util/telemetry/telemetryStoreDebug.js.map +1 -0
  546. package/dist/util/telemetry/trace.js +150 -0
  547. package/dist/util/telemetry/trace.js.map +1 -0
  548. package/dist/util/toForwardSlashes.js +8 -0
  549. package/dist/util/toForwardSlashes.js.map +1 -0
  550. package/dist/util/update/fetchLatestVersion.js +21 -0
  551. package/dist/util/update/fetchLatestVersion.js.map +1 -0
  552. package/dist/util/update/getUpdateCommand.js +20 -0
  553. package/dist/util/update/getUpdateCommand.js.map +1 -0
  554. package/dist/util/update/isInstalledUsingYarn.js +17 -0
  555. package/dist/util/update/isInstalledUsingYarn.js.map +1 -0
  556. package/dist/util/update/showNotificationUpdate.js +31 -0
  557. package/dist/util/update/showNotificationUpdate.js.map +1 -0
  558. package/dist/util/update/updateChecker.js +60 -0
  559. package/dist/util/update/updateChecker.js.map +1 -0
  560. package/dist/util/update/updateCheckerDebug.js +4 -0
  561. package/dist/util/update/updateCheckerDebug.js.map +1 -0
  562. package/oclif.config.js +1 -0
  563. package/oclif.manifest.json +900 -107
  564. package/package.json +72 -71
  565. package/static/favicons/apple-touch-icon.png +0 -0
  566. package/static/favicons/favicon-192.png +0 -0
  567. package/static/favicons/favicon-512.png +0 -0
  568. package/static/favicons/favicon-96.png +0 -0
  569. package/static/favicons/favicon.ico +0 -0
  570. package/static/favicons/favicon.svg +12 -0
  571. package/dist/actions/auth/login/promptProviders.js.map +0 -1
  572. package/dist/actions/dev/getCoreAppUrl.js +0 -10
  573. package/dist/actions/dev/getCoreAppUrl.js.map +0 -1
  574. package/dist/actions/schema/schemaStoreTypes.js +0 -19
  575. package/dist/actions/schema/schemaStoreTypes.js.map +0 -1
  576. package/dist/actions/schema/utils/manifestExtractor.js +0 -33
  577. package/dist/actions/schema/utils/manifestExtractor.js.map +0 -1
  578. package/dist/actions/schema/utils/manifestReader.js +0 -71
  579. package/dist/actions/schema/utils/manifestReader.js.map +0 -1
  580. package/dist/index.d.ts +0 -2326
  581. package/dist/index.js +0 -6
  582. package/dist/index.js.map +0 -1
  583. package/dist/studioDependencies.js.map +0 -1
  584. package/dist/typings/deepSortObject.d.js +0 -2
  585. package/dist/typings/deepSortObject.d.js.map +0 -1
  586. package/dist/util/findNdjsonEntry.js +0 -21
  587. package/dist/util/findNdjsonEntry.js.map +0 -1
  588. package/dist/util/importStudioConfig.js +0 -40
  589. package/dist/util/importStudioConfig.js.map +0 -1
  590. package/dist/util/readModuleVersion.js +0 -15
  591. package/dist/util/readModuleVersion.js.map +0 -1
  592. package/dist/util/readPackageJson.js +0 -44
  593. package/dist/util/readPackageJson.js.map +0 -1
  594. package/dist/util/readPackageManifest.js +0 -46
  595. package/dist/util/readPackageManifest.js.map +0 -1
  596. package/dist/util/uniqBy.js +0 -14
  597. package/dist/util/uniqBy.js.map +0 -1
  598. package/dist/util/workerChannels.js +0 -172
  599. package/dist/util/workerChannels.js.map +0 -1
  600. /package/dist/{studioDependencies.js → actions/init/studioDependencies.js} +0 -0
package/README.md CHANGED
@@ -38,8 +38,11 @@ Code for sanity cli
38
38
  - [`sanity dataset copy [SOURCE] [TARGET]`](#sanity-dataset-copy-source-target)
39
39
  - [`sanity dataset create [NAME]`](#sanity-dataset-create-name)
40
40
  - [`sanity dataset delete DATASETNAME`](#sanity-dataset-delete-datasetname)
41
+ - [`sanity dataset embeddings disable [DATASET]`](#sanity-dataset-embeddings-disable-dataset)
42
+ - [`sanity dataset embeddings enable [DATASET]`](#sanity-dataset-embeddings-enable-dataset)
43
+ - [`sanity dataset embeddings status [DATASET]`](#sanity-dataset-embeddings-status-dataset)
41
44
  - [`sanity dataset export [NAME] [DESTINATION]`](#sanity-dataset-export-name-destination)
42
- - [`sanity dataset import SOURCE`](#sanity-dataset-import-source)
45
+ - [`sanity dataset import SOURCE [TARGETDATASET]`](#sanity-dataset-import-source-targetdataset)
43
46
  - [`sanity dataset list`](#sanity-dataset-list)
44
47
  - [`sanity dataset visibility get DATASET`](#sanity-dataset-visibility-get-dataset)
45
48
  - [`sanity dataset visibility set DATASET MODE`](#sanity-dataset-visibility-set-dataset-mode)
@@ -49,6 +52,7 @@ Code for sanity cli
49
52
  - [`sanity docs browse`](#sanity-docs-browse)
50
53
  - [`sanity docs read PATH`](#sanity-docs-read-path)
51
54
  - [`sanity docs search QUERY`](#sanity-docs-search-query)
55
+ - [`sanity doctor [CHECKS]`](#sanity-doctor-checks)
52
56
  - [`sanity documents create [FILE]`](#sanity-documents-create-file)
53
57
  - [`sanity documents delete ID [IDS]`](#sanity-documents-delete-id-ids)
54
58
  - [`sanity documents get DOCUMENTID`](#sanity-documents-get-documentid)
@@ -116,11 +120,14 @@ Disable backup for a dataset.
116
120
 
117
121
  ```
118
122
  USAGE
119
- $ sanity backup disable [DATASET]
123
+ $ sanity backup disable [DATASET] [-p <id>]
120
124
 
121
125
  ARGUMENTS
122
126
  [DATASET] Dataset name to disable backup for
123
127
 
128
+ OVERRIDE FLAGS
129
+ -p, --project-id=<id> Project ID to disable backups for (overrides CLI configuration)
130
+
124
131
  DESCRIPTION
125
132
  Disable backup for a dataset.
126
133
 
@@ -134,7 +141,7 @@ EXAMPLES
134
141
  $ sanity backup disable production
135
142
  ```
136
143
 
137
- _See code: [src/commands/backup/disable.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/backup/disable.ts)_
144
+ _See code: [src/commands/backup/disable.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/backup/disable.ts)_
138
145
 
139
146
  ## `sanity backup download [DATASET]`
140
147
 
@@ -142,7 +149,8 @@ Download a dataset backup to a local file.
142
149
 
143
150
  ```
144
151
  USAGE
145
- $ sanity backup download [DATASET] [--backup-id <value>] [--concurrency <value>] [--out <value>] [--overwrite]
152
+ $ sanity backup download [DATASET] [-p <id>] [--backup-id <value>] [--concurrency <value>] [--out <value>]
153
+ [--overwrite]
146
154
 
147
155
  ARGUMENTS
148
156
  [DATASET] Dataset name to download backup from
@@ -153,6 +161,9 @@ FLAGS
153
161
  --out=<value> The file or directory path the backup should download to
154
162
  --overwrite Allows overwriting of existing backup file
155
163
 
164
+ OVERRIDE FLAGS
165
+ -p, --project-id=<id> Project ID to download backup from (overrides CLI configuration)
166
+
156
167
  DESCRIPTION
157
168
  Download a dataset backup to a local file.
158
169
 
@@ -174,7 +185,7 @@ EXAMPLES
174
185
  $ sanity backup download production --backup-id 2024-01-01-backup-3 --out /path/to/file --overwrite
175
186
  ```
176
187
 
177
- _See code: [src/commands/backup/download.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/backup/download.ts)_
188
+ _See code: [src/commands/backup/download.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/backup/download.ts)_
178
189
 
179
190
  ## `sanity backup enable [DATASET]`
180
191
 
@@ -182,11 +193,14 @@ Enable backup for a dataset.
182
193
 
183
194
  ```
184
195
  USAGE
185
- $ sanity backup enable [DATASET]
196
+ $ sanity backup enable [DATASET] [-p <id>]
186
197
 
187
198
  ARGUMENTS
188
199
  [DATASET] Dataset name to enable backup for
189
200
 
201
+ OVERRIDE FLAGS
202
+ -p, --project-id=<id> Project ID to enable backups for (overrides CLI configuration)
203
+
190
204
  DESCRIPTION
191
205
  Enable backup for a dataset.
192
206
 
@@ -200,7 +214,7 @@ EXAMPLES
200
214
  $ sanity backup enable production
201
215
  ```
202
216
 
203
- _See code: [src/commands/backup/enable.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/backup/enable.ts)_
217
+ _See code: [src/commands/backup/enable.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/backup/enable.ts)_
204
218
 
205
219
  ## `sanity backup list [DATASET]`
206
220
 
@@ -208,7 +222,7 @@ List available backups for a dataset.
208
222
 
209
223
  ```
210
224
  USAGE
211
- $ sanity backup list [DATASET] [--after <value>] [--before <value>] [-l <value>]
225
+ $ sanity backup list [DATASET] [-p <id>] [--after <value>] [--before <value>] [-l <value>]
212
226
 
213
227
  ARGUMENTS
214
228
  [DATASET] Dataset name to list backups for
@@ -218,6 +232,9 @@ FLAGS
218
232
  --after=<value> Only return backups after this date (inclusive, YYYY-MM-DD format)
219
233
  --before=<value> Only return backups before this date (exclusive, YYYY-MM-DD format)
220
234
 
235
+ OVERRIDE FLAGS
236
+ -p, --project-id=<id> Project ID to list backups for (overrides CLI configuration)
237
+
221
238
  DESCRIPTION
222
239
  List available backups for a dataset.
223
240
 
@@ -239,7 +256,7 @@ EXAMPLES
239
256
  $ sanity backup list production --after 2024-01-31 --limit 10
240
257
  ```
241
258
 
242
- _See code: [src/commands/backup/list.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/backup/list.ts)_
259
+ _See code: [src/commands/backup/list.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/backup/list.ts)_
243
260
 
244
261
  ## `sanity blueprints add TYPE`
245
262
 
@@ -248,9 +265,9 @@ Add a function resource to a Blueprint
248
265
  ```
249
266
  USAGE
250
267
  $ sanity blueprints add TYPE [--example <value> | -n <value> | --fn-type
251
- document-create|document-delete|document-update|document-publish|media-library-asset-create|media-library-asset-upda
252
- te|media-library-asset-delete... | --language ts|js | --javascript | --fn-helpers | --fn-installer
253
- skip|npm|pnpm|yarn] [-i | ]
268
+ document-publish|document-create|document-update|document-delete|media-library-asset-create|media-library-asset-upda
269
+ te|media-library-asset-delete|scheduled-function... | --language ts|js | --javascript | --fn-helpers |
270
+ --fn-installer skip|npm|pnpm|yarn] [-i | ]
254
271
 
255
272
  ARGUMENTS
256
273
  TYPE (function) Type of resource to add (only "function" is supported)
@@ -265,8 +282,8 @@ FLAGS
265
282
  <options: skip|npm|pnpm|yarn>
266
283
  --fn-type=<option>... Document change event(s) that should trigger the function; you can specify multiple
267
284
  events by specifying this flag multiple times
268
- <options: document-create|document-delete|document-update|document-publish|media-library-
269
- asset-create|media-library-asset-update|media-library-asset-delete>
285
+ <options: document-publish|document-create|document-update|document-delete|media-library-
286
+ asset-create|media-library-asset-update|media-library-asset-delete|scheduled-function>
270
287
  --javascript Use JavaScript instead of TypeScript
271
288
  --language=<option> [default: ts] Language of the new function
272
289
  <options: ts|js>
@@ -291,7 +308,7 @@ EXAMPLES
291
308
  $ sanity blueprints add function --name my-function --fn-type document-create --fn-type document-update --lang js
292
309
  ```
293
310
 
294
- _See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v13.2.0/src/commands/blueprints/add.ts)_
311
+ _See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.5.0/src/commands/blueprints/add.ts)_
295
312
 
296
313
  ## `sanity blueprints config`
297
314
 
@@ -299,12 +316,12 @@ View or edit the local Blueprint configuration
299
316
 
300
317
  ```
301
318
  USAGE
302
- $ sanity blueprints config [--project-id <value> -e] [--stack-id <value> ]
319
+ $ sanity blueprints config [--project-id <value> -e] [--stack <value> ]
303
320
 
304
321
  FLAGS
305
322
  -e, --edit Modify the configuration interactively, or directly when combined with ID flags.
306
323
  --project-id=<value> Directly set the project ID in the configuration. Requires --edit flag
307
- --stack-id=<value> Directly set the Stack ID in the configuration. Requires --edit flag
324
+ --stack=<value> Stack name or ID to set in the configuration. Requires --edit flag
308
325
 
309
326
  DESCRIPTION
310
327
  View or edit the local Blueprint configuration
@@ -314,7 +331,7 @@ DESCRIPTION
314
331
  Without flags, displays the current configuration. Use --edit to interactively modify settings, or combine --edit with
315
332
  ID flags to update values directly (useful for scripting and automation).
316
333
 
317
- If you need to switch your Blueprint to a different Stack, use --edit --stack-id.
334
+ If you need to switch your Blueprint to a different Stack, use --edit --stack.
318
335
 
319
336
  EXAMPLES
320
337
  $ sanity blueprints config
@@ -323,10 +340,10 @@ EXAMPLES
323
340
 
324
341
  $ sanity blueprints config --edit --project-id <projectId>
325
342
 
326
- $ sanity blueprints config --edit --project-id <projectId> --stack-id <stackId>
343
+ $ sanity blueprints config --edit --project-id <projectId> --stack <name-or-id>
327
344
  ```
328
345
 
329
- _See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v13.2.0/src/commands/blueprints/config.ts)_
346
+ _See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.5.0/src/commands/blueprints/config.ts)_
330
347
 
331
348
  ## `sanity blueprints deploy`
332
349
 
@@ -334,10 +351,11 @@ Deploy the local Blueprint to the remote Stack
334
351
 
335
352
  ```
336
353
  USAGE
337
- $ sanity blueprints deploy [--no-wait]
354
+ $ sanity blueprints deploy [--stack <value>] [--no-wait]
338
355
 
339
356
  FLAGS
340
- --no-wait Do not wait for Stack deployment to complete
357
+ --no-wait Do not wait for Stack deployment to complete
358
+ --stack=<value> Stack name or ID to use instead of the locally configured Stack
341
359
 
342
360
  DESCRIPTION
343
361
  Deploy the local Blueprint to the remote Stack
@@ -350,13 +368,19 @@ DESCRIPTION
350
368
 
351
369
  Use --no-wait to queue the deployment and return immediately without waiting for completion.
352
370
 
371
+ Use --fn-installer to force which package manager to use when deploying functions.
372
+
373
+ Set SANITY_ASSET_TIMEOUT (seconds) to override the 60-second timeout for processing resource assets.
374
+
353
375
  EXAMPLES
354
376
  $ sanity blueprints deploy
355
377
 
356
378
  $ sanity blueprints deploy --no-wait
379
+
380
+ $ sanity blueprints deploy --fn-installer npm
357
381
  ```
358
382
 
359
- _See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v13.2.0/src/commands/blueprints/deploy.ts)_
383
+ _See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.5.0/src/commands/blueprints/deploy.ts)_
360
384
 
361
385
  ## `sanity blueprints destroy`
362
386
 
@@ -364,13 +388,13 @@ Destroy the remote Stack deployment and its resources (will not delete local fil
364
388
 
365
389
  ```
366
390
  USAGE
367
- $ sanity blueprints destroy [--project-id <value> --stack-id <value> --force] [--no-wait]
391
+ $ sanity blueprints destroy [--project-id <value> --stack <value> --force] [--no-wait]
368
392
 
369
393
  FLAGS
370
394
  --force Force Stack destruction (skip confirmation)
371
395
  --no-wait Do not wait for Stack destruction to complete
372
396
  --project-id=<value> Project associated with the Stack
373
- --stack-id=<value> Stack ID to destroy (defaults to current Stack)
397
+ --stack=<value> Stack name or ID to destroy (defaults to the locally configured Stack)
374
398
 
375
399
  DESCRIPTION
376
400
  Destroy the remote Stack deployment and its resources (will not delete local files)
@@ -385,10 +409,10 @@ DESCRIPTION
385
409
  EXAMPLES
386
410
  $ sanity blueprints destroy
387
411
 
388
- $ sanity blueprints destroy --stack-id <stackId> --project-id <projectId> --force --no-wait
412
+ $ sanity blueprints destroy --stack <name-or-id> --project-id <projectId> --force --no-wait
389
413
  ```
390
414
 
391
- _See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v13.2.0/src/commands/blueprints/destroy.ts)_
415
+ _See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.5.0/src/commands/blueprints/destroy.ts)_
392
416
 
393
417
  ## `sanity blueprints doctor`
394
418
 
@@ -396,13 +420,13 @@ Diagnose potential issues with local Blueprint and remote Stack configuration
396
420
 
397
421
  ```
398
422
  USAGE
399
- $ sanity blueprints doctor [--json] [--path <value>] [--verbose] [--fix]
423
+ $ sanity blueprints doctor [--json] [-p <value>] [--verbose] [--fix]
400
424
 
401
425
  FLAGS
402
- --fix Interactively fix configuration issues
403
- --json Format output as json.
404
- --path=<value> Path to the directory containing the Blueprint
405
- --verbose Verbose output
426
+ -p, --path=<value> [env: SANITY_BLUEPRINT_PATH] Path to a Blueprint file or directory containing one
427
+ --fix Interactively fix configuration issues
428
+ --json Format output as json.
429
+ --[no-]verbose Verbose output; defaults to true
406
430
 
407
431
  DESCRIPTION
408
432
  Diagnose potential issues with local Blueprint and remote Stack configuration
@@ -414,7 +438,7 @@ DESCRIPTION
414
438
  issues.
415
439
  ```
416
440
 
417
- _See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v13.2.0/src/commands/blueprints/doctor.ts)_
441
+ _See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.5.0/src/commands/blueprints/doctor.ts)_
418
442
 
419
443
  ## `sanity blueprints info`
420
444
 
@@ -422,10 +446,10 @@ Show information about the local Blueprint's remote Stack deployment
422
446
 
423
447
  ```
424
448
  USAGE
425
- $ sanity blueprints info [--id <value>]
449
+ $ sanity blueprints info [--stack <value>]
426
450
 
427
451
  FLAGS
428
- --id=<value> Stack ID to show info for (defaults to the current Stack)
452
+ --stack=<value> Stack name or ID to use instead of the locally configured Stack
429
453
 
430
454
  DESCRIPTION
431
455
  Show information about the local Blueprint's remote Stack deployment
@@ -441,10 +465,10 @@ DESCRIPTION
441
465
  EXAMPLES
442
466
  $ sanity blueprints info
443
467
 
444
- $ sanity blueprints info --id <stackId>
468
+ $ sanity blueprints info --stack <name-or-id>
445
469
  ```
446
470
 
447
- _See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v13.2.0/src/commands/blueprints/info.ts)_
471
+ _See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.5.0/src/commands/blueprints/info.ts)_
448
472
 
449
473
  ## `sanity blueprints init [DIR]`
450
474
 
@@ -494,7 +518,7 @@ EXAMPLES
494
518
  $ sanity blueprints init --blueprint-type <json|js|ts> --stack-name <stackName>
495
519
  ```
496
520
 
497
- _See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v13.2.0/src/commands/blueprints/init.ts)_
521
+ _See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.5.0/src/commands/blueprints/init.ts)_
498
522
 
499
523
  ## `sanity blueprints logs`
500
524
 
@@ -502,10 +526,11 @@ Display logs for the current Blueprint's Stack deployment
502
526
 
503
527
  ```
504
528
  USAGE
505
- $ sanity blueprints logs [-w]
529
+ $ sanity blueprints logs [--stack <value>] [-w]
506
530
 
507
531
  FLAGS
508
- -w, --watch Watch for new Stack logs (streaming mode)
532
+ -w, --watch Watch for new Stack logs (streaming mode)
533
+ --stack=<value> Stack name or ID to use instead of the locally configured Stack
509
534
 
510
535
  DESCRIPTION
511
536
  Display logs for the current Blueprint's Stack deployment
@@ -522,7 +547,7 @@ EXAMPLES
522
547
  $ sanity blueprints logs --watch
523
548
  ```
524
549
 
525
- _See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v13.2.0/src/commands/blueprints/logs.ts)_
550
+ _See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.5.0/src/commands/blueprints/logs.ts)_
526
551
 
527
552
  ## `sanity blueprints plan`
528
553
 
@@ -530,7 +555,10 @@ Enumerate resources to be deployed to the remote Stack - will not modify any res
530
555
 
531
556
  ```
532
557
  USAGE
533
- $ sanity blueprints plan
558
+ $ sanity blueprints plan [--stack <value>]
559
+
560
+ FLAGS
561
+ --stack=<value> Stack name or ID to use instead of the locally configured Stack
534
562
 
535
563
  DESCRIPTION
536
564
  Enumerate resources to be deployed to the remote Stack - will not modify any resources
@@ -545,7 +573,7 @@ EXAMPLES
545
573
  $ sanity blueprints plan
546
574
  ```
547
575
 
548
- _See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v13.2.0/src/commands/blueprints/plan.ts)_
576
+ _See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.5.0/src/commands/blueprints/plan.ts)_
549
577
 
550
578
  ## `sanity blueprints stacks`
551
579
 
@@ -574,7 +602,7 @@ EXAMPLES
574
602
  $ sanity blueprints stacks --organization-id <organizationId>
575
603
  ```
576
604
 
577
- _See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v13.2.0/src/commands/blueprints/stacks.ts)_
605
+ _See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.5.0/src/commands/blueprints/stacks.ts)_
578
606
 
579
607
  ## `sanity build [OUTPUTDIR]`
580
608
 
@@ -603,7 +631,7 @@ EXAMPLES
603
631
  $ sanity build --no-minify --source-maps
604
632
  ```
605
633
 
606
- _See code: [src/commands/build.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/build.ts)_
634
+ _See code: [src/commands/build.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/build.ts)_
607
635
 
608
636
  ## `sanity codemod [CODEMODNAME]`
609
637
 
@@ -634,7 +662,7 @@ EXAMPLES
634
662
  $ sanity codemod reactIconsV3 --dry
635
663
  ```
636
664
 
637
- _See code: [src/commands/codemod.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/codemod.ts)_
665
+ _See code: [src/commands/codemod.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/codemod.ts)_
638
666
 
639
667
  ## `sanity cors add ORIGIN`
640
668
 
@@ -642,7 +670,7 @@ Allow a new origin to use your project API through CORS
642
670
 
643
671
  ```
644
672
  USAGE
645
- $ sanity cors add ORIGIN [--credentials]
673
+ $ sanity cors add ORIGIN [-p <id>] [--credentials]
646
674
 
647
675
  ARGUMENTS
648
676
  ORIGIN Origin to allow (e.g., https://example.com)
@@ -650,6 +678,9 @@ ARGUMENTS
650
678
  FLAGS
651
679
  --[no-]credentials Allow credentials (token/cookie) to be sent from this origin
652
680
 
681
+ OVERRIDE FLAGS
682
+ -p, --project-id=<id> Project ID to add CORS origin to (overrides CLI configuration)
683
+
653
684
  DESCRIPTION
654
685
  Allow a new origin to use your project API through CORS
655
686
 
@@ -665,9 +696,13 @@ EXAMPLES
665
696
  Add a production origin with credentials allowed
666
697
 
667
698
  $ sanity cors add https://myapp.com --credentials
699
+
700
+ Add a CORS origin for a specific project
701
+
702
+ $ sanity cors add https://myapp.com --project-id abc123
668
703
  ```
669
704
 
670
- _See code: [src/commands/cors/add.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/cors/add.ts)_
705
+ _See code: [src/commands/cors/add.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/cors/add.ts)_
671
706
 
672
707
  ## `sanity cors delete [ORIGIN]`
673
708
 
@@ -675,11 +710,14 @@ Delete an existing CORS origin from your project
675
710
 
676
711
  ```
677
712
  USAGE
678
- $ sanity cors delete [ORIGIN]
713
+ $ sanity cors delete [ORIGIN] [-p <id>]
679
714
 
680
715
  ARGUMENTS
681
716
  [ORIGIN] Origin to delete (will prompt if not provided)
682
717
 
718
+ OVERRIDE FLAGS
719
+ -p, --project-id=<id> Project ID to delete CORS origin from (overrides CLI configuration)
720
+
683
721
  DESCRIPTION
684
722
  Delete an existing CORS origin from your project
685
723
 
@@ -691,9 +729,13 @@ EXAMPLES
691
729
  Delete a specific CORS origin
692
730
 
693
731
  $ sanity cors delete https://example.com
732
+
733
+ Delete a CORS origin from a specific project
734
+
735
+ $ sanity cors delete --project-id abc123
694
736
  ```
695
737
 
696
- _See code: [src/commands/cors/delete.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/cors/delete.ts)_
738
+ _See code: [src/commands/cors/delete.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/cors/delete.ts)_
697
739
 
698
740
  ## `sanity cors list`
699
741
 
@@ -701,7 +743,10 @@ List all origins allowed to access the API for this project
701
743
 
702
744
  ```
703
745
  USAGE
704
- $ sanity cors list
746
+ $ sanity cors list [-p <id>]
747
+
748
+ OVERRIDE FLAGS
749
+ -p, --project-id=<id> Project ID to list CORS origins for (overrides CLI configuration)
705
750
 
706
751
  DESCRIPTION
707
752
  List all origins allowed to access the API for this project
@@ -710,9 +755,13 @@ EXAMPLES
710
755
  List CORS origins for the current project
711
756
 
712
757
  $ sanity cors list
758
+
759
+ List CORS origins for a specific project
760
+
761
+ $ sanity cors list --project-id abc123
713
762
  ```
714
763
 
715
- _See code: [src/commands/cors/list.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/cors/list.ts)_
764
+ _See code: [src/commands/cors/list.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/cors/list.ts)_
716
765
 
717
766
  ## `sanity dataset alias create [ALIASNAME] [TARGETDATASET]`
718
767
 
@@ -720,16 +769,23 @@ Create a dataset alias within your project
720
769
 
721
770
  ```
722
771
  USAGE
723
- $ sanity dataset alias create [ALIASNAME] [TARGETDATASET]
772
+ $ sanity dataset alias create [ALIASNAME] [TARGETDATASET] [-p <id>]
724
773
 
725
774
  ARGUMENTS
726
775
  [ALIASNAME] Dataset alias name to create
727
776
  [TARGETDATASET] Target dataset name to link the alias to
728
777
 
778
+ OVERRIDE FLAGS
779
+ -p, --project-id=<id> Project ID to create dataset alias in (overrides CLI configuration)
780
+
729
781
  DESCRIPTION
730
782
  Create a dataset alias within your project
731
783
 
732
784
  EXAMPLES
785
+ Create alias in a specific project
786
+
787
+ $ sanity dataset alias create --project-id abc123 conference conf-2025
788
+
733
789
  Create an alias with interactive prompts
734
790
 
735
791
  $ sanity dataset alias create
@@ -747,7 +803,7 @@ EXAMPLES
747
803
  $ sanity dataset alias create ~conference conf-2025
748
804
  ```
749
805
 
750
- _See code: [src/commands/dataset/alias/create.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/dataset/alias/create.ts)_
806
+ _See code: [src/commands/dataset/alias/create.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/dataset/alias/create.ts)_
751
807
 
752
808
  ## `sanity dataset alias delete ALIASNAME`
753
809
 
@@ -755,7 +811,7 @@ Delete a dataset alias within your project
755
811
 
756
812
  ```
757
813
  USAGE
758
- $ sanity dataset alias delete ALIASNAME [--force]
814
+ $ sanity dataset alias delete ALIASNAME [-p <id>] [--force]
759
815
 
760
816
  ARGUMENTS
761
817
  ALIASNAME Dataset alias name to delete
@@ -763,6 +819,9 @@ ARGUMENTS
763
819
  FLAGS
764
820
  --force Skip confirmation prompt and delete immediately
765
821
 
822
+ OVERRIDE FLAGS
823
+ -p, --project-id=<id> Project ID to delete dataset alias from (overrides CLI configuration)
824
+
766
825
  DESCRIPTION
767
826
  Delete a dataset alias within your project
768
827
 
@@ -780,7 +839,7 @@ EXAMPLES
780
839
  $ sanity dataset alias delete conference --force
781
840
  ```
782
841
 
783
- _See code: [src/commands/dataset/alias/delete.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/dataset/alias/delete.ts)_
842
+ _See code: [src/commands/dataset/alias/delete.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/dataset/alias/delete.ts)_
784
843
 
785
844
  ## `sanity dataset alias link [ALIASNAME] [TARGETDATASET]`
786
845
 
@@ -788,7 +847,7 @@ Link a dataset alias to a dataset within your project
788
847
 
789
848
  ```
790
849
  USAGE
791
- $ sanity dataset alias link [ALIASNAME] [TARGETDATASET] [--force]
850
+ $ sanity dataset alias link [ALIASNAME] [TARGETDATASET] [-p <id>] [--force]
792
851
 
793
852
  ARGUMENTS
794
853
  [ALIASNAME] Dataset alias name to link
@@ -797,6 +856,9 @@ ARGUMENTS
797
856
  FLAGS
798
857
  --force Skip confirmation prompt when relinking existing alias
799
858
 
859
+ OVERRIDE FLAGS
860
+ -p, --project-id=<id> Project ID to link dataset alias in (overrides CLI configuration)
861
+
800
862
  DESCRIPTION
801
863
  Link a dataset alias to a dataset within your project
802
864
 
@@ -822,7 +884,7 @@ EXAMPLES
822
884
  $ sanity dataset alias link conference conf-2025 --force
823
885
  ```
824
886
 
825
- _See code: [src/commands/dataset/alias/link.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/dataset/alias/link.ts)_
887
+ _See code: [src/commands/dataset/alias/link.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/dataset/alias/link.ts)_
826
888
 
827
889
  ## `sanity dataset alias unlink [ALIASNAME]`
828
890
 
@@ -830,7 +892,7 @@ Unlink a dataset alias from its dataset within your project
830
892
 
831
893
  ```
832
894
  USAGE
833
- $ sanity dataset alias unlink [ALIASNAME] [--force]
895
+ $ sanity dataset alias unlink [ALIASNAME] [-p <id>] [--force]
834
896
 
835
897
  ARGUMENTS
836
898
  [ALIASNAME] Dataset alias name to unlink
@@ -838,6 +900,9 @@ ARGUMENTS
838
900
  FLAGS
839
901
  --force Skip confirmation prompt and unlink immediately
840
902
 
903
+ OVERRIDE FLAGS
904
+ -p, --project-id=<id> Project ID to unlink dataset alias in (overrides CLI configuration)
905
+
841
906
  DESCRIPTION
842
907
  Unlink a dataset alias from its dataset within your project
843
908
 
@@ -859,7 +924,7 @@ EXAMPLES
859
924
  $ sanity dataset alias unlink conference --force
860
925
  ```
861
926
 
862
- _See code: [src/commands/dataset/alias/unlink.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/dataset/alias/unlink.ts)_
927
+ _See code: [src/commands/dataset/alias/unlink.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/dataset/alias/unlink.ts)_
863
928
 
864
929
  ## `sanity dataset copy [SOURCE] [TARGET]`
865
930
 
@@ -867,8 +932,8 @@ Manages dataset copying, including starting a new copy job, listing copy jobs an
867
932
 
868
933
  ```
869
934
  USAGE
870
- $ sanity dataset copy [SOURCE] [TARGET] [--attach <value> | --list | --detach | --skip-history] [--limit <value>
871
- ] [--offset <value> ]
935
+ $ sanity dataset copy [SOURCE] [TARGET] [-p <id>] [--attach <value> | --list | --detach | --skip-history]
936
+ [--limit <value> ] [--offset <value> ]
872
937
 
873
938
  ARGUMENTS
874
939
  [SOURCE] Name of the dataset to copy from
@@ -882,6 +947,9 @@ FLAGS
882
947
  --offset=<value> Start position in the list of jobs (default 0)
883
948
  --skip-history Don't preserve document history on copy
884
949
 
950
+ OVERRIDE FLAGS
951
+ -p, --project-id=<id> Project ID to copy dataset in (overrides CLI configuration)
952
+
885
953
  DESCRIPTION
886
954
  Manages dataset copying, including starting a new copy job, listing copy jobs and following the progress of a running
887
955
  copy job
@@ -920,7 +988,7 @@ EXAMPLES
920
988
  $ sanity dataset copy --list --offset 2 --limit 10
921
989
  ```
922
990
 
923
- _See code: [src/commands/dataset/copy.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/dataset/copy.ts)_
991
+ _See code: [src/commands/dataset/copy.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/dataset/copy.ts)_
924
992
 
925
993
  ## `sanity dataset create [NAME]`
926
994
 
@@ -928,14 +996,20 @@ Create a new dataset within your project
928
996
 
929
997
  ```
930
998
  USAGE
931
- $ sanity dataset create [NAME] [--visibility custom|private|public]
999
+ $ sanity dataset create [NAME] [-p <id>] [--embeddings-projection <value> --embeddings] [--visibility
1000
+ custom|private|public]
932
1001
 
933
1002
  ARGUMENTS
934
1003
  [NAME] Name of the dataset to create
935
1004
 
936
1005
  FLAGS
937
- --visibility=<option> Set visibility for this dataset (custom/private/public)
938
- <options: custom|private|public>
1006
+ --embeddings Enable embeddings for this dataset
1007
+ --embeddings-projection=<value> GROQ projection for embeddings indexing (e.g. "{ title, body }")
1008
+ --visibility=<option> Set visibility for this dataset (custom/private/public)
1009
+ <options: custom|private|public>
1010
+
1011
+ OVERRIDE FLAGS
1012
+ -p, --project-id=<id> Project ID to create dataset in (overrides CLI configuration)
939
1013
 
940
1014
  DESCRIPTION
941
1015
  Create a new dataset within your project
@@ -954,7 +1028,7 @@ EXAMPLES
954
1028
  $ sanity dataset create my-dataset --visibility private
955
1029
  ```
956
1030
 
957
- _See code: [src/commands/dataset/create.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/dataset/create.ts)_
1031
+ _See code: [src/commands/dataset/create.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/dataset/create.ts)_
958
1032
 
959
1033
  ## `sanity dataset delete DATASETNAME`
960
1034
 
@@ -962,7 +1036,7 @@ Delete a dataset within your project
962
1036
 
963
1037
  ```
964
1038
  USAGE
965
- $ sanity dataset delete DATASETNAME [--force]
1039
+ $ sanity dataset delete DATASETNAME [-p <id>] [--force]
966
1040
 
967
1041
  ARGUMENTS
968
1042
  DATASETNAME Dataset name to delete
@@ -970,6 +1044,9 @@ ARGUMENTS
970
1044
  FLAGS
971
1045
  --force Do not prompt for delete confirmation - forcefully delete
972
1046
 
1047
+ OVERRIDE FLAGS
1048
+ -p, --project-id=<id> Project ID to delete dataset from (overrides CLI configuration)
1049
+
973
1050
  DESCRIPTION
974
1051
  Delete a dataset within your project
975
1052
 
@@ -983,7 +1060,94 @@ EXAMPLES
983
1060
  $ sanity dataset delete my-dataset --force
984
1061
  ```
985
1062
 
986
- _See code: [src/commands/dataset/delete.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/dataset/delete.ts)_
1063
+ _See code: [src/commands/dataset/delete.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/dataset/delete.ts)_
1064
+
1065
+ ## `sanity dataset embeddings disable [DATASET]`
1066
+
1067
+ Disable embeddings for a dataset
1068
+
1069
+ ```
1070
+ USAGE
1071
+ $ sanity dataset embeddings disable [DATASET] [-p <id>]
1072
+
1073
+ ARGUMENTS
1074
+ [DATASET] Dataset name to disable embeddings for
1075
+
1076
+ OVERRIDE FLAGS
1077
+ -p, --project-id=<id> Project ID to disable embeddings for (overrides CLI configuration)
1078
+
1079
+ DESCRIPTION
1080
+ Disable embeddings for a dataset
1081
+
1082
+ EXAMPLES
1083
+ Disable embeddings for the production dataset
1084
+
1085
+ $ sanity dataset embeddings disable production
1086
+ ```
1087
+
1088
+ _See code: [src/commands/dataset/embeddings/disable.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/dataset/embeddings/disable.ts)_
1089
+
1090
+ ## `sanity dataset embeddings enable [DATASET]`
1091
+
1092
+ Enable embeddings for a dataset
1093
+
1094
+ ```
1095
+ USAGE
1096
+ $ sanity dataset embeddings enable [DATASET] [-p <id>] [--projection <value>] [--wait]
1097
+
1098
+ ARGUMENTS
1099
+ [DATASET] Dataset name to enable embeddings for
1100
+
1101
+ FLAGS
1102
+ --projection=<value> GROQ projection defining which fields to embed (e.g. "{ title, body }")
1103
+ --wait Wait for embeddings processing to complete before returning
1104
+
1105
+ OVERRIDE FLAGS
1106
+ -p, --project-id=<id> Project ID to enable embeddings for (overrides CLI configuration)
1107
+
1108
+ DESCRIPTION
1109
+ Enable embeddings for a dataset
1110
+
1111
+ EXAMPLES
1112
+ Enable embeddings for the production dataset
1113
+
1114
+ $ sanity dataset embeddings enable production
1115
+
1116
+ Enable embeddings with a specific projection
1117
+
1118
+ $ sanity dataset embeddings enable production --projection "{ title, body }"
1119
+
1120
+ Enable embeddings and wait for processing to complete
1121
+
1122
+ $ sanity dataset embeddings enable production --wait
1123
+ ```
1124
+
1125
+ _See code: [src/commands/dataset/embeddings/enable.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/dataset/embeddings/enable.ts)_
1126
+
1127
+ ## `sanity dataset embeddings status [DATASET]`
1128
+
1129
+ Show embeddings settings and status for a dataset
1130
+
1131
+ ```
1132
+ USAGE
1133
+ $ sanity dataset embeddings status [DATASET] [-p <id>]
1134
+
1135
+ ARGUMENTS
1136
+ [DATASET] The name of the dataset to check embeddings status for
1137
+
1138
+ OVERRIDE FLAGS
1139
+ -p, --project-id=<id> Project ID to check embeddings status for (overrides CLI configuration)
1140
+
1141
+ DESCRIPTION
1142
+ Show embeddings settings and status for a dataset
1143
+
1144
+ EXAMPLES
1145
+ Show embeddings status for the production dataset
1146
+
1147
+ $ sanity dataset embeddings status production
1148
+ ```
1149
+
1150
+ _See code: [src/commands/dataset/embeddings/status.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/dataset/embeddings/status.ts)_
987
1151
 
988
1152
  ## `sanity dataset export [NAME] [DESTINATION]`
989
1153
 
@@ -991,8 +1155,8 @@ Export dataset to local filesystem as a gzipped tarball. Assets failing with HTT
991
1155
 
992
1156
  ```
993
1157
  USAGE
994
- $ sanity dataset export [NAME] [DESTINATION] [--asset-concurrency <value>] [--mode stream|cursor] [--no-assets]
995
- [--no-compress] [--no-drafts] [--overwrite] [--raw] [--types <value>]
1158
+ $ sanity dataset export [NAME] [DESTINATION] [-p <id>] [--asset-concurrency <value>] [--mode stream|cursor]
1159
+ [--no-assets] [--no-compress] [--no-drafts] [--overwrite] [--raw] [--types <value>]
996
1160
 
997
1161
  ARGUMENTS
998
1162
  [NAME] Name of the dataset to export
@@ -1011,6 +1175,9 @@ FLAGS
1011
1175
  --raw Extract only documents, without rewriting asset references
1012
1176
  --types=<value> Defines which document types to export (comma-separated)
1013
1177
 
1178
+ OVERRIDE FLAGS
1179
+ -p, --project-id=<id> Project ID to export dataset from (overrides CLI configuration)
1180
+
1014
1181
  DESCRIPTION
1015
1182
  Export dataset to local filesystem as a gzipped tarball. Assets failing with HTTP status codes 401, 403 and 404 upon
1016
1183
  download are ignored and excluded from export.
@@ -1033,24 +1200,24 @@ EXAMPLES
1033
1200
  $ sanity dataset export staging staging.tar.gz --types products,shops
1034
1201
  ```
1035
1202
 
1036
- _See code: [src/commands/dataset/export.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/dataset/export.ts)_
1203
+ _See code: [src/commands/dataset/export.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/dataset/export.ts)_
1037
1204
 
1038
- ## `sanity dataset import SOURCE`
1205
+ ## `sanity dataset import SOURCE [TARGETDATASET]`
1039
1206
 
1040
1207
  Import documents to a Sanity dataset
1041
1208
 
1042
1209
  ```
1043
1210
  USAGE
1044
- $ sanity dataset import SOURCE -p <value> -d <value> [-t <value>] [--replace | --missing] [--allow-failing-assets]
1045
- [--allow-assets-in-different-dataset] [--replace-assets] [--skip-cross-dataset-references]
1046
- [--allow-replacement-characters] [--allow-system-documents] [--asset-concurrency <value>]
1211
+ $ sanity dataset import SOURCE [TARGETDATASET] [--allow-assets-in-different-dataset] [--allow-failing-assets]
1212
+ [--allow-replacement-characters] [--allow-system-documents] [--asset-concurrency <value>] [-d <name>] [--missing |
1213
+ --replace] [-p <id>] [--replace-assets] [--skip-cross-dataset-references] [-t <value>]
1047
1214
 
1048
1215
  ARGUMENTS
1049
- SOURCE Source file (use "-" for stdin)
1216
+ SOURCE Source file (use "-" for stdin)
1217
+ [TARGETDATASET] Target dataset (prefer --dataset flag instead)
1050
1218
 
1051
1219
  FLAGS
1052
- -d, --dataset=<value> (required) Dataset to import to
1053
- -p, --project=<value> (required) Project ID to import to
1220
+ -d, --dataset=<name> Dataset to import to
1054
1221
  -t, --token=<value> [env: SANITY_IMPORT_TOKEN] Token to authenticate with
1055
1222
  --allow-assets-in-different-dataset Allow asset documents to reference different project/dataset
1056
1223
  --allow-failing-assets Skip assets that cannot be fetched/uploaded
@@ -1062,20 +1229,27 @@ FLAGS
1062
1229
  --replace-assets Skip reuse of existing assets
1063
1230
  --skip-cross-dataset-references Skips references to other datasets
1064
1231
 
1232
+ OVERRIDE FLAGS
1233
+ -p, --project-id=<id> Project ID to import to (overrides CLI configuration)
1234
+
1065
1235
  DESCRIPTION
1066
1236
  Import documents to a Sanity dataset
1067
1237
 
1068
1238
  EXAMPLES
1069
1239
  Import "./my-dataset.ndjson" into dataset "staging"
1070
1240
 
1071
- $ sanity dataset import -p myPrOj -d staging -t someSecretToken my-dataset.ndjson
1241
+ $ sanity dataset import -d staging -t someSecretToken my-dataset.ndjson
1242
+
1243
+ Import into dataset "test" from stdin
1244
+
1245
+ cat my-dataset.ndjson | sanity dataset import -d test -t someToken -
1072
1246
 
1073
- Import into dataset "test" from stdin, read token from env var
1247
+ Import with explicit project ID (overrides CLI configuration)
1074
1248
 
1075
- cat my-dataset.ndjson | sanity dataset import -p myPrOj -d test -
1249
+ $ sanity dataset import -p projectId -d staging -t someSecretToken my-dataset.ndjson
1076
1250
  ```
1077
1251
 
1078
- _See code: [src/commands/dataset/import.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/dataset/import.ts)_
1252
+ _See code: [src/commands/dataset/import.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/dataset/import.ts)_
1079
1253
 
1080
1254
  ## `sanity dataset list`
1081
1255
 
@@ -1083,7 +1257,10 @@ List datasets of your project
1083
1257
 
1084
1258
  ```
1085
1259
  USAGE
1086
- $ sanity dataset list
1260
+ $ sanity dataset list [-p <id>]
1261
+
1262
+ OVERRIDE FLAGS
1263
+ -p, --project-id=<id> Project ID to list datasets for (overrides CLI configuration)
1087
1264
 
1088
1265
  DESCRIPTION
1089
1266
  List datasets of your project
@@ -1092,9 +1269,13 @@ EXAMPLES
1092
1269
  List datasets of your project
1093
1270
 
1094
1271
  $ sanity dataset list
1272
+
1273
+ List datasets for a specific project
1274
+
1275
+ $ sanity dataset list --project-id abc123
1095
1276
  ```
1096
1277
 
1097
- _See code: [src/commands/dataset/list.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/dataset/list.ts)_
1278
+ _See code: [src/commands/dataset/list.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/dataset/list.ts)_
1098
1279
 
1099
1280
  ## `sanity dataset visibility get DATASET`
1100
1281
 
@@ -1102,11 +1283,14 @@ Get the visibility of a dataset
1102
1283
 
1103
1284
  ```
1104
1285
  USAGE
1105
- $ sanity dataset visibility get DATASET
1286
+ $ sanity dataset visibility get DATASET [-p <id>]
1106
1287
 
1107
1288
  ARGUMENTS
1108
1289
  DATASET The name of the dataset to get visibility for
1109
1290
 
1291
+ OVERRIDE FLAGS
1292
+ -p, --project-id=<id> Project ID to get dataset visibility for (overrides CLI configuration)
1293
+
1110
1294
  DESCRIPTION
1111
1295
  Get the visibility of a dataset
1112
1296
 
@@ -1116,7 +1300,7 @@ EXAMPLES
1116
1300
  $ sanity dataset visibility get my-dataset
1117
1301
  ```
1118
1302
 
1119
- _See code: [src/commands/dataset/visibility/get.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/dataset/visibility/get.ts)_
1303
+ _See code: [src/commands/dataset/visibility/get.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/dataset/visibility/get.ts)_
1120
1304
 
1121
1305
  ## `sanity dataset visibility set DATASET MODE`
1122
1306
 
@@ -1124,12 +1308,15 @@ Set the visibility of a dataset
1124
1308
 
1125
1309
  ```
1126
1310
  USAGE
1127
- $ sanity dataset visibility set DATASET MODE
1311
+ $ sanity dataset visibility set DATASET MODE [-p <id>]
1128
1312
 
1129
1313
  ARGUMENTS
1130
1314
  DATASET The name of the dataset to set visibility for
1131
1315
  MODE (public|private) The visibility mode to set
1132
1316
 
1317
+ OVERRIDE FLAGS
1318
+ -p, --project-id=<id> Project ID to set dataset visibility for (overrides CLI configuration)
1319
+
1133
1320
  DESCRIPTION
1134
1321
  Set the visibility of a dataset
1135
1322
 
@@ -1143,7 +1330,7 @@ EXAMPLES
1143
1330
  $ sanity dataset visibility set my-dataset public
1144
1331
  ```
1145
1332
 
1146
- _See code: [src/commands/dataset/visibility/set.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/dataset/visibility/set.ts)_
1333
+ _See code: [src/commands/dataset/visibility/set.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/dataset/visibility/set.ts)_
1147
1334
 
1148
1335
  ## `sanity debug`
1149
1336
 
@@ -1165,7 +1352,7 @@ EXAMPLES
1165
1352
  $ sanity debug --secrets
1166
1353
  ```
1167
1354
 
1168
- _See code: [src/commands/debug.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/debug.ts)_
1355
+ _See code: [src/commands/debug.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/debug.ts)_
1169
1356
 
1170
1357
  ## `sanity deploy [SOURCEDIR]`
1171
1358
 
@@ -1173,8 +1360,8 @@ Builds and deploys Sanity Studio or application to Sanity hosting
1173
1360
 
1174
1361
  ```
1175
1362
  USAGE
1176
- $ sanity deploy [SOURCEDIR] [--auto-updates] [--build] [--minify] [--schema-required] [--source-maps]
1177
- [--verbose] [-y]
1363
+ $ sanity deploy [SOURCEDIR] [--auto-updates] [--external | --source-maps | --minify | --build]
1364
+ [--schema-required] [--verbose] [-y]
1178
1365
 
1179
1366
  ARGUMENTS
1180
1367
  [SOURCEDIR] Source directory
@@ -1183,6 +1370,7 @@ FLAGS
1183
1370
  -y, --yes Unattended mode, answers "yes" to any "yes/no" prompt and otherwise uses defaults
1184
1371
  --[no-]auto-updates Automatically update the studio to the latest version
1185
1372
  --[no-]build Don't build the studio prior to deploy, instead deploying the version currently in `dist/`
1373
+ --external Register an externally hosted studio
1186
1374
  --[no-]minify Skip minifying built JavaScript (speeds up build, increases size of bundle)
1187
1375
  --schema-required Fail-fast deployment if schema store fails
1188
1376
  --source-maps Enable source maps for built bundles (increases size of bundle)
@@ -1192,7 +1380,7 @@ DESCRIPTION
1192
1380
  Builds and deploys Sanity Studio or application to Sanity hosting
1193
1381
 
1194
1382
  EXAMPLES
1195
- Build the studio
1383
+ Build and deploy the studio to Sanity hosting
1196
1384
 
1197
1385
  $ sanity deploy
1198
1386
 
@@ -1203,9 +1391,13 @@ EXAMPLES
1203
1391
  Fail fast on schema store fails - for when other services rely on the stored schema
1204
1392
 
1205
1393
  $ sanity deploy --schema-required
1394
+
1395
+ Register an externally hosted studio (studioHost contains full URL)
1396
+
1397
+ $ sanity deploy --external
1206
1398
  ```
1207
1399
 
1208
- _See code: [src/commands/deploy.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/deploy.ts)_
1400
+ _See code: [src/commands/deploy.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/deploy.ts)_
1209
1401
 
1210
1402
  ## `sanity dev`
1211
1403
 
@@ -1232,7 +1424,7 @@ EXAMPLES
1232
1424
  $ sanity dev --load-in-dashboard
1233
1425
  ```
1234
1426
 
1235
- _See code: [src/commands/dev.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/dev.ts)_
1427
+ _See code: [src/commands/dev.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/dev.ts)_
1236
1428
 
1237
1429
  ## `sanity docs browse`
1238
1430
 
@@ -1246,7 +1438,7 @@ DESCRIPTION
1246
1438
  Open Sanity docs in a web browser
1247
1439
  ```
1248
1440
 
1249
- _See code: [src/commands/docs/browse.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/docs/browse.ts)_
1441
+ _See code: [src/commands/docs/browse.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/docs/browse.ts)_
1250
1442
 
1251
1443
  ## `sanity docs read PATH`
1252
1444
 
@@ -1283,7 +1475,7 @@ EXAMPLES
1283
1475
  $ sanity docs read https://www.sanity.io/docs/studio/installation -w
1284
1476
  ```
1285
1477
 
1286
- _See code: [src/commands/docs/read.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/docs/read.ts)_
1478
+ _See code: [src/commands/docs/read.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/docs/read.ts)_
1287
1479
 
1288
1480
  ## `sanity docs search QUERY`
1289
1481
 
@@ -1316,7 +1508,38 @@ EXAMPLES
1316
1508
  $ sanity docs search "deployment" --limit=5
1317
1509
  ```
1318
1510
 
1319
- _See code: [src/commands/docs/search.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/docs/search.ts)_
1511
+ _See code: [src/commands/docs/search.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/docs/search.ts)_
1512
+
1513
+ ## `sanity doctor [CHECKS]`
1514
+
1515
+ Run diagnostics on your Sanity project
1516
+
1517
+ ```
1518
+ USAGE
1519
+ $ sanity doctor [CHECKS...] [-j]
1520
+
1521
+ ARGUMENTS
1522
+ [CHECKS...] Checks to enable (defaults to all). Valid: cli
1523
+
1524
+ FLAGS
1525
+ -j, --json Output results as JSON
1526
+
1527
+ DESCRIPTION
1528
+ Run diagnostics on your Sanity project
1529
+
1530
+ EXAMPLES
1531
+ $ sanity doctor
1532
+
1533
+ Output results as JSON
1534
+
1535
+ $ sanity doctor --json
1536
+
1537
+ Only run CLI-related diagnostics
1538
+
1539
+ $ sanity doctor cli
1540
+ ```
1541
+
1542
+ _See code: [src/commands/doctor.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/doctor.ts)_
1320
1543
 
1321
1544
  ## `sanity documents create [FILE]`
1322
1545
 
@@ -1324,18 +1547,21 @@ Create one or more documents
1324
1547
 
1325
1548
  ```
1326
1549
  USAGE
1327
- $ sanity documents create [FILE] [-d <value>] [--id <value>] [--json5] [--missing] [--replace] [--watch]
1550
+ $ sanity documents create [FILE] [-p <id>] [-d <name>] [--id <value>] [--json5] [--missing] [--replace] [--watch]
1328
1551
 
1329
1552
  ARGUMENTS
1330
1553
  [FILE] JSON file to create document(s) from
1331
1554
 
1332
1555
  FLAGS
1333
- -d, --dataset=<value> Dataset to create document(s) in (overrides config)
1334
- --id=<value> Specify a document ID to use. Will fetch remote document ID and populate editor.
1335
- --json5 Use JSON5 file type to allow a "simplified" version of JSON
1336
- --missing On duplicate document IDs, don't modify the target document(s)
1337
- --replace On duplicate document IDs, replace existing document with specified document(s)
1338
- --watch Write the documents whenever the target file or buffer changes
1556
+ --id=<value> Specify a document ID to use. Will fetch remote document ID and populate editor.
1557
+ --json5 Use JSON5 file type to allow a "simplified" version of JSON
1558
+ --missing On duplicate document IDs, don't modify the target document(s)
1559
+ --replace On duplicate document IDs, replace existing document with specified document(s)
1560
+ --watch Write the documents whenever the target file or buffer changes
1561
+
1562
+ OVERRIDE FLAGS
1563
+ -d, --dataset=<name> Dataset to create document(s) in (overrides CLI configuration)
1564
+ -p, --project-id=<id> Project ID to create document(s) in (overrides CLI configuration)
1339
1565
 
1340
1566
  DESCRIPTION
1341
1567
  Create one or more documents
@@ -1358,9 +1584,13 @@ EXAMPLES
1358
1584
  parser for simplified syntax.
1359
1585
 
1360
1586
  $ sanity documents create --id myDocId --watch --replace --json5
1587
+
1588
+ Create documents in a specific project
1589
+
1590
+ $ sanity documents create myDocument.json --project-id abc123
1361
1591
  ```
1362
1592
 
1363
- _See code: [src/commands/documents/create.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/documents/create.ts)_
1593
+ _See code: [src/commands/documents/create.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/documents/create.ts)_
1364
1594
 
1365
1595
  ## `sanity documents delete ID [IDS]`
1366
1596
 
@@ -1368,14 +1598,15 @@ Delete one or more documents from the projects configured dataset
1368
1598
 
1369
1599
  ```
1370
1600
  USAGE
1371
- $ sanity documents delete ID... [IDS...] [--dataset <value>]
1601
+ $ sanity documents delete ID... [IDS...] [-p <id>] [-d <name>]
1372
1602
 
1373
1603
  ARGUMENTS
1374
1604
  ID... Document ID to delete
1375
1605
  [IDS...] Additional document IDs to delete
1376
1606
 
1377
- FLAGS
1378
- --dataset=<value> NAME to override dataset
1607
+ OVERRIDE FLAGS
1608
+ -d, --dataset=<name> Dataset to delete from (overrides CLI configuration)
1609
+ -p, --project-id=<id> Project ID to delete from (overrides CLI configuration)
1379
1610
 
1380
1611
  DESCRIPTION
1381
1612
  Delete one or more documents from the projects configured dataset
@@ -1396,9 +1627,13 @@ EXAMPLES
1396
1627
  Delete the document with ID "doc1" and "doc2"
1397
1628
 
1398
1629
  $ sanity documents delete doc1 doc2
1630
+
1631
+ Delete a document from a specific project
1632
+
1633
+ $ sanity documents delete myDocId --project-id abc123
1399
1634
  ```
1400
1635
 
1401
- _See code: [src/commands/documents/delete.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/documents/delete.ts)_
1636
+ _See code: [src/commands/documents/delete.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/documents/delete.ts)_
1402
1637
 
1403
1638
  ## `sanity documents get DOCUMENTID`
1404
1639
 
@@ -1406,14 +1641,17 @@ Get and print a document by ID
1406
1641
 
1407
1642
  ```
1408
1643
  USAGE
1409
- $ sanity documents get DOCUMENTID [-d <value>] [--pretty]
1644
+ $ sanity documents get DOCUMENTID [-p <id>] [-d <name>] [--pretty]
1410
1645
 
1411
1646
  ARGUMENTS
1412
1647
  DOCUMENTID Document ID to retrieve
1413
1648
 
1414
1649
  FLAGS
1415
- -d, --dataset=<value> Dataset to get document from (overrides config)
1416
- --pretty Colorize JSON output
1650
+ --pretty Colorize JSON output
1651
+
1652
+ OVERRIDE FLAGS
1653
+ -d, --dataset=<name> Dataset to get document from (overrides CLI configuration)
1654
+ -p, --project-id=<id> Project ID to get document from (overrides CLI configuration)
1417
1655
 
1418
1656
  DESCRIPTION
1419
1657
  Get and print a document by ID
@@ -1430,9 +1668,13 @@ EXAMPLES
1430
1668
  Get document from a specific dataset
1431
1669
 
1432
1670
  $ sanity documents get myDocId --dataset production
1671
+
1672
+ Get a document from a specific project
1673
+
1674
+ $ sanity documents get myDocId --project-id abc123
1433
1675
  ```
1434
1676
 
1435
- _See code: [src/commands/documents/get.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/documents/get.ts)_
1677
+ _See code: [src/commands/documents/get.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/documents/get.ts)_
1436
1678
 
1437
1679
  ## `sanity documents query QUERY`
1438
1680
 
@@ -1440,17 +1682,19 @@ Query for documents
1440
1682
 
1441
1683
  ```
1442
1684
  USAGE
1443
- $ sanity documents query QUERY [--anonymous] [--api-version <value>] [-d <value>] [--pretty] [-p <value>]
1685
+ $ sanity documents query QUERY [-p <id>] [-d <name>] [--anonymous] [--api-version <value>] [--pretty]
1444
1686
 
1445
1687
  ARGUMENTS
1446
1688
  QUERY GROQ query to run against the dataset
1447
1689
 
1448
1690
  FLAGS
1449
- -d, --dataset=<value> Dataset to query (overrides config)
1450
- -p, --project=<value> Project ID to query (overrides config)
1451
- --anonymous Send the query without any authorization token
1452
- --api-version=<value> [env: SANITY_CLI_QUERY_API_VERSION] API version to use (defaults to 2025-08-15)
1453
- --pretty Colorize JSON output
1691
+ --anonymous Send the query without any authorization token
1692
+ --api-version=<value> [env: SANITY_CLI_QUERY_API_VERSION] API version to use (defaults to 2025-08-15)
1693
+ --pretty Colorize JSON output
1694
+
1695
+ OVERRIDE FLAGS
1696
+ -d, --dataset=<name> Dataset to query (overrides CLI configuration)
1697
+ -p, --project-id=<id> Project ID to query (overrides CLI configuration)
1454
1698
 
1455
1699
  DESCRIPTION
1456
1700
  Query for documents
@@ -1467,9 +1711,13 @@ EXAMPLES
1467
1711
  Use API version v2021-06-07 and do a query
1468
1712
 
1469
1713
  $ sanity documents query '*[_id == "header"] { "headerText": pt::text(body) }' --api-version v2021-06-07
1714
+
1715
+ Query documents in a specific project and dataset
1716
+
1717
+ $ sanity documents query '*[_type == "post"]' --project-id abc123 --dataset production
1470
1718
  ```
1471
1719
 
1472
- _See code: [src/commands/documents/query.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/documents/query.ts)_
1720
+ _See code: [src/commands/documents/query.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/documents/query.ts)_
1473
1721
 
1474
1722
  ## `sanity documents validate`
1475
1723
 
@@ -1477,23 +1725,24 @@ Validate documents in a dataset against the studio schema
1477
1725
 
1478
1726
  ```
1479
1727
  USAGE
1480
- $ sanity documents validate [-d <value>] [--file <value>] [--format <value>] [--level error|warning|info]
1728
+ $ sanity documents validate [-p <id>] [-d <name>] [--file <value>] [--format <value>] [--level error|warning|info]
1481
1729
  [--max-custom-validation-concurrency <value>] [--max-fetch-concurrency <value>] [--workspace <value>] [-y]
1482
1730
 
1483
1731
  FLAGS
1484
- -d, --dataset=<value> Override the dataset used. By default, this is derived from the given
1732
+ -d, --dataset=<name> Override the dataset used. By default, this is derived from the given
1485
1733
  workspace
1734
+ -p, --project-id=<id> Override the project ID used. By default, this is derived from the
1735
+ given workspace
1486
1736
  -y, --yes Skips the first confirmation prompt
1487
1737
  --file=<value> Provide a path to either an .ndjson file or a tarball containing an
1488
1738
  .ndjson file
1489
1739
  --format=<value> The output format used to print the found validation markers and
1490
1740
  report progress
1491
- --level=<option> [default: warning] The minimum level reported out. Defaults to
1492
- warning
1741
+ --level=<option> [default: warning] The minimum level reported. Defaults to warning
1493
1742
  <options: error|warning|info>
1494
1743
  --max-custom-validation-concurrency=<value> [default: 5] Specify how many custom validators can run concurrently
1495
- --max-fetch-concurrency=<value> [default: 25] Specify how many `client.fetch` requests are allow
1496
- concurrency at once
1744
+ --max-fetch-concurrency=<value> [default: 25] Specify how many `client.fetch` requests are allowed to
1745
+ run concurrently
1497
1746
  --workspace=<value> The name of the workspace to use when downloading and validating all
1498
1747
  documents
1499
1748
 
@@ -1516,9 +1765,13 @@ EXAMPLES
1516
1765
  Report out info level validation markers too
1517
1766
 
1518
1767
  $ sanity documents validate --level info
1768
+
1769
+ Validate documents in a specific project and dataset
1770
+
1771
+ $ sanity documents validate --project-id abc123 --dataset production
1519
1772
  ```
1520
1773
 
1521
- _See code: [src/commands/documents/validate.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/documents/validate.ts)_
1774
+ _See code: [src/commands/documents/validate.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/documents/validate.ts)_
1522
1775
 
1523
1776
  ## `sanity exec SCRIPT`
1524
1777
 
@@ -1559,7 +1812,7 @@ EXAMPLES
1559
1812
  $ sanity exec --mock-browser-env myscript.js -- --dry-run positional-argument
1560
1813
  ```
1561
1814
 
1562
- _See code: [src/commands/exec.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/exec.ts)_
1815
+ _See code: [src/commands/exec.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/exec.ts)_
1563
1816
 
1564
1817
  ## `sanity functions add`
1565
1818
 
@@ -1568,8 +1821,8 @@ Add a Function to your Blueprint
1568
1821
  ```
1569
1822
  USAGE
1570
1823
  $ sanity functions add [--example <value> | -n <value> | | --language ts|js | --javascript | | ] [--type
1571
- document-create|document-delete|document-update|document-publish|media-library-asset-create|media-library-asset-upda
1572
- te|media-library-asset-delete... ] [--helpers] [--installer skip|npm|pnpm|yarn] [-i | ]
1824
+ document-publish|document-create|document-update|document-delete|media-library-asset-create|media-library-asset-upda
1825
+ te|media-library-asset-delete|scheduled-function... ] [--helpers] [--installer skip|npm|pnpm|yarn] [-i | ]
1573
1826
 
1574
1827
  FLAGS
1575
1828
  -i, --install Shortcut for --fn-installer npm
@@ -1583,8 +1836,8 @@ FLAGS
1583
1836
  <options: ts|js>
1584
1837
  --type=<option>... Document change event(s) that should trigger the function; you can specify multiple events
1585
1838
  by specifying this flag multiple times
1586
- <options: document-create|document-delete|document-update|document-publish|media-library-ass
1587
- et-create|media-library-asset-update|media-library-asset-delete>
1839
+ <options: document-publish|document-create|document-update|document-delete|media-library-ass
1840
+ et-create|media-library-asset-update|media-library-asset-delete|scheduled-function>
1588
1841
 
1589
1842
  DESCRIPTION
1590
1843
  Add a Function to your Blueprint
@@ -1608,7 +1861,7 @@ EXAMPLES
1608
1861
  $ sanity functions add --name my-function --type document-create --type document-update --lang js
1609
1862
  ```
1610
1863
 
1611
- _See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v13.2.0/src/commands/functions/add.ts)_
1864
+ _See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.5.0/src/commands/functions/add.ts)_
1612
1865
 
1613
1866
  ## `sanity functions dev`
1614
1867
 
@@ -1642,7 +1895,7 @@ EXAMPLES
1642
1895
  $ sanity functions dev --timeout 60
1643
1896
  ```
1644
1897
 
1645
- _See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v13.2.0/src/commands/functions/dev.ts)_
1898
+ _See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.5.0/src/commands/functions/dev.ts)_
1646
1899
 
1647
1900
  ## `sanity functions env add NAME KEY VALUE`
1648
1901
 
@@ -1669,7 +1922,7 @@ EXAMPLES
1669
1922
  $ sanity functions env add MyFunction API_URL https://api.example.com/
1670
1923
  ```
1671
1924
 
1672
- _See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v13.2.0/src/commands/functions/env/add.ts)_
1925
+ _See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.5.0/src/commands/functions/env/add.ts)_
1673
1926
 
1674
1927
  ## `sanity functions env list NAME`
1675
1928
 
@@ -1693,7 +1946,7 @@ EXAMPLES
1693
1946
  $ sanity functions env list MyFunction
1694
1947
  ```
1695
1948
 
1696
- _See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v13.2.0/src/commands/functions/env/list.ts)_
1949
+ _See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.5.0/src/commands/functions/env/list.ts)_
1697
1950
 
1698
1951
  ## `sanity functions env remove NAME KEY`
1699
1952
 
@@ -1719,7 +1972,7 @@ EXAMPLES
1719
1972
  $ sanity functions env remove MyFunction API_URL
1720
1973
  ```
1721
1974
 
1722
- _See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v13.2.0/src/commands/functions/env/remove.ts)_
1975
+ _See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.5.0/src/commands/functions/env/remove.ts)_
1723
1976
 
1724
1977
  ## `sanity functions logs [NAME]`
1725
1978
 
@@ -1727,7 +1980,7 @@ Retrieve or delete logs for a Sanity Function
1727
1980
 
1728
1981
  ```
1729
1982
  USAGE
1730
- $ sanity functions logs [NAME] [-u] [-f [-d | -l <value> | -j]] [-w]
1983
+ $ sanity functions logs [NAME] [--stack <value>] [-u] [-f [-d | -l <value> | -j]] [-w]
1731
1984
 
1732
1985
  ARGUMENTS
1733
1986
  [NAME] The name of the Sanity Function
@@ -1739,6 +1992,7 @@ FLAGS
1739
1992
  -l, --limit=<value> [default: 50] Total number of log entries to retrieve
1740
1993
  -u, --utc Show dates in UTC time zone
1741
1994
  -w, --watch Watch for new logs (streaming mode)
1995
+ --stack=<value> Stack name or ID to use instead of the locally configured Stack
1742
1996
 
1743
1997
  DESCRIPTION
1744
1998
  Retrieve or delete logs for a Sanity Function
@@ -1758,7 +2012,7 @@ EXAMPLES
1758
2012
  $ sanity functions logs <name> --delete
1759
2013
  ```
1760
2014
 
1761
- _See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v13.2.0/src/commands/functions/logs.ts)_
2015
+ _See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.5.0/src/commands/functions/logs.ts)_
1762
2016
 
1763
2017
  ## `sanity functions test [NAME]`
1764
2018
 
@@ -1812,7 +2066,7 @@ EXAMPLES
1812
2066
  $ sanity functions test <name> --event update --data-before '{ "title": "before" }' --data-after '{ "title": "after" }'
1813
2067
  ```
1814
2068
 
1815
- _See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v13.2.0/src/commands/functions/test.ts)_
2069
+ _See code: [@sanity/runtime-cli](https://github.com/sanity-io/runtime-cli/blob/v14.5.0/src/commands/functions/test.ts)_
1816
2070
 
1817
2071
  ## `sanity graphql deploy`
1818
2072
 
@@ -1820,21 +2074,21 @@ Deploy a GraphQL API from the current Sanity schema
1820
2074
 
1821
2075
  ```
1822
2076
  USAGE
1823
- $ sanity graphql deploy [--api <value>...] [--dataset <value>] [--dry-run] [--force] [--generation gen1|gen2|gen3]
2077
+ $ sanity graphql deploy [--api <value>...] [-d <name>] [--dry-run] [--force] [--generation gen1|gen2|gen3]
1824
2078
  [--non-null-document-fields] [--playground] [--tag <value>] [--with-union-cache]
1825
2079
 
1826
2080
  FLAGS
1827
- --api=<value>... Only deploy API with this ID. Can be specified multiple times.
1828
- --dataset=<value> Deploy API for the given dataset
1829
- --dry-run Validate defined GraphQL APIs, check for breaking changes, skip deploy
1830
- --force Deploy API without confirming breaking changes
1831
- --generation=<option> API generation to deploy (defaults to "gen3")
1832
- <options: gen1|gen2|gen3>
1833
- --non-null-document-fields Use non-null document fields (_id, _type etc)
1834
- --[no-]playground Enable GraphQL playground for easier debugging
1835
- --tag=<value> Deploy API(s) to given tag (defaults to "default")
1836
- --with-union-cache Enable union cache that optimizes schema generation for schemas with many self referencing
1837
- types
2081
+ -d, --dataset=<name> Deploy API for the given dataset
2082
+ --api=<value>... Only deploy API with this ID. Can be specified multiple times.
2083
+ --dry-run Validate defined GraphQL APIs, check for breaking changes, skip deploy
2084
+ --force Deploy API without confirming breaking changes
2085
+ --generation=<option> API generation to deploy (defaults to "gen3")
2086
+ <options: gen1|gen2|gen3>
2087
+ --non-null-document-fields Use non-null document fields (_id, _type etc)
2088
+ --[no-]playground Enable GraphQL playground for easier debugging
2089
+ --tag=<value> Deploy API(s) to given tag (defaults to "default")
2090
+ --with-union-cache Enable union cache that optimizes schema generation for schemas with many self
2091
+ referencing types
1838
2092
 
1839
2093
  DESCRIPTION
1840
2094
  Deploy a GraphQL API from the current Sanity schema
@@ -1857,7 +2111,7 @@ EXAMPLES
1857
2111
  $ sanity graphql deploy --playground
1858
2112
  ```
1859
2113
 
1860
- _See code: [src/commands/graphql/deploy.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/graphql/deploy.ts)_
2114
+ _See code: [src/commands/graphql/deploy.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/graphql/deploy.ts)_
1861
2115
 
1862
2116
  ## `sanity graphql list`
1863
2117
 
@@ -1865,7 +2119,10 @@ List all GraphQL endpoints deployed for this project
1865
2119
 
1866
2120
  ```
1867
2121
  USAGE
1868
- $ sanity graphql list
2122
+ $ sanity graphql list [-p <id>]
2123
+
2124
+ OVERRIDE FLAGS
2125
+ -p, --project-id=<id> Project ID to list GraphQL endpoints for (overrides CLI configuration)
1869
2126
 
1870
2127
  DESCRIPTION
1871
2128
  List all GraphQL endpoints deployed for this project
@@ -1874,9 +2131,13 @@ EXAMPLES
1874
2131
  List GraphQL endpoints for the current project
1875
2132
 
1876
2133
  $ sanity graphql list
2134
+
2135
+ List GraphQL endpoints for a specific project
2136
+
2137
+ $ sanity graphql list --project-id abc123
1877
2138
  ```
1878
2139
 
1879
- _See code: [src/commands/graphql/list.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/graphql/list.ts)_
2140
+ _See code: [src/commands/graphql/list.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/graphql/list.ts)_
1880
2141
 
1881
2142
  ## `sanity graphql undeploy`
1882
2143
 
@@ -1884,14 +2145,16 @@ Remove a deployed GraphQL API
1884
2145
 
1885
2146
  ```
1886
2147
  USAGE
1887
- $ sanity graphql undeploy [--api <value>] [--dataset <value>] [--force] [--project <value>] [--tag <value>]
2148
+ $ sanity graphql undeploy [--api <value> | -p <id> | ] [-d <name>] [--force] [--tag <value>]
1888
2149
 
1889
2150
  FLAGS
1890
- --api=<value> Undeploy API with this ID (project, dataset and tag flags take precedence)
1891
- --dataset=<value> Dataset to undeploy GraphQL API from
1892
- --force Skip confirmation prompt
1893
- --project=<value> Project ID to delete GraphQL API for
1894
- --tag=<value> [default: default] Tag to undeploy GraphQL API from
2151
+ --api=<value> Undeploy API with this ID
2152
+ --force Skip confirmation prompt
2153
+ --tag=<value> [default: default] Tag to undeploy GraphQL API from
2154
+
2155
+ OVERRIDE FLAGS
2156
+ -d, --dataset=<name> Dataset to undeploy GraphQL API from (overrides CLI configuration)
2157
+ -p, --project-id=<id> Project ID to undeploy GraphQL API from (overrides CLI configuration)
1895
2158
 
1896
2159
  DESCRIPTION
1897
2160
  Remove a deployed GraphQL API
@@ -1916,9 +2179,13 @@ EXAMPLES
1916
2179
  Undeploy GraphQL API without confirmation prompt
1917
2180
 
1918
2181
  $ sanity graphql undeploy --force
2182
+
2183
+ Undeploy GraphQL API for a specific project and dataset
2184
+
2185
+ $ sanity graphql undeploy --project-id abc123 --dataset production
1919
2186
  ```
1920
2187
 
1921
- _See code: [src/commands/graphql/undeploy.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/graphql/undeploy.ts)_
2188
+ _See code: [src/commands/graphql/undeploy.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/graphql/undeploy.ts)_
1922
2189
 
1923
2190
  ## `sanity help [COMMAND]`
1924
2191
 
@@ -1946,11 +2213,14 @@ Print details of a given webhook delivery attempt
1946
2213
 
1947
2214
  ```
1948
2215
  USAGE
1949
- $ sanity hook attempt ATTEMPTID
2216
+ $ sanity hook attempt ATTEMPTID [-p <id>]
1950
2217
 
1951
2218
  ARGUMENTS
1952
2219
  ATTEMPTID The delivery attempt ID to get details for
1953
2220
 
2221
+ OVERRIDE FLAGS
2222
+ -p, --project-id=<id> Project ID to view webhook attempt for (overrides CLI configuration)
2223
+
1954
2224
  DESCRIPTION
1955
2225
  Print details of a given webhook delivery attempt
1956
2226
 
@@ -1958,9 +2228,13 @@ EXAMPLES
1958
2228
  Print details of webhook delivery attempt with ID abc123
1959
2229
 
1960
2230
  $ sanity hook attempt abc123
2231
+
2232
+ Get attempt details for a specific project
2233
+
2234
+ $ sanity hook attempt abc123 --project-id projectId
1961
2235
  ```
1962
2236
 
1963
- _See code: [src/commands/hook/attempt.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/hook/attempt.ts)_
2237
+ _See code: [src/commands/hook/attempt.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/hook/attempt.ts)_
1964
2238
 
1965
2239
  ## `sanity hook create`
1966
2240
 
@@ -1968,7 +2242,10 @@ Create a new webhook for the current project
1968
2242
 
1969
2243
  ```
1970
2244
  USAGE
1971
- $ sanity hook create
2245
+ $ sanity hook create [-p <id>]
2246
+
2247
+ OVERRIDE FLAGS
2248
+ -p, --project-id=<id> Project ID to create webhook for (overrides CLI configuration)
1972
2249
 
1973
2250
  DESCRIPTION
1974
2251
  Create a new webhook for the current project
@@ -1977,9 +2254,13 @@ EXAMPLES
1977
2254
  Create a new webhook for the current project
1978
2255
 
1979
2256
  $ sanity hook create
2257
+
2258
+ Create a webhook for a specific project
2259
+
2260
+ $ sanity hook create --project-id abc123
1980
2261
  ```
1981
2262
 
1982
- _See code: [src/commands/hook/create.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/hook/create.ts)_
2263
+ _See code: [src/commands/hook/create.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/hook/create.ts)_
1983
2264
 
1984
2265
  ## `sanity hook delete [NAME]`
1985
2266
 
@@ -1987,11 +2268,14 @@ Delete a hook within your project
1987
2268
 
1988
2269
  ```
1989
2270
  USAGE
1990
- $ sanity hook delete [NAME]
2271
+ $ sanity hook delete [NAME] [-p <id>]
1991
2272
 
1992
2273
  ARGUMENTS
1993
2274
  [NAME] Name of hook to delete (will prompt if not provided)
1994
2275
 
2276
+ OVERRIDE FLAGS
2277
+ -p, --project-id=<id> Project ID to delete webhook from (overrides CLI configuration)
2278
+
1995
2279
  DESCRIPTION
1996
2280
  Delete a hook within your project
1997
2281
 
@@ -2003,9 +2287,13 @@ EXAMPLES
2003
2287
  Delete a specific hook by name
2004
2288
 
2005
2289
  $ sanity hook delete my-hook
2290
+
2291
+ Delete a hook from a specific project
2292
+
2293
+ $ sanity hook delete --project-id abc123
2006
2294
  ```
2007
2295
 
2008
- _See code: [src/commands/hook/delete.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/hook/delete.ts)_
2296
+ _See code: [src/commands/hook/delete.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/hook/delete.ts)_
2009
2297
 
2010
2298
  ## `sanity hook list`
2011
2299
 
@@ -2013,7 +2301,10 @@ List hooks for a given project
2013
2301
 
2014
2302
  ```
2015
2303
  USAGE
2016
- $ sanity hook list
2304
+ $ sanity hook list [-p <id>]
2305
+
2306
+ OVERRIDE FLAGS
2307
+ -p, --project-id=<id> Project ID to list webhooks for (overrides CLI configuration)
2017
2308
 
2018
2309
  DESCRIPTION
2019
2310
  List hooks for a given project
@@ -2022,9 +2313,13 @@ EXAMPLES
2022
2313
  List hooks for a given project
2023
2314
 
2024
2315
  $ sanity hook list
2316
+
2317
+ List hooks for a specific project
2318
+
2319
+ $ sanity hook list --project-id abc123
2025
2320
  ```
2026
2321
 
2027
- _See code: [src/commands/hook/list.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/hook/list.ts)_
2322
+ _See code: [src/commands/hook/list.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/hook/list.ts)_
2028
2323
 
2029
2324
  ## `sanity hook logs [NAME]`
2030
2325
 
@@ -2032,7 +2327,7 @@ List latest log entries for a given hook
2032
2327
 
2033
2328
  ```
2034
2329
  USAGE
2035
- $ sanity hook logs [NAME] [--detailed]
2330
+ $ sanity hook logs [NAME] [-p <id>] [--detailed]
2036
2331
 
2037
2332
  ARGUMENTS
2038
2333
  [NAME] Name of the hook to show logs for
@@ -2040,6 +2335,9 @@ ARGUMENTS
2040
2335
  FLAGS
2041
2336
  --detailed Include detailed payload and attempts
2042
2337
 
2338
+ OVERRIDE FLAGS
2339
+ -p, --project-id=<id> Project ID to view webhook logs for (overrides CLI configuration)
2340
+
2043
2341
  DESCRIPTION
2044
2342
  List latest log entries for a given hook
2045
2343
 
@@ -2051,9 +2349,13 @@ EXAMPLES
2051
2349
  List latest log entries for a specific hook by name
2052
2350
 
2053
2351
  $ sanity hook logs [NAME]
2352
+
2353
+ List hook logs for a specific project
2354
+
2355
+ $ sanity hook logs --project-id abc123
2054
2356
  ```
2055
2357
 
2056
- _See code: [src/commands/hook/logs.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/hook/logs.ts)_
2358
+ _See code: [src/commands/hook/logs.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/hook/logs.ts)_
2057
2359
 
2058
2360
  ## `sanity init`
2059
2361
 
@@ -2122,7 +2424,7 @@ EXAMPLES
2122
2424
  --output-path /Users/espenh/movies-unlimited
2123
2425
  ```
2124
2426
 
2125
- _See code: [src/commands/init.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/init.ts)_
2427
+ _See code: [src/commands/init.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/init.ts)_
2126
2428
 
2127
2429
  ## `sanity install [PACKAGES]`
2128
2430
 
@@ -2146,7 +2448,7 @@ EXAMPLES
2146
2448
  $ sanity install some-package another-package
2147
2449
  ```
2148
2450
 
2149
- _See code: [src/commands/install.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/install.ts)_
2451
+ _See code: [src/commands/install.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/install.ts)_
2150
2452
 
2151
2453
  ## `sanity learn`
2152
2454
 
@@ -2160,7 +2462,7 @@ DESCRIPTION
2160
2462
  Opens Sanity Learn in your web browser
2161
2463
  ```
2162
2464
 
2163
- _See code: [src/commands/learn.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/learn.ts)_
2465
+ _See code: [src/commands/learn.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/learn.ts)_
2164
2466
 
2165
2467
  ## `sanity login`
2166
2468
 
@@ -2168,7 +2470,7 @@ Authenticates the CLI for access to Sanity projects
2168
2470
 
2169
2471
  ```
2170
2472
  USAGE
2171
- $ sanity login [--open] [--provider <providerId>] [--sso <slug>]
2473
+ $ sanity login [--open] [--provider <providerId> | --sso <slug>]
2172
2474
 
2173
2475
  FLAGS
2174
2476
  --[no-]open Open a browser window to log in (`--no-open` only prints URL)
@@ -2192,7 +2494,7 @@ EXAMPLES
2192
2494
  $ sanity login --provider github --no-open
2193
2495
  ```
2194
2496
 
2195
- _See code: [src/commands/login.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/login.ts)_
2497
+ _See code: [src/commands/login.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/login.ts)_
2196
2498
 
2197
2499
  ## `sanity logout`
2198
2500
 
@@ -2206,7 +2508,7 @@ DESCRIPTION
2206
2508
  Logs out the CLI from the current user session
2207
2509
  ```
2208
2510
 
2209
- _See code: [src/commands/logout.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/logout.ts)_
2511
+ _See code: [src/commands/logout.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/logout.ts)_
2210
2512
 
2211
2513
  ## `sanity manage`
2212
2514
 
@@ -2220,7 +2522,7 @@ DESCRIPTION
2220
2522
  Opens project management interface in your web browser
2221
2523
  ```
2222
2524
 
2223
- _See code: [src/commands/manage.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/manage.ts)_
2525
+ _See code: [src/commands/manage.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/manage.ts)_
2224
2526
 
2225
2527
  ## `sanity manifest extract`
2226
2528
 
@@ -2231,7 +2533,7 @@ USAGE
2231
2533
  $ sanity manifest extract [--path <value>]
2232
2534
 
2233
2535
  FLAGS
2234
- --path=<value> [default: /dist/static] Optional path to specify destination directory of the manifest files
2536
+ --path=<value> [default: dist/static] Optional path to specify destination directory of the manifest files
2235
2537
 
2236
2538
  DESCRIPTION
2237
2539
  Extracts the studio configuration as one or more JSON manifest files.
@@ -2248,18 +2550,18 @@ EXAMPLES
2248
2550
  $ sanity manifest extract --path /public/static
2249
2551
  ```
2250
2552
 
2251
- _See code: [src/commands/manifest/extract.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/manifest/extract.ts)_
2553
+ _See code: [src/commands/manifest/extract.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/manifest/extract.ts)_
2252
2554
 
2253
2555
  ## `sanity mcp configure`
2254
2556
 
2255
- Configure Sanity MCP server for AI editors (Cursor, VS Code, Claude Code)
2557
+ Configure Sanity MCP server for AI editors (Claude Code, Codex CLI, Cursor, Gemini CLI, GitHub Copilot CLI, VS Code)
2256
2558
 
2257
2559
  ```
2258
2560
  USAGE
2259
2561
  $ sanity mcp configure
2260
2562
 
2261
2563
  DESCRIPTION
2262
- Configure Sanity MCP server for AI editors (Cursor, VS Code, Claude Code)
2564
+ Configure Sanity MCP server for AI editors (Claude Code, Codex CLI, Cursor, Gemini CLI, GitHub Copilot CLI, VS Code)
2263
2565
 
2264
2566
  EXAMPLES
2265
2567
  Configure Sanity MCP server for detected AI editors
@@ -2267,7 +2569,7 @@ EXAMPLES
2267
2569
  $ sanity mcp configure
2268
2570
  ```
2269
2571
 
2270
- _See code: [src/commands/mcp/configure.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/mcp/configure.ts)_
2572
+ _See code: [src/commands/mcp/configure.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/mcp/configure.ts)_
2271
2573
 
2272
2574
  ## `sanity media create-aspect`
2273
2575
 
@@ -2286,7 +2588,7 @@ EXAMPLES
2286
2588
  $ sanity media create-aspect
2287
2589
  ```
2288
2590
 
2289
- _See code: [src/commands/media/create-aspect.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/media/create-aspect.ts)_
2591
+ _See code: [src/commands/media/create-aspect.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/media/create-aspect.ts)_
2290
2592
 
2291
2593
  ## `sanity media delete-aspect ASPECTNAME`
2292
2594
 
@@ -2294,7 +2596,7 @@ Undeploy an aspect
2294
2596
 
2295
2597
  ```
2296
2598
  USAGE
2297
- $ sanity media delete-aspect ASPECTNAME [--media-library-id <value>] [--yes]
2599
+ $ sanity media delete-aspect ASPECTNAME [-p <id>] [--media-library-id <value>] [--yes]
2298
2600
 
2299
2601
  ARGUMENTS
2300
2602
  ASPECTNAME Name of the aspect to delete
@@ -2303,6 +2605,9 @@ FLAGS
2303
2605
  --media-library-id=<value> The id of the target media library
2304
2606
  --yes Skip confirmation prompt
2305
2607
 
2608
+ OVERRIDE FLAGS
2609
+ -p, --project-id=<id> Project ID to delete media aspect from (overrides CLI configuration)
2610
+
2306
2611
  DESCRIPTION
2307
2612
  Undeploy an aspect
2308
2613
 
@@ -2312,7 +2617,7 @@ EXAMPLES
2312
2617
  $ sanity media delete-aspect someAspect
2313
2618
  ```
2314
2619
 
2315
- _See code: [src/commands/media/delete-aspect.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/media/delete-aspect.ts)_
2620
+ _See code: [src/commands/media/delete-aspect.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/media/delete-aspect.ts)_
2316
2621
 
2317
2622
  ## `sanity media deploy-aspect [ASPECTNAME]`
2318
2623
 
@@ -2320,7 +2625,7 @@ Deploy an aspect
2320
2625
 
2321
2626
  ```
2322
2627
  USAGE
2323
- $ sanity media deploy-aspect [ASPECTNAME] [--all] [--media-library-id <value>]
2628
+ $ sanity media deploy-aspect [ASPECTNAME] [-p <id>] [--all] [--media-library-id <value>]
2324
2629
 
2325
2630
  ARGUMENTS
2326
2631
  [ASPECTNAME] Name of the aspect to deploy
@@ -2329,6 +2634,9 @@ FLAGS
2329
2634
  --all Deploy all aspects
2330
2635
  --media-library-id=<value> The id of the target media library
2331
2636
 
2637
+ OVERRIDE FLAGS
2638
+ -p, --project-id=<id> Project ID to deploy media aspect to (overrides CLI configuration)
2639
+
2332
2640
  DESCRIPTION
2333
2641
  Deploy an aspect
2334
2642
 
@@ -2342,7 +2650,7 @@ EXAMPLES
2342
2650
  $ sanity media deploy-aspect --all
2343
2651
  ```
2344
2652
 
2345
- _See code: [src/commands/media/deploy-aspect.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/media/deploy-aspect.ts)_
2653
+ _See code: [src/commands/media/deploy-aspect.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/media/deploy-aspect.ts)_
2346
2654
 
2347
2655
  ## `sanity media export [DESTINATION]`
2348
2656
 
@@ -2350,8 +2658,8 @@ Export an archive of all file and image assets including their aspect data from
2350
2658
 
2351
2659
  ```
2352
2660
  USAGE
2353
- $ sanity media export [DESTINATION] [--asset-concurrency <value>] [--media-library-id <value>] [--no-compress]
2354
- [--overwrite]
2661
+ $ sanity media export [DESTINATION] [-p <id>] [--asset-concurrency <value>] [--media-library-id <value>]
2662
+ [--no-compress] [--overwrite]
2355
2663
 
2356
2664
  ARGUMENTS
2357
2665
  [DESTINATION] Output destination file path
@@ -2362,6 +2670,9 @@ FLAGS
2362
2670
  --no-compress Skips compressing tarball entries (still generates a gzip file)
2363
2671
  --overwrite Overwrite any file with the same name
2364
2672
 
2673
+ OVERRIDE FLAGS
2674
+ -p, --project-id=<id> Project ID to export media from (overrides CLI configuration)
2675
+
2365
2676
  DESCRIPTION
2366
2677
  Export an archive of all file and image assets including their aspect data from the target media library. Video assets
2367
2678
  are excluded from the export.
@@ -2380,7 +2691,7 @@ EXAMPLES
2380
2691
  $ sanity media export --media-library-id my-library-id
2381
2692
  ```
2382
2693
 
2383
- _See code: [src/commands/media/export.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/media/export.ts)_
2694
+ _See code: [src/commands/media/export.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/media/export.ts)_
2384
2695
 
2385
2696
  ## `sanity media import SOURCE`
2386
2697
 
@@ -2388,7 +2699,7 @@ Import a set of assets to the target media library.
2388
2699
 
2389
2700
  ```
2390
2701
  USAGE
2391
- $ sanity media import SOURCE [--media-library-id <value>] [--replace-aspects]
2702
+ $ sanity media import SOURCE [-p <id>] [--media-library-id <value>] [--replace-aspects]
2392
2703
 
2393
2704
  ARGUMENTS
2394
2705
  SOURCE Image file or folder to import from
@@ -2398,6 +2709,9 @@ FLAGS
2398
2709
  --replace-aspects Replace existing aspect data. All versions will be replaced (e.g. published and draft
2399
2710
  aspect data)
2400
2711
 
2712
+ OVERRIDE FLAGS
2713
+ -p, --project-id=<id> Project ID to import media to (overrides CLI configuration)
2714
+
2401
2715
  DESCRIPTION
2402
2716
  Import a set of assets to the target media library.
2403
2717
 
@@ -2415,7 +2729,7 @@ EXAMPLES
2415
2729
  $ sanity media import products --replace-aspects
2416
2730
  ```
2417
2731
 
2418
- _See code: [src/commands/media/import.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/media/import.ts)_
2732
+ _See code: [src/commands/media/import.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/media/import.ts)_
2419
2733
 
2420
2734
  ## `sanity migration create [TITLE]`
2421
2735
 
@@ -2441,7 +2755,7 @@ EXAMPLES
2441
2755
  $ sanity migration create "Rename field from location to address"
2442
2756
  ```
2443
2757
 
2444
- _See code: [@sanity/migrate](https://github.com/sanity-io/migrate/blob/v5.2.3/src/commands/migration/create.ts)_
2758
+ _See code: [@sanity/migrate](https://github.com/sanity-io/migrate/blob/v6.0.0/src/commands/migration/create.ts)_
2445
2759
 
2446
2760
  ## `sanity migration list`
2447
2761
 
@@ -2460,7 +2774,7 @@ EXAMPLES
2460
2774
  $ sanity migration list
2461
2775
  ```
2462
2776
 
2463
- _See code: [@sanity/migrate](https://github.com/sanity-io/migrate/blob/v5.2.3/src/commands/migration/list.ts)_
2777
+ _See code: [@sanity/migrate](https://github.com/sanity-io/migrate/blob/v6.0.0/src/commands/migration/list.ts)_
2464
2778
 
2465
2779
  ## `sanity migration run [ID]`
2466
2780
 
@@ -2504,7 +2818,7 @@ EXAMPLES
2504
2818
  $ sanity migration run <id> --from-export=production.tar.gz --no-dry-run --project xyz --dataset staging
2505
2819
  ```
2506
2820
 
2507
- _See code: [@sanity/migrate](https://github.com/sanity-io/migrate/blob/v5.2.3/src/commands/migration/run.ts)_
2821
+ _See code: [@sanity/migrate](https://github.com/sanity-io/migrate/blob/v6.0.0/src/commands/migration/run.ts)_
2508
2822
 
2509
2823
  ## `sanity openapi get SLUG`
2510
2824
 
@@ -2543,7 +2857,7 @@ EXAMPLES
2543
2857
  $ sanity openapi get query > query-api.yaml
2544
2858
  ```
2545
2859
 
2546
- _See code: [src/commands/openapi/get.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/openapi/get.ts)_
2860
+ _See code: [src/commands/openapi/get.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/openapi/get.ts)_
2547
2861
 
2548
2862
  ## `sanity openapi list`
2549
2863
 
@@ -2574,7 +2888,7 @@ EXAMPLES
2574
2888
  $ sanity openapi list --web
2575
2889
  ```
2576
2890
 
2577
- _See code: [src/commands/openapi/list.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/openapi/list.ts)_
2891
+ _See code: [src/commands/openapi/list.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/openapi/list.ts)_
2578
2892
 
2579
2893
  ## `sanity preview [OUTPUTDIR]`
2580
2894
 
@@ -2605,7 +2919,7 @@ EXAMPLES
2605
2919
  $ sanity preview some/build-output-dir
2606
2920
  ```
2607
2921
 
2608
- _See code: [src/commands/preview.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/preview.ts)_
2922
+ _See code: [src/commands/preview.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/preview.ts)_
2609
2923
 
2610
2924
  ## `sanity projects create [PROJECTNAME]`
2611
2925
 
@@ -2653,7 +2967,7 @@ EXAMPLES
2653
2967
  $ sanity projects create "CI Project" --yes --json
2654
2968
  ```
2655
2969
 
2656
- _See code: [src/commands/projects/create.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/projects/create.ts)_
2970
+ _See code: [src/commands/projects/create.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/projects/create.ts)_
2657
2971
 
2658
2972
  ## `sanity projects list`
2659
2973
 
@@ -2682,7 +2996,7 @@ EXAMPLES
2682
2996
  $ sanity projects list --sort=members --order=asc
2683
2997
  ```
2684
2998
 
2685
- _See code: [src/commands/projects/list.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/projects/list.ts)_
2999
+ _See code: [src/commands/projects/list.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/projects/list.ts)_
2686
3000
 
2687
3001
  ## `sanity schema delete`
2688
3002
 
@@ -2690,14 +3004,15 @@ Delete schema documents by id
2690
3004
 
2691
3005
  ```
2692
3006
  USAGE
2693
- $ sanity schema delete --ids <value> [--dataset <value>] [--extract-manifest] [--manifest-dir <value>] [--verbose]
3007
+ $ sanity schema delete --ids <value> [-p <id>] [-d <name>] [--verbose]
2694
3008
 
2695
3009
  FLAGS
2696
- --dataset=<value> Delete schemas from a specific dataset
2697
- --[no-]extract-manifest Generate manifest file (disable with --no-extract-manifest)
2698
- --ids=<value> (required) Comma-separated list of schema ids to delete
2699
- --manifest-dir=<value> [default: ./dist/static] Directory containing manifest file
2700
- --verbose Enable verbose logging
3010
+ -d, --dataset=<name> Delete schemas from a specific dataset
3011
+ --ids=<value> (required) Comma-separated list of schema ids to delete
3012
+ --verbose Enable verbose logging
3013
+
3014
+ OVERRIDE FLAGS
3015
+ -p, --project-id=<id> Project ID to delete schema from (overrides CLI configuration)
2701
3016
 
2702
3017
  DESCRIPTION
2703
3018
  Delete schema documents by id
@@ -2710,13 +3025,9 @@ EXAMPLES
2710
3025
  Delete multiple schemas
2711
3026
 
2712
3027
  $ sanity schema delete --ids sanity.workspace.schema.workspaceName,prefix.sanity.workspace.schema.otherWorkspace
2713
-
2714
- Delete using a pre-existing manifest file (config changes in sanity.config will not be picked up)
2715
-
2716
- $ sanity schema delete --no-extract-manifest --ids sanity.workspace.schema.workspaceName
2717
3028
  ```
2718
3029
 
2719
- _See code: [src/commands/schema/delete.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/schema/delete.ts)_
3030
+ _See code: [src/commands/schema/delete.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/schema/delete.ts)_
2720
3031
 
2721
3032
  ## `sanity schema deploy`
2722
3033
 
@@ -2750,13 +3061,9 @@ EXAMPLES
2750
3061
  Deploy the schema for only the workspace "default"
2751
3062
 
2752
3063
  $ sanity schema deploy --workspace default
2753
-
2754
- Runs using a pre-existing manifest file. Config changes in sanity.config will not be picked up in this case.
2755
-
2756
- $ sanity schema deploy --no-extract-manifest
2757
3064
  ```
2758
3065
 
2759
- _See code: [src/commands/schema/deploy.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/schema/deploy.ts)_
3066
+ _See code: [src/commands/schema/deploy.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/schema/deploy.ts)_
2760
3067
 
2761
3068
  ## `sanity schema extract`
2762
3069
 
@@ -2764,14 +3071,17 @@ Extracts a JSON representation of a Sanity schema within a Studio context.
2764
3071
 
2765
3072
  ```
2766
3073
  USAGE
2767
- $ sanity schema extract [--enforce-required-fields] [--format <format>] [--path <value>] [--workspace <name>]
3074
+ $ sanity schema extract [--enforce-required-fields] [--format <format>] [--path <value>] [--watch]
3075
+ [--watch-patterns <glob>...] [--workspace <name>]
2768
3076
 
2769
3077
  FLAGS
2770
- --enforce-required-fields Makes the schema generated treat fields marked as required as non-optional
2771
- --format=<format> [default: groq-type-nodes] Format the schema as GROQ type nodes. Only available format at
2772
- the moment.
2773
- --path=<value> Optional path to specify destination of the schema file
2774
- --workspace=<name> The name of the workspace to generate a schema for
3078
+ --enforce-required-fields Makes the schema generated treat fields marked as required as non-optional
3079
+ --format=<format> [default: groq-type-nodes] Format the schema as GROQ type nodes. Only available format at
3080
+ the moment.
3081
+ --path=<value> Optional path to specify destination of the schema file
3082
+ --watch Enable watch mode to re-extract schema on file changes
3083
+ --watch-patterns=<glob>... Additional glob pattern(s) to watch (can be specified multiple times)
3084
+ --workspace=<name> The name of the workspace to generate a schema for
2775
3085
 
2776
3086
  DESCRIPTION
2777
3087
  Extracts a JSON representation of a Sanity schema within a Studio context.
@@ -2782,9 +3092,17 @@ EXAMPLES
2782
3092
  Extracts schema types in a Sanity project with more than one workspace
2783
3093
 
2784
3094
  $ sanity schema extract --workspace default
3095
+
3096
+ Watch mode - re-extract on changes
3097
+
3098
+ $ sanity schema extract --watch
3099
+
3100
+ Watch with custom glob patterns
3101
+
3102
+ $ sanity schema extract --watch --watch-patterns "lib/**/*.ts"
2785
3103
  ```
2786
3104
 
2787
- _See code: [src/commands/schema/extract.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/schema/extract.ts)_
3105
+ _See code: [src/commands/schema/extract.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/schema/extract.ts)_
2788
3106
 
2789
3107
  ## `sanity schema list`
2790
3108
 
@@ -2792,13 +3110,11 @@ Lists all schemas in the current dataset.
2792
3110
 
2793
3111
  ```
2794
3112
  USAGE
2795
- $ sanity schema list [--extract-manifest] [--id <schema_id>] [--json] [--manifest-dir <directory>]
3113
+ $ sanity schema list [--id <schema_id>] [--json]
2796
3114
 
2797
3115
  FLAGS
2798
- --[no-]extract-manifest Disables manifest generation - the command will fail if no manifest exists
2799
- --id=<schema_id> Fetch a single schema by id
2800
- --json Get schema as json
2801
- --manifest-dir=<directory> [default: ./dist/static] Directory containing manifest file
3116
+ --id=<schema_id> Fetch a single schema by id
3117
+ --json Get schema as json
2802
3118
 
2803
3119
  DESCRIPTION
2804
3120
  Lists all schemas in the current dataset.
@@ -2824,13 +3140,9 @@ EXAMPLES
2824
3140
  Get singular stored schema as pretty-printed json-object
2825
3141
 
2826
3142
  $ sanity schema list --json --id _.schemas.workspaceName
2827
-
2828
- Runs using a pre-existing manifest file. Config changes in sanity.config will not be picked up in this case.
2829
-
2830
- $ sanity schema list --no-extract-manifest
2831
3143
  ```
2832
3144
 
2833
- _See code: [src/commands/schema/list.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/schema/list.ts)_
3145
+ _See code: [src/commands/schema/list.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/schema/list.ts)_
2834
3146
 
2835
3147
  ## `sanity schema validate`
2836
3148
 
@@ -2873,7 +3185,7 @@ EXAMPLES
2873
3185
  $ sanity schema validate --debug-metafile-path metafile.json
2874
3186
  ```
2875
3187
 
2876
- _See code: [src/commands/schema/validate.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/schema/validate.ts)_
3188
+ _See code: [src/commands/schema/validate.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/schema/validate.ts)_
2877
3189
 
2878
3190
  ## `sanity start [OUTPUTDIR]`
2879
3191
 
@@ -2921,7 +3233,7 @@ EXAMPLES
2921
3233
  $ sanity telemetry telemetry disable
2922
3234
  ```
2923
3235
 
2924
- _See code: [src/commands/telemetry/disable.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/telemetry/disable.ts)_
3236
+ _See code: [src/commands/telemetry/disable.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/telemetry/disable.ts)_
2925
3237
 
2926
3238
  ## `sanity telemetry enable`
2927
3239
 
@@ -2940,7 +3252,7 @@ EXAMPLES
2940
3252
  $ sanity telemetry telemetry enable
2941
3253
  ```
2942
3254
 
2943
- _See code: [src/commands/telemetry/enable.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/telemetry/enable.ts)_
3255
+ _See code: [src/commands/telemetry/enable.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/telemetry/enable.ts)_
2944
3256
 
2945
3257
  ## `sanity telemetry status`
2946
3258
 
@@ -2959,7 +3271,7 @@ EXAMPLES
2959
3271
  $ sanity telemetry telemetry status
2960
3272
  ```
2961
3273
 
2962
- _See code: [src/commands/telemetry/status.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/telemetry/status.ts)_
3274
+ _See code: [src/commands/telemetry/status.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/telemetry/status.ts)_
2963
3275
 
2964
3276
  ## `sanity tokens add [LABEL]`
2965
3277
 
@@ -2967,7 +3279,7 @@ Create a new API token for this project
2967
3279
 
2968
3280
  ```
2969
3281
  USAGE
2970
- $ sanity tokens add [LABEL] [--json] [--role viewer] [-y]
3282
+ $ sanity tokens add [LABEL] [-p <id>] [--json] [--role viewer] [-y]
2971
3283
 
2972
3284
  ARGUMENTS
2973
3285
  [LABEL] Label for the new token
@@ -2977,6 +3289,9 @@ FLAGS
2977
3289
  --json Output as JSON
2978
3290
  --role=viewer Role to assign to the token
2979
3291
 
3292
+ OVERRIDE FLAGS
3293
+ -p, --project-id=<id> Project ID to add token to (overrides CLI configuration)
3294
+
2980
3295
  DESCRIPTION
2981
3296
  Create a new API token for this project
2982
3297
 
@@ -2996,9 +3311,13 @@ EXAMPLES
2996
3311
  Output token information as JSON
2997
3312
 
2998
3313
  $ sanity tokens add "API Token" --json
3314
+
3315
+ Create a token for a specific project
3316
+
3317
+ $ sanity tokens add "My Token" --project-id abc123 --role=editor
2999
3318
  ```
3000
3319
 
3001
- _See code: [src/commands/tokens/add.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/tokens/add.ts)_
3320
+ _See code: [src/commands/tokens/add.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/tokens/add.ts)_
3002
3321
 
3003
3322
  ## `sanity tokens delete [TOKENID]`
3004
3323
 
@@ -3006,7 +3325,7 @@ Delete an API token from this project
3006
3325
 
3007
3326
  ```
3008
3327
  USAGE
3009
- $ sanity tokens delete [TOKENID] [--yes]
3328
+ $ sanity tokens delete [TOKENID] [-p <id>] [--yes]
3010
3329
 
3011
3330
  ARGUMENTS
3012
3331
  [TOKENID] Token ID to delete (will prompt if not provided)
@@ -3014,6 +3333,9 @@ ARGUMENTS
3014
3333
  FLAGS
3015
3334
  --yes Skip confirmation prompt (unattended mode)
3016
3335
 
3336
+ OVERRIDE FLAGS
3337
+ -p, --project-id=<id> Project ID to delete token from (overrides CLI configuration)
3338
+
3017
3339
  DESCRIPTION
3018
3340
  Delete an API token from this project
3019
3341
 
@@ -3029,9 +3351,13 @@ EXAMPLES
3029
3351
  Delete a specific token without confirmation prompt
3030
3352
 
3031
3353
  $ sanity tokens delete silJ2lFmK6dONB --yes
3354
+
3355
+ Delete a token from a specific project
3356
+
3357
+ $ sanity tokens delete --project-id abc123
3032
3358
  ```
3033
3359
 
3034
- _See code: [src/commands/tokens/delete.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/tokens/delete.ts)_
3360
+ _See code: [src/commands/tokens/delete.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/tokens/delete.ts)_
3035
3361
 
3036
3362
  ## `sanity tokens list`
3037
3363
 
@@ -3039,11 +3365,14 @@ List API tokens for the current project
3039
3365
 
3040
3366
  ```
3041
3367
  USAGE
3042
- $ sanity tokens list [--json]
3368
+ $ sanity tokens list [-p <id>] [--json]
3043
3369
 
3044
3370
  FLAGS
3045
3371
  --json Output tokens in JSON format
3046
3372
 
3373
+ OVERRIDE FLAGS
3374
+ -p, --project-id=<id> Project ID to list tokens for (overrides CLI configuration)
3375
+
3047
3376
  DESCRIPTION
3048
3377
  List API tokens for the current project
3049
3378
 
@@ -3055,13 +3384,17 @@ EXAMPLES
3055
3384
  List tokens in JSON format
3056
3385
 
3057
3386
  $ sanity tokens list --json
3387
+
3388
+ List tokens for a specific project
3389
+
3390
+ $ sanity tokens list --project-id abc123
3058
3391
  ```
3059
3392
 
3060
- _See code: [src/commands/tokens/list.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/tokens/list.ts)_
3393
+ _See code: [src/commands/tokens/list.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/tokens/list.ts)_
3061
3394
 
3062
3395
  ## `sanity typegen generate`
3063
3396
 
3064
- Sanity TypeGen (Beta)
3397
+ Sanity TypeGen
3065
3398
 
3066
3399
  ```
3067
3400
  USAGE
@@ -3073,8 +3406,7 @@ FLAGS
3073
3406
  --watch [Default: false] Run the typegen in watch mode
3074
3407
 
3075
3408
  DESCRIPTION
3076
- Sanity TypeGen (Beta)
3077
- This command is currently in beta and may undergo significant changes. Feedback is welcome!
3409
+ Sanity TypeGen
3078
3410
 
3079
3411
  Configuration:
3080
3412
  This command can utilize configuration settings defined in a `sanity-typegen.json` file. These settings include:
@@ -3096,8 +3428,6 @@ DESCRIPTION
3096
3428
  Note:
3097
3429
  - The `sanity schema extract` command is a prerequisite for extracting your Sanity Studio schema into a `schema.json`
3098
3430
  file, which is then used by the `sanity typegen generate` command to generate type definitions.
3099
- - While this tool is in beta, we encourage you to experiment with these configurations and provide feedback to help
3100
- improve its functionality and usability.
3101
3431
 
3102
3432
  EXAMPLES
3103
3433
  Generate TypeScript type definitions from a Sanity Studio schema extracted using the `sanity schema extract`
@@ -3106,7 +3436,7 @@ EXAMPLES
3106
3436
  $ sanity typegen generate
3107
3437
  ```
3108
3438
 
3109
- _See code: [@sanity/codegen](https://github.com/sanity-io/codegen/blob/v5.9.2/src/commands/typegen/generate.ts)_
3439
+ _See code: [@sanity/codegen](https://github.com/sanity-io/codegen/blob/v6.0.0/src/commands/typegen/generate.ts)_
3110
3440
 
3111
3441
  ## `sanity undeploy`
3112
3442
 
@@ -3123,7 +3453,7 @@ DESCRIPTION
3123
3453
  Removes the deployed Sanity Studio/App from Sanity hosting
3124
3454
  ```
3125
3455
 
3126
- _See code: [src/commands/undeploy.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/undeploy.ts)_
3456
+ _See code: [src/commands/undeploy.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/undeploy.ts)_
3127
3457
 
3128
3458
  ## `sanity users invite [EMAIL]`
3129
3459
 
@@ -3131,7 +3461,7 @@ Invite a new user to the project
3131
3461
 
3132
3462
  ```
3133
3463
  USAGE
3134
- $ sanity users invite [EMAIL] [--role <value>]
3464
+ $ sanity users invite [EMAIL] [-p <id>] [--role <value>]
3135
3465
 
3136
3466
  ARGUMENTS
3137
3467
  [EMAIL] Email address to invite
@@ -3139,6 +3469,9 @@ ARGUMENTS
3139
3469
  FLAGS
3140
3470
  --role=<value> Role to invite the user as
3141
3471
 
3472
+ OVERRIDE FLAGS
3473
+ -p, --project-id=<id> Project ID to invite user to (overrides CLI configuration)
3474
+
3142
3475
  DESCRIPTION
3143
3476
  Invite a new user to the project
3144
3477
 
@@ -3154,9 +3487,13 @@ EXAMPLES
3154
3487
  Send a new user invite to the email "pippi@sanity.io", as administrator
3155
3488
 
3156
3489
  $ sanity users invite pippi@sanity.io --role administrator
3490
+
3491
+ Invite a user to a specific project
3492
+
3493
+ $ sanity users invite pippi@sanity.io --project-id abc123
3157
3494
  ```
3158
3495
 
3159
- _See code: [src/commands/users/invite.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/users/invite.ts)_
3496
+ _See code: [src/commands/users/invite.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/users/invite.ts)_
3160
3497
 
3161
3498
  ## `sanity users list`
3162
3499
 
@@ -3164,7 +3501,7 @@ List all users of the project
3164
3501
 
3165
3502
  ```
3166
3503
  USAGE
3167
- $ sanity users list [--invitations] [--order asc|desc] [--robots] [--sort id|name|role|date]
3504
+ $ sanity users list [-p <id>] [--invitations] [--order asc|desc] [--robots] [--sort id|name|role|date]
3168
3505
 
3169
3506
  FLAGS
3170
3507
  --[no-]invitations Includes or excludes pending invitations
@@ -3174,6 +3511,9 @@ FLAGS
3174
3511
  --sort=<option> [default: date] Sort users by specified column
3175
3512
  <options: id|name|role|date>
3176
3513
 
3514
+ OVERRIDE FLAGS
3515
+ -p, --project-id=<id> Project ID to list users for (overrides CLI configuration)
3516
+
3177
3517
  DESCRIPTION
3178
3518
  List all users of the project
3179
3519
 
@@ -3189,9 +3529,13 @@ EXAMPLES
3189
3529
  List all users, sorted by role
3190
3530
 
3191
3531
  $ sanity users list --sort role
3532
+
3533
+ List users for a specific project
3534
+
3535
+ $ sanity users list --project-id abc123
3192
3536
  ```
3193
3537
 
3194
- _See code: [src/commands/users/list.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/users/list.ts)_
3538
+ _See code: [src/commands/users/list.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/users/list.ts)_
3195
3539
 
3196
3540
  ## `sanity versions`
3197
3541
 
@@ -3208,6 +3552,6 @@ EXAMPLES
3208
3552
  $ sanity versions
3209
3553
  ```
3210
3554
 
3211
- _See code: [src/commands/versions.ts](https://github.com/sanity-io/cli/blob/v6.0.0-alpha.8/src/commands/versions.ts)_
3555
+ _See code: [src/commands/versions.ts](https://github.com/sanity-io/cli/blob/v5.14.1/src/commands/versions.ts)_
3212
3556
 
3213
3557
  <!-- commandsstop -->